param.go 7.8 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156157158159160161162163164165166167168169170171172173174175176177178179180181182183184185186187188189190191192193194195196197198199200201202203204205
  1. package archive
  2. import (
  3. "go-common/app/admin/main/videoup/model/message"
  4. "go-common/library/time"
  5. )
  6. const (
  7. // ActionVideoSubmit 视频提交
  8. ActionVideoSubmit = "videoSubmit"
  9. // ActionArchiveSubmit 稿件提交
  10. ActionArchiveSubmit = "archiveSubmit"
  11. // ActionArchiveSecondRound 无稿件信息修改的补发二审消息
  12. ActionArchiveSecondRound = "archiveSecondRound"
  13. // ActionArchiveAttr 稿件属性修改
  14. ActionArchiveAttr = "archiveAttr"
  15. // ActionArchiveTypeID 稿件分区修改
  16. ActionArchiveTypeID = "archiveTypeID"
  17. //ActionArchiveTag 保存稿件标签
  18. ActionArchiveTag = "archiveTag"
  19. //ActionArchiveTagRecheck 保存稿件标签,并频道回查
  20. ActionArchiveTagRecheck = "archiveTagRecheck"
  21. //FromListChannelReview 提交来源列表 频道回查
  22. FromListChannelReview = "channel_review"
  23. )
  24. // VideoParam video struct
  25. type VideoParam struct { // TODO: batch param
  26. ID int64 `json:"id"`
  27. Filename string `json:"filename"`
  28. Aid int64 `json:"aid"`
  29. Mid int64 `json:"mid"`
  30. RegionID int16 `json:"region_id"`
  31. VideoDesign *message.VideoDesign `json:"video_design,omitempty"`
  32. Status int16 `json:"status"`
  33. CTime time.Time `json:"ctime"`
  34. Cid int64 `json:"cid,omitempty"`
  35. Title string `json:"title,omitempty"`
  36. Desc string `json:"desc,omitempty"`
  37. Index int `json:"index,omitempty"`
  38. SrcType string `json:"src_type,omitempty"`
  39. Playurl string `json:"playurl,omitempty"`
  40. FailCode int8 `json:"failinfo,omitempty"`
  41. Duration int64 `json:"duration,omitempty"`
  42. XcodeState int8 `json:"xcode_state,omitempty"`
  43. Attribute int32 `json:"attribute,omitempty"`
  44. Filesize int64 `json:"filesize,omitempty"`
  45. WebLink string `json:"weblink,omitempty"`
  46. Resolutions string `json:"resolutions,omitempty"`
  47. Encoding int8 `json:"encoding"`
  48. EncodePurpose string `json:"encode_purpose,omitempty"`
  49. UID int64 `json:"uid,omitempty"`
  50. TaskID int64 `json:"task_id,omitempty"`
  51. Oname string `json:"oname,omitempty"`
  52. TagID int64 `json:"tag_id,omitempty"`
  53. Reason string `json:"reason,omitempty"`
  54. ReasonID int64 `json:"reject_reason_id,omitempty"`
  55. Note string `json:"note,omitempty"`
  56. Attrs *AttrParam `json:"attrs,omitempty"`
  57. }
  58. // ArcParam sencond round param
  59. type ArcParam struct {
  60. Aid int64 `json:"id"`
  61. Mid int64 `json:"mid"`
  62. UID int64 `json:"uid"`
  63. UName string `json:"uname"`
  64. CanCelMission bool `json:"cancel_mission"`
  65. Cover string `json:"cover"`
  66. Source string `json:"source"`
  67. URL string `json:"redirecturl"`
  68. Forward int64 `json:"forward"`
  69. PTime time.Time `json:"pubtime"`
  70. DTime time.Time `json:"delaytime"`
  71. CTime time.Time `json:"ctime"`
  72. Delay bool `json:"delay"`
  73. Tag string `json:"tag,omitempty"`
  74. IsUpBind bool `json:"is_up_bind"`
  75. SyncHiddenTag bool `json:"sync_hidden_tag"`
  76. Copyright int8 `json:"copyright"`
  77. FlagCopyright bool `json:"flag_copyright"`
  78. Access int16 `json:"access"`
  79. State int8 `json:"state"`
  80. Round int8 `json:"round"`
  81. Title string `json:"title,omitempty"`
  82. TypeID int16 `json:"typeid"`
  83. Content string `json:"content"`
  84. Note string `json:"note"`
  85. Attrs *AttrParam `json:"attrs,omitempty"`
  86. Forbid *ForbidAttr `json:"forbid"`
  87. Author string `json:"author"`
  88. RejectReason string `json:"reject_reason"`
  89. ReasonID int64 `json:"reason_id"`
  90. ChangeDelay bool `json:"change_delay"`
  91. Notify bool `json:"notify"`
  92. NoEmail bool `json:"no_email"`
  93. ForceSync bool `json:"force_sync"`
  94. OnFlowID int64 `json:"on_flow_id"`
  95. Dynamic string `json:"dynamic"`
  96. Porder
  97. UpNote string `json:"highrisk_note"`
  98. // AdminChange
  99. AdminChange bool `json:"admin_change"`
  100. PolicyID int64 `json:"policy_id"`
  101. ApplyUID int64 `json:"apply_uid"`
  102. FromList string `json:"from_list"`
  103. FlowAttribute map[string]int32 `json:"flow_attribute"`
  104. }
  105. //Porder table
  106. type Porder struct {
  107. IndustryID int64 `json:"industry_id"`
  108. BrandID int64 `json:"brand_id"`
  109. BrandName string `json:"brand_name"`
  110. Official int8 `json:"official"`
  111. ShowType string `json:"show_type"`
  112. ShowFront int8 `json:"show_front"`
  113. Advertiser string `json:"advertiser"`
  114. Agent string `json:"agent"`
  115. GroupID int64 `json:"group_id"`
  116. State int8 `json:"state"`
  117. PorderAction string `json:"porder_action"`
  118. }
  119. //PorderConfig table
  120. type PorderConfig struct {
  121. ID int64 `json:"id"`
  122. Type int8 `json:"type"`
  123. Name string `json:"name"`
  124. State int8 `json:"state"`
  125. Code string `json:"code"`
  126. Rank int8 `json:"rank"`
  127. }
  128. // AttrParam bit
  129. type AttrParam struct {
  130. NoRank int32 `json:"no_rank,omitempty"` // 0
  131. NoDynamic int32 `json:"no_dynamic,omitempty"` // 1
  132. NoWeb int32 `json:"no_web,omitempty"` // 2
  133. NoMobile int32 `json:"no_mobile,omitempty"` // 3
  134. NoSearch int32 `json:"no_search,omitempty"` // 4
  135. OverseaLock int32 `json:"oversea_block,omitempty"` // 5
  136. NoRecommend int32 `json:"no_recommend,omitempty"` // 6
  137. NoReprint int32 `json:"no_reprint,omitempty"` // 7
  138. HasHD5 int32 `json:"is_hd,omitempty"` // 8
  139. IsPGC int32 `json:"is_pgc,omitempty"` // 9
  140. AllowBp int32 `json:"allow_bp,omitempty"` // 10
  141. IsBangumi int32 `json:"is_bangumi,omitempty"` // 11
  142. IsPorder int32 `json:"is_porder,omitempty"` // 12
  143. LimitArea int32 `json:"limit_area,omitempty"` // 13
  144. AllowTag int32 `json:"allow_tag,omitempty"` // 14
  145. JumpURL int32 `json:"is_jumpurl,omitempty"` // 16
  146. IsMovie int32 `json:"is_movie,omitempty"` // 17
  147. BadgePay int32 `json:"is_pay,omitempty"` // 18
  148. PushBlog int32 `json:"push_blog,omitempty"` // 20
  149. ParentMode int32 `json:"parent_mode,omitempty"` // 21
  150. UGCPay int32 `json:"ugcpay,omitempty"` // 22
  151. }
  152. // IndexParam index_order.
  153. type IndexParam struct {
  154. Aid int64 `json:"aid"`
  155. ListOrder []*struct {
  156. ID int64 `json:"id"`
  157. Index int `json:"index"`
  158. } `json:"list_order"`
  159. }
  160. // MultSyncParam bath sync.
  161. type MultSyncParam struct {
  162. Action string `json:"action"`
  163. VideoParam *VideoParam `json:"videoParam,omitempty"`
  164. ArcParam *ArcParam `json:"archiveParam,omitempty"`
  165. }
  166. // SyncAction sync action.
  167. type SyncAction struct {
  168. Action string `json:"action"`
  169. }
  170. //TagParam update archive tag
  171. type TagParam struct {
  172. AID int64 `form:"aid" validate:"required"`
  173. Tags string `form:"tags"`
  174. FromChannelReview string `form:"channel_review"`
  175. }
  176. //BatchTagParam update batch archives' tag
  177. type BatchTagParam struct {
  178. AIDs []int64 `form:"aids,split" validate:"gt=0,dive,gt=0"`
  179. Action string `form:"action"`
  180. Tags string `form:"tags"`
  181. Note string `form:"note"`
  182. IsUpBind bool `form:"is_up_bind"`
  183. SyncHiddenTag bool `form:"sync_hidden_tag"`
  184. FromList string `form:"from_list"`
  185. }
  186. //ChannelReviewInfo 频道回查检查
  187. type ChannelReviewInfo struct {
  188. AID int64
  189. ChannelIDs string
  190. NeedReview bool
  191. CanOperRecheck bool
  192. }