params.go 7.3 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156157158159160161162163164165166167168169170171172173174175176177178179180181182
  1. package model
  2. import (
  3. "go-common/library/time"
  4. )
  5. // ListParams query qa vide task list params
  6. type ListParams struct {
  7. AuditStatus []int `form:"auditStatus,split" validate:"omitempty,max=100"`
  8. TaskID []int64 `form:"taskID,split" validate:"omitempty,max=100,dive,gt=0"`
  9. Keyword []string `form:"keyword,split" validate:"omitempty,max=100"`
  10. UPGroup []int64 `form:"upGroup,split" validate:"omitempty,max=100,dive,gt=0"`
  11. UID []int64 `form:"uid,split" validate:"omitempty,max=100,dive,gt=0"`
  12. Limit int `form:"limit" validate:"omitempty,max=1000"`
  13. Seed string `form:"seed"`
  14. ArcTypeID []int64 `form:"arcTypeid[]" validate:"omitempty,max=100,dive,gt=0"`
  15. TagID []int64 `form:"tagID,split" validate:"omitempty,max=100,dive,gt=0"`
  16. State int16 `form:"state"`
  17. CTimeFrom string `form:"ctimeFrom"`
  18. CTimeTo string `form:"ctimeTo"`
  19. FTimeFrom string `form:"ftimeFrom"`
  20. FTimeTo string `form:"ftimeTo"`
  21. FansFrom int64 `form:"fansFrom"`
  22. FansTo int64 `form:"fansTo"`
  23. Order string `form:"order" default:"id"`
  24. Sort string `form:"sort" default:"desc"`
  25. Ps int `form:"ps" default:"50" validate:"omitempty,gt=0,max=100"`
  26. Pn int `form:"pn" default:"1" validate:"omitempty,gt=0"`
  27. }
  28. //AddVideoParams add qa video task params
  29. type AddVideoParams struct {
  30. OUID int64 `json:"uid"`
  31. Oname string `json:"username"`
  32. VideoDetail
  33. }
  34. //QASubmitParams submit qa video task params
  35. type QASubmitParams struct {
  36. ID int64 `json:"id" form:"id" validate:"required,gt=0"`
  37. AuditStatus int16 `json:"audit_status" form:"auditStatus"`
  38. Encoding int32 `json:"encoding" form:"encoding"`
  39. Norank int32 `json:"norank" form:"norank"`
  40. Nodynamic int32 `json:"nodynamic" form:"nodynamic"`
  41. PushBlog int32 `json:"push_blog" form:"push_blog"`
  42. Norecommend int32 `json:"norecommend" form:"norecommend"`
  43. Nosearch int32 `json:"nosearch" form:"nosearch"`
  44. OverseaBlock int32 `json:"oversea_block" form:"oversea_block"`
  45. TagID int64 `json:"tag_id" form:"tagID" validate:"omitempty,gt=0"`
  46. ReasonID int64 `json:"reason_id" form:"reasonID" validate:"omitempty,gt=0"`
  47. Reason string `json:"reason" form:"reason"`
  48. Note string `json:"note" form:"note"`
  49. QaTagID int64 `json:"qa_tag_id" form:"qaTagid" validate:"required,gt=0"`
  50. QATag string `json:"qa_tag" form:"qaTag" validate:"required"`
  51. QaNote string `json:"qa_note" form:"qaNote"`
  52. }
  53. //TaskVideoItem qa vide task list item
  54. type TaskVideoItem struct {
  55. ID int64 `json:"id"`
  56. DetailID int64 `json:"detail_id"`
  57. TaskID int64 `json:"task_id"`
  58. TaskUTime int64 `json:"task_utime"`
  59. CTime string `json:"ctime"`
  60. FTime string `json:"ftime"`
  61. AuditStatus int16 `json:"audit_status"`
  62. TagID int64 `json:"audit_tagid"`
  63. MID int64 `json:"mid"`
  64. UPName string `json:"up_name"`
  65. UPGroups []int64 `json:"up_groups"`
  66. UPGroupList []*UPGroup `json:"up_group_list"`
  67. Fans int64 `json:"fans"`
  68. ArcTitle string `json:"arc_title"`
  69. ArcTypeid int64 `json:"arc_typeid"`
  70. UID int64 `json:"uid"`
  71. User *UserRole `json:"user"`
  72. State int16 `json:"state"`
  73. StateName string `json:"state_name"`
  74. }
  75. //Page page
  76. type Page struct {
  77. Num int `json:"num"`
  78. Size int `json:"size"`
  79. Total int `json:"total"`
  80. }
  81. //QAVideoList qa video task list return struct
  82. type QAVideoList struct {
  83. Result []*TaskVideoItem `json:"result"`
  84. Page Page `json:"page"`
  85. }
  86. // VideoParam video struct
  87. type VideoParam struct { // TODO: batch param
  88. ID int64 `json:"id"`
  89. Filename string `json:"filename"`
  90. Aid int64 `json:"aid"`
  91. Mid int64 `json:"mid"`
  92. RegionID int16 `json:"region_id"`
  93. VideoDesign *VideoDesign `json:"video_design,omitempty"`
  94. Status int16 `json:"status"`
  95. CTime time.Time `json:"ctime"`
  96. Cid int64 `json:"cid,omitempty"`
  97. Title string `json:"title,omitempty"`
  98. Desc string `json:"desc,omitempty"`
  99. Index int `json:"index,omitempty"`
  100. SrcType string `json:"src_type,omitempty"`
  101. Playurl string `json:"playurl,omitempty"`
  102. FailCode int8 `json:"failinfo,omitempty"`
  103. Duration int64 `json:"duration,omitempty"`
  104. XcodeState int8 `json:"xcode_state,omitempty"`
  105. Attribute int32 `json:"attribute,omitempty"`
  106. Filesize int64 `json:"filesize,omitempty"`
  107. WebLink string `json:"weblink,omitempty"`
  108. Resolutions string `json:"resolutions,omitempty"`
  109. Encoding int8 `json:"encoding"`
  110. EncodePurpose string `json:"encode_purpose,omitempty"`
  111. UID int64 `json:"uid,omitempty"`
  112. TaskID int64 `json:"task_id,omitempty"`
  113. Oname string `json:"oname,omitempty"`
  114. TagID int64 `json:"tag_id,omitempty"`
  115. Reason string `json:"reason,omitempty"`
  116. ReasonID int64 `json:"reject_reason_id,omitempty"`
  117. Note string `json:"note,omitempty"`
  118. Attrs *AttrParam `json:"attrs,omitempty"`
  119. Fans int64 `json:"-"`
  120. CateID int64 `json:"-"`
  121. UpFrom int8 `json:"-"`
  122. TaskState int8 `json:"-"`
  123. TypeID int16 `json:"-"`
  124. }
  125. // AttrParam bit
  126. type AttrParam struct {
  127. NoRank int32 `json:"no_rank,omitempty"` // 0
  128. NoDynamic int32 `json:"no_dynamic,omitempty"` // 1
  129. NoWeb int32 `json:"no_web,omitempty"` // 2
  130. NoMobile int32 `json:"no_mobile,omitempty"` // 3
  131. NoSearch int32 `json:"no_search,omitempty"` // 4
  132. OverseaLock int32 `json:"oversea_block,omitempty"` // 5
  133. NoRecommend int32 `json:"no_recommend,omitempty"` // 6
  134. NoReprint int32 `json:"no_reprint,omitempty"` // 7
  135. HasHD5 int32 `json:"is_hd,omitempty"` // 8
  136. IsPGC int32 `json:"is_pgc,omitempty"` // 9
  137. AllowBp int32 `json:"allow_bp,omitempty"` // 10
  138. IsBangumi int32 `json:"is_bangumi,omitempty"` // 11
  139. IsPorder int32 `json:"is_porder,omitempty"` // 12
  140. LimitArea int32 `json:"limit_area,omitempty"` // 13
  141. AllowTag int32 `json:"allow_tag,omitempty"` // 14
  142. JumpURL int32 `json:"is_jumpurl,omitempty"` // 16
  143. IsMovie int32 `json:"is_movie,omitempty"` // 17
  144. BadgePay int32 `json:"is_pay,omitempty"` // 18
  145. PushBlog int32 `json:"push_blog,omitempty"` // 20
  146. }
  147. // VideoDesign mosaic and watermark
  148. type VideoDesign struct {
  149. Mosaic []*Mosaic `json:"mosaic,omitempty"`
  150. WaterMark []*WaterMark `json:"watermark,omitempty"`
  151. }
  152. // Mosaic .
  153. type Mosaic struct {
  154. X int64 `json:"x" form:"mosaic[0][x]"`
  155. Y int64 `json:"y" form:"mosaic[0][y]"`
  156. W int64 `json:"w" form:"mosaic[0][w]"`
  157. H int64 `json:"h" form:"mosaic[0][h]"`
  158. Start int64 `json:"start" form:"mosaic[0][start]"`
  159. End int64 `json:"end" form:"mosaic[0][end]"`
  160. }
  161. // WaterMark .
  162. type WaterMark struct {
  163. LOC int8 `json:"loc,omitempty"`
  164. URL string `json:"url,omitempty"`
  165. MD5 string `json:"md5,omitempty"`
  166. Start int64 `json:"start,omitempty"`
  167. End int64 `json:"end,omitempty"`
  168. X int64 `json:"x,omitempty"`
  169. Y int64 `json:"y,omitempty"`
  170. }