params.go 3.3 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116
  1. package model
  2. // ParamCale calendar params.
  3. type ParamCale struct {
  4. Stime int64 `form:"stime" validate:"required"`
  5. Etime int64 `form:"etime" validate:"required"`
  6. }
  7. // ParamContest matchs params.
  8. type ParamContest struct {
  9. Mid int64 `form:"mid" validate:"gte=0"`
  10. Gid int64 `form:"gid" validate:"gte=0"`
  11. Tid int64 `form:"tid" validate:"gte=0"`
  12. Stime string `form:"stime"`
  13. Etime string `form:"etime"`
  14. GState string `form:"g_state"`
  15. Sids []int64 `form:"sids,split"`
  16. Sort int `form:"sort"`
  17. Pn int `form:"pn" validate:"gt=0"`
  18. Ps int `form:"ps" validate:"gt=0,lte=50"`
  19. }
  20. // ParamVideo video params
  21. type ParamVideo struct {
  22. Mid int64 `form:"mid" validate:"gte=0"`
  23. Gid int64 `form:"gid" validate:"gte=0"`
  24. Tid int64 `form:"tid" validate:"gte=0"`
  25. Year int64 `form:"year" validate:"gte=0"`
  26. Tag int64 `form:"tag" validate:"gte=0"`
  27. Sort int64 `form:"sort" validate:"gte=0"`
  28. Pn int `form:"pn" validate:"gt=0"`
  29. Ps int `form:"ps" validate:"gt=0,lte=50"`
  30. }
  31. // ParamSearch search video params
  32. type ParamSearch struct {
  33. Pn int `form:"pn" validate:"gt=0"`
  34. Ps int `form:"ps" validate:"gt=0"`
  35. Keyword string `form:"keyword" validate:"required"`
  36. Sort int64 `form:"sort" validate:"gte=0"`
  37. }
  38. // ParamSeason season params.
  39. type ParamSeason struct {
  40. VMID int64 `form:"vmid"`
  41. Sort int64 `form:"sort"`
  42. Pn int `form:"pn" validate:"gt=0"`
  43. Ps int `form:"ps" validate:"gt=0,lte=50"`
  44. }
  45. // ParamFilter filter video params
  46. type ParamFilter struct {
  47. Mid int64 `form:"mid" validate:"gte=0"`
  48. Gid int64 `form:"gid" validate:"gte=0"`
  49. Tid int64 `form:"tid" validate:"gte=0"`
  50. Year int64 `form:"year" validate:"gte=0"`
  51. Tag int64 `form:"tag" validate:"gte=0"`
  52. Stime string `form:"stime" `
  53. Etime string `form:"etime" `
  54. }
  55. // ParamActPoint matchs params.
  56. type ParamActPoint struct {
  57. Aid int64 `form:"aid" validate:"gt=0"`
  58. MdID int64 `form:"md_id" validate:"gt=0"`
  59. Sort int `form:"sort"`
  60. Pn int `form:"pn" validate:"gt=0"`
  61. Ps int `form:"ps" validate:"gt=0,lte=50"`
  62. }
  63. // ParamActTop matchs params.
  64. type ParamActTop struct {
  65. Aid int64 `form:"aid" validate:"gt=0"`
  66. Sort int `form:"sort"`
  67. Stime string `form:"stime" `
  68. Etime string `form:"etime" `
  69. Pn int `form:"pn" validate:"gt=0"`
  70. Ps int `form:"ps" validate:"gt=0,lte=50"`
  71. }
  72. // ParamFav app fav list.
  73. type ParamFav struct {
  74. VMID int64 `form:"vmid"`
  75. Sids []int64 `form:"sids,split"`
  76. Stime string `form:"stime"`
  77. Etime string `form:"etime"`
  78. Sort int `form:"sort"`
  79. Pn int `form:"pn" default:"1" validate:"min=1"`
  80. Ps int `form:"ps" default:"50" validate:"min=1"`
  81. }
  82. // ParamLd leidata param
  83. type ParamLd struct {
  84. Route string `form:"route"`
  85. }
  86. // ParamCDRecent contest recently match
  87. type ParamCDRecent struct {
  88. HomeID int64 `form:"home_id" validate:"gt=0"`
  89. AwayID int64 `form:"away_id" validate:"gt=0"`
  90. CID int64 `form:"cid" validate:"gt=0"`
  91. Ps int64 `form:"ps" default:"8" validate:"lte=10"`
  92. }
  93. // ParamGame game
  94. type ParamGame struct {
  95. MatchID int64 `form:"match_id" validate:"required"`
  96. GameIDs []int64 `form:"game_ids,split" validate:"required"`
  97. Tp int64 `form:"tp" default:"1" validate:"min=1"`
  98. }
  99. // ParamLeidas .
  100. type ParamLeidas struct {
  101. IDs []int64 `form:"ids,split" validate:"required"`
  102. Tp int64 `form:"tp" default:"1" validate:"min=1"`
  103. }