param.go 6.5 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156157158159160161162163164165166167168169170171172173174175176177178179180181182183184185186187
  1. package blocked
  2. // ArgBlockedSearch param struct.
  3. type ArgBlockedSearch struct {
  4. Keyword string `form:"keyword" default:"-"`
  5. UID int64 `form:"mid" default:"-100"`
  6. OPID int64 `form:"op_id" default:"-100"`
  7. OriginType int8 `form:"origin_type" default:"-100"`
  8. BlockedType int8 `form:"blocked_type" default:"-100"`
  9. PublishStatus int8 `form:"publish_status" default:"-100"`
  10. Start string `form:"start"`
  11. End string `form:"end"`
  12. PN int `form:"pn" default:"1"`
  13. PS int `form:"ps" default:"50"`
  14. Order string `form:"order" default:"id"`
  15. Sort string `form:"sort" default:"desc"`
  16. }
  17. // ArgPublishSearch arg publish search
  18. type ArgPublishSearch struct {
  19. Keyword string `form:"keyword" default:"-"`
  20. Type int8 `form:"type" default:"-100"`
  21. ShowFrom string `form:"start"`
  22. ShowTo string `form:"end"`
  23. Order string `form:"order" default:"id"`
  24. Sort string `form:"sort" default:"desc"`
  25. PN int `form:"pn" default:"1"`
  26. PS int `form:"ps" default:"50"`
  27. }
  28. // ArgCaseSearch struct
  29. type ArgCaseSearch struct {
  30. Keyword string `form:"keyword" default:"-"`
  31. OriginType int8 `form:"origin_type" default:"-100"`
  32. Status int8 `form:"status" default:"-100"`
  33. CaseType int8 `form:"case_type" default:"-100"`
  34. UID int64 `form:"uid" default:"-100"`
  35. OPID int64 `form:"op_id" default:"-100"`
  36. TimeFrom string `form:"start"`
  37. TimeTo string `form:"end"`
  38. Order string `form:"order" default:"id"`
  39. Sort string `form:"sort" default:"desc"`
  40. PN int `form:"pn" default:"1"`
  41. PS int `form:"ps" default:"50"`
  42. }
  43. // ArgJurySearch struct
  44. type ArgJurySearch struct {
  45. UID int64 `form:"mid" default:"-100"`
  46. Status int8 `form:"status" default:"-100"`
  47. Black int8 `form:"type" default:"-100"`
  48. ExpiredFrom string `form:"start"`
  49. ExpiredTo string `form:"end"`
  50. Order string `form:"order" default:"id"`
  51. Sort string `form:"sort" default:"desc"`
  52. PN int `form:"pn" default:"1"`
  53. PS int `form:"ps" default:"50"`
  54. }
  55. // ArgAddJurys struct
  56. type ArgAddJurys struct {
  57. MIDs []int64 `form:"mids,split" validate:"required"`
  58. OPID int64 `form:"op_id" validate:"required"`
  59. Day int `form:"day" validate:"required"`
  60. Send int8 `form:"send" validate:"min=0,max=1"`
  61. }
  62. // ArgOpinionSearch struct
  63. type ArgOpinionSearch struct {
  64. UID int64 `form:"mid" default:"-100"`
  65. CID int64 `form:"cid" default:"-100"`
  66. Vote int `form:"vote" default:"-100"`
  67. State int8 `form:"state" default:"-100"`
  68. Order string `form:"order" default:"id"`
  69. Sort string `form:"sort" default:"desc"`
  70. PN int `form:"pn" default:"1"`
  71. PS int `form:"ps" default:"50"`
  72. }
  73. // ArgKpiPointSearch param struct.
  74. type ArgKpiPointSearch struct {
  75. UID int64 `form:"uid" default:"-100"`
  76. Start string `form:"start" default:"-"`
  77. End string `form:"end" default:"-"`
  78. Order string `form:"order" default:"id"`
  79. Sort string `form:"sort" default:"desc"`
  80. PN int `form:"pn" default:"1"`
  81. PS int `form:"ps" default:"50"`
  82. }
  83. // ArgKpiSearch param struct.
  84. type ArgKpiSearch struct {
  85. UID int64 `form:"uid" default:"0"`
  86. Start string `form:"start"`
  87. End string `form:"end"`
  88. PN int `form:"pn" default:"1"`
  89. PS int `form:"ps" default:"20"`
  90. }
  91. // ArgPublish param struct.
  92. type ArgPublish struct {
  93. ID int64 `form:"id"`
  94. OID int64 `form:"op_id" validate:"required"`
  95. PType int8 `form:"publish_type" validate:"min=1,max=4"`
  96. PublishStatus int8 `form:"publish_status" validate:"min=0,max=1"`
  97. StickStatus int8 `form:"stick_status" validate:"min=0,max=1"`
  98. SubTitle string `form:"sub_title"`
  99. Title string `form:"title"`
  100. URL string `form:"url"`
  101. Content string `form:"content"`
  102. ShowTime string `form:"show_time"`
  103. }
  104. // ArgCase param struct.
  105. type ArgCase struct {
  106. ID int64 `form:"id"`
  107. UID int64 `form:"uid" validate:"required"`
  108. Otype int8 `form:"origin_type" validate:"min=0,max=20"`
  109. ReasonType int8 `form:"reason_type" validate:"min=0,max=40"`
  110. PunishResult int8 `form:"punish_result" validate:"min=0,max=10"`
  111. BlockedDays int `form:"blocked_days"`
  112. OriginTitle string `form:"origin_title" validate:"required"`
  113. OriginURL string `form:"origin_url" validate:"required"`
  114. OriginContent string `form:"origin_content"`
  115. RelationID string `form:"relation_id"`
  116. OID int64 `form:"op_id" validate:"required"`
  117. }
  118. // ArgUpStatus param struct
  119. type ArgUpStatus struct {
  120. IDS []int64 `form:"ids,split" validate:"min=1,max=100"`
  121. OID int64 `form:"op_id" validate:"required"`
  122. Status int8 `form:"status"`
  123. }
  124. // ArgUpInfo param struct
  125. type ArgUpInfo struct {
  126. ID int64 `form:"id" validate:"required"`
  127. OID int64 `form:"op_id" validate:"required"`
  128. Status int8 `form:"status" validate:"min=0,max=1"`
  129. Content string `form:"content"`
  130. }
  131. // ArgCaseConf param struct
  132. type ArgCaseConf struct {
  133. CaseGiveHours int `form:"case_give_hours" default:"0"`
  134. CaseCheckHours int `form:"case_check_hours" default:"0"`
  135. JuryVoteRadio int `form:"jury_vote_radio" default:"0"`
  136. CaseJudgeRadio int `form:"case_judge_radio" default:"0"`
  137. CaseVoteMin int `form:"case_vote_min" default:"0"`
  138. CaseObtainMax int `form:"case_obtain_max" default:"0"`
  139. CaseVoteMax int `form:"case_vote_max" default:"0"`
  140. JuryApplyMax int `form:"jury_apply_max" default:"0"`
  141. CaseLoadMax int `form:"case_load_max" default:"0"`
  142. CaseLoadSwitch int `form:"case_load_switch" default:"0"`
  143. CaseVoteMaxPercent int `form:"case_vote_max_percent" default:"0"`
  144. OID int `form:"op_id" validate:"required"`
  145. }
  146. // ArgAutoCaseConf param struct.
  147. type ArgAutoCaseConf struct {
  148. ID int64 `form:"id"`
  149. Platform int8 `form:"platform" validate:"required"`
  150. Reasons []int64 `form:"reasons,split"`
  151. ReportScore int `form:"report_score" default:"0"`
  152. Likes int `form:"likes" default:"0"`
  153. OID int64 `form:"op_id" validate:"required"`
  154. }
  155. // Pager param struct.
  156. type Pager struct {
  157. Total int `json:"total"`
  158. PN int `json:"page"`
  159. PS int `json:"pagesize"`
  160. Order string `json:"order"`
  161. Sort string `json:"sort"`
  162. }
  163. // ArgVoteNum param struct.
  164. type ArgVoteNum struct {
  165. OID int64 `form:"op_id" validate:"required"`
  166. RateS int8 `form:"rate_s" default:"1"`
  167. RateA int8 `form:"rate_a" default:"1"`
  168. RateB int8 `form:"rate_b" default:"1"`
  169. RateC int8 `form:"rate_c" default:"1"`
  170. RateD int8 `form:"rate_d" default:"1"`
  171. }