channel_tab.go 2.6 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384
  1. package show
  2. import "go-common/app/admin/main/feed/model/common"
  3. //ChannelTab channel tab
  4. type ChannelTab struct {
  5. ID int64 `json:"id" form:"id"`
  6. TagID int64 `json:"tag_id" form:"tag_id" validate:"required"`
  7. TabID int64 `json:"tab_id" form:"tab_id" validate:"required"`
  8. Title string `json:"title" form:"title" validate:"required"`
  9. Stime int64 `json:"stime" form:"stime" validate:"required"`
  10. Etime int64 `json:"etime" form:"etime" validate:"required"`
  11. Check int `json:"check" form:"check"`
  12. Priority int `json:"priority" form:"priority" validate:"required"`
  13. UID int64 `json:"uid" form:"uid"`
  14. Person string `json:"person" form:"person"`
  15. IsDelete int `json:"is_delete" form:"is_delete"`
  16. Status int `json:"status" form:"status"`
  17. }
  18. //ChannelTabPager .
  19. type ChannelTabPager struct {
  20. Item []*ChannelTab `json:"item"`
  21. Page common.Page `json:"page"`
  22. }
  23. // TableName .
  24. func (a ChannelTab) TableName() string {
  25. return "channel_tab"
  26. }
  27. /*
  28. ---------------------------
  29. struct param
  30. ---------------------------
  31. */
  32. //ChannelTabAP channel tab add param
  33. type ChannelTabAP struct {
  34. TagID int64 `form:"tag_id" validate:"required"`
  35. TabID int64 `form:"tab_id" validate:"required"`
  36. Title string `form:"title" validate:"required"`
  37. Stime int64 `form:"stime" validate:"required"`
  38. Etime int64 `form:"etime" validate:"required"`
  39. Priority int `form:"priority" validate:"required"`
  40. UID int64 `form:"uid" gorm:"column:uid"`
  41. Person string `form:"person"`
  42. }
  43. //ChannelTabUP channel tab update param
  44. type ChannelTabUP struct {
  45. ID int64 `form:"id" validate:"required"`
  46. TagID int64 `form:"tag_id" validate:"required"`
  47. TabID int64 `form:"tab_id" validate:"required"`
  48. Title string `form:"title" validate:"required"`
  49. Stime int64 `form:"stime" validate:"required"`
  50. Etime int64 `form:"etime" validate:"required"`
  51. Priority int `form:"priority" validate:"required"`
  52. UID int64 `form:"uid" gorm:"column:uid"`
  53. Person string `form:"person"`
  54. }
  55. //ChannelTabLP channel tab list param
  56. type ChannelTabLP struct {
  57. TagID int `form:"tag_id"`
  58. TabID int `form:"tab_id"`
  59. Stime int64 `form:"stime"`
  60. Etime int64 `form:"etime"`
  61. Status int `form:"status"`
  62. Person string `form:"person"`
  63. Order int `form:"order" default:"2"`
  64. Ps int `form:"ps" default:"20"` // 分页大小
  65. Pn int `form:"pn" default:"1"` // 第几个分页
  66. }
  67. // TableName .
  68. func (a ChannelTabAP) TableName() string {
  69. return "channel_tab"
  70. }
  71. // TableName .
  72. func (a ChannelTabUP) TableName() string {
  73. return "channel_tab"
  74. }