group.go 5.8 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130
  1. package param
  2. // GroupParam describe the group param
  3. type GroupParam struct {
  4. Oid int64 `form:"oid" json:"oid" validate:"required,min=1"`
  5. Business int8 `form:"business" json:"business" validate:"required,min=1"`
  6. Rid int8 `form:"rid" json:"rid"`
  7. State int8 `form:"state" json:"state"`
  8. Tid int64 `form:"tid" json:"tid" validate:"required,min=1"`
  9. Note string `form:"note" json:"note"`
  10. AdminID int64 `json:"adminid"`
  11. AdminName string `json:"admin_name"`
  12. }
  13. // GroupRoleSetParam .
  14. type GroupRoleSetParam struct {
  15. GID []int64 `form:"id,split" json:"id" validate:"required"`
  16. AdminID int64 `json:"admin_id"`
  17. AdminName string `json:"admin_name"`
  18. BID int8 `form:"bid" json:"bid" validate:"required,min=1"`
  19. RID int8 `json:"rid"`
  20. TID int64 `form:"tid" json:"tid" validate:"min=-1"`
  21. Note string `form:"note" json:"note"`
  22. }
  23. // GroupResParam describe the set result request params to a group row
  24. type GroupResParam struct {
  25. Oid int64 `form:"oid" json:"oid" validate:"required,min=1"`
  26. Business int8 `form:"business" json:"business" validate:"required,min=1"`
  27. State int8 `form:"state" json:"state" validate:"required,min=1,max=14"`
  28. AdminID int64 `json:"adminid"`
  29. AdminName string `json:"admin_name"`
  30. Reason string `form:"reason" json:"reason"`
  31. ISDisplay bool `form:"is_display" json:"is_display"`
  32. IsMessage bool `form:"is_message" json:"is_message"`
  33. ReviewState int `form:"review_state" json:"review_state"`
  34. Extra *GroupExtra `json:"extra"`
  35. }
  36. // BatchGroupResParam describe the set result request params to a set of groups
  37. type BatchGroupResParam struct {
  38. GID []int64 `form:"id,split" json:"id"`
  39. Oids []int64 `form:"oids,split" json:"oids" validate:"required,gt=0"`
  40. Business int8 `form:"business" json:"business" validate:"required,min=1"`
  41. Role int8 `form:"role" json:"role"`
  42. State int8 `form:"state" json:"state" validate:"required,min=1,max=14"`
  43. AdminID int64 `json:"adminid"`
  44. AdminName string `json:"admin_name"`
  45. Reason string `form:"reason" json:"reason"`
  46. ISDisplay bool `form:"is_display" json:"is_display"`
  47. IsMessage bool `form:"is_message" json:"is_message"`
  48. ReviewState int `form:"review_state" json:"review_state"`
  49. Extra *GroupExtra `json:"extra"`
  50. }
  51. // GroupExtra .
  52. type GroupExtra struct {
  53. ISDisplay bool `form:"is_display" json:"is_display"`
  54. IsMessage bool `form:"is_message" json:"is_message"`
  55. ReviewState int `form:"review_state" json:"review_state"`
  56. }
  57. // GroupListParamV3 .
  58. type GroupListParamV3 struct {
  59. Business int8 `form:"business" validate:"required"`
  60. Oid []string `form:"oid,split"`
  61. Rid []int8 `form:"rid,split"` //role
  62. Fid []int64 `form:"fid,split"` //flow
  63. Eid []int64 `form:"eid,split"`
  64. Mid []int64 `form:"mid,split"` // workflow_business mid
  65. ReportMid []int64 `form:"report_mid,split"` // workflow_chall mid
  66. FirstUserTid []int64 `form:"first_user_tid"`
  67. State []int8 `form:"state,split"`
  68. Tid []int64 `form:"tid,split"`
  69. Round []int64 `form:"round,split"`
  70. TypeID []int64 `form:"typeid,split"`
  71. KWPriority bool `form:"kw_priority"`
  72. KW []string `form:"kw,split"`
  73. KWField []string `form:"kw_field,split"`
  74. Order string `form:"order" default:"lasttime"`
  75. Sort string `form:"sort" default:"desc"`
  76. PN int64 `form:"pn" default:"1"`
  77. PS int64 `form:"ps" default:"50"`
  78. AdminName []string `form:"admin_name,split"`
  79. CTimeFrom string `form:"ctime_from"`
  80. CTimeTo string `form:"ctime_to"`
  81. }
  82. // GroupStateSetParam .
  83. type GroupStateSetParam struct {
  84. ID []int64 `form:"id,split" json:"id" validate:"required"`
  85. Business int8 `form:"business" json:"business" validate:"required"`
  86. State int8 `form:"state" json:"state" validate:"required"`
  87. Tid int64 `form:"tid" json:"tid"` //处理理由tag_id
  88. Rid int8 `form:"rid" json:"rid" validate:"required"`
  89. Reason string `form:"reason" json:"reason"`
  90. IsDisplay bool `form:"is_display" json:"is_display"`
  91. IsMessage bool `form:"is_message" json:"is_message"` //通知举报人
  92. IsMessageUper bool `form:"is_message_uper" json:"is_message_uper"` //通知被举报人(up主)
  93. ReviewState int `form:"review_state" json:"review_state"`
  94. DecreaseMoral int64 `form:"decrease_moral" json:"decrease_moral" validate:"max=0"` //扣节操
  95. DisposeMode int `form:"dispose_mode" json:"dispose_mode" validate:"min=0"` //内容处理方式,批量操作不支持处理内容
  96. BlockDay int64 `form:"block_day" json:"block_day"` //封禁时间
  97. BlockReason int8 `form:"block_reason" json:"block_reason"` //封禁理由
  98. AdminID int64 `json:"admin_id"`
  99. AdminName string `json:"admin_name"`
  100. }
  101. // GroupStatePublicReferee .
  102. type GroupStatePublicReferee struct {
  103. ID []int64 `form:"id,split" json:"id" validate:"required"`
  104. Business int8 `form:"business" json:"business" validate:"required"`
  105. AdminID int64 `json:"admin_id"`
  106. AdminName string `json:"admin_name"`
  107. State int8 `json:"state"`
  108. }
  109. // UpExtraParam describe the request params to batch update group extra data
  110. type UpExtraParam struct {
  111. Gids []int64 `form:"gid,split" json:"gid" validate:"required,min=1"`
  112. Extra string `form:"extra" json:"extra" validate:"required"`
  113. AdminID int64 `json:"admin_id"`
  114. AdminName string `json:"admin_name"`
  115. }
  116. // GroupPendingParam .
  117. type GroupPendingParam struct {
  118. Business int8 `form:"business" json:"business" validate:"required,min=1"`
  119. Rid []int8 `form:"rid,split" json:"rid"`
  120. }