model.go 7.1 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156157158159160161162163164165166167168169170171172173174175176177178179180181182183184185186187188189190191192193194195196197198199200201202203204205206207208209210211212213214215216217218219220221222223
  1. package model
  2. import "go-common/library/time"
  3. const (
  4. //FromBILI from bilibili
  5. FromBILI = 0
  6. //FromBBQ from bbq
  7. FromBBQ = 1
  8. //FromCMS from cms
  9. FromCMS = 2
  10. //SourceRequest video_repository.sync_status source request
  11. SourceRequest = 1
  12. //SourceXcodeCover video_repository.sync_status xcode/cover
  13. SourceXcodeCover = 2
  14. //SourceAI video_repository.sync_status ai source
  15. SourceAI = 4
  16. //SourceOnshelf video_repository.sync_status video on shelf
  17. SourceOnshelf = 8
  18. //UploadStatusFailed video_upload_process.upload_status
  19. UploadStatusFailed = -1
  20. //UploadStatusSuccessed video_upload_process.upload_status
  21. UploadStatusSuccessed = 1
  22. //UploadStatusWaiting video_upload_process.upload_status
  23. UploadStatusWaiting = 0
  24. //VideoUploadProcessStatusFailed .
  25. VideoUploadProcessStatusFailed = -1
  26. //VideoUploadProcessStatusPending .
  27. VideoUploadProcessStatusPending = 0
  28. //VideoUploadProcessStatusSuccessed .
  29. VideoUploadProcessStatusSuccessed = 1
  30. )
  31. //视频状态集合
  32. const (
  33. //VideoStRecommend 推荐
  34. VideoStRecommend = 5
  35. //VideoStHighGrade 优质
  36. VideoStHighGrade = 4
  37. //VideoStCanPlay 可放出
  38. VideoStCanPlay = 3
  39. //VideoStCheckBack 视频状态回查
  40. VideoStCheckBack = 2
  41. //VideoStPassReview 审核通过
  42. VideoStPassReview = 1
  43. //VideoStPendingPassReview 原始稿件状态,等待安全审核
  44. VideoStPendingPassReview = 0
  45. //VideoStPassReviewReject 回查不通过,仅自见
  46. VideoStPassReviewReject = -1
  47. //VideoStCheckBackPatialPlay 回查不放出,在APP部分放出
  48. VideoStCheckBackPatialPlay = -2
  49. //VideoUnshelf 下架
  50. VideoUnshelf = -3
  51. //VideoDelete 删除
  52. VideoDelete = -4
  53. )
  54. //Tag .
  55. type Tag struct {
  56. ID int64 `json:"id"`
  57. Name string `json:"name"`
  58. Type int32 `json:"type"`
  59. }
  60. // VideoInfo 一般视频信息
  61. type VideoInfo struct {
  62. SVID int64 `json:"svid"`
  63. TID int64 `json:"tid"`
  64. SubTID int64 `json:"sub_tid"`
  65. Title string `json:"title"`
  66. Content string `json:"content"`
  67. MID int64 `json:"mid"`
  68. Report int64 `json:"report"`
  69. Duration int64 `json:"duration"`
  70. Pubtime string `json:"pubtime"`
  71. Ctime time.Time `json:"ctime"`
  72. AVID int64 `json:"avid"`
  73. CID int64 `json:"cid"`
  74. State int16 `json:"state"`
  75. Original int64 `json:"original"`
  76. From int16 `json:"from"`
  77. IsFullScreen int16 `json:"is_full_screen"`
  78. CoverURL string `json:"cover_url"`
  79. CoverWidth int64 `json:"cover_width"`
  80. CoverHeight int64 `json:"cover_height"`
  81. HomeImgURL string `json:"home_img_url" form:"home_img_url"`
  82. HomeImgWidth int64 `json:"home_img_width" form:"home_img_width"`
  83. HomeImgHeight int64 `json:"home_img_height" form:"home_img_height"`
  84. }
  85. //VideoUploadProcess .
  86. type VideoUploadProcess struct {
  87. SVID int64 `json:"svid"`
  88. Title string `json:"Title"`
  89. Mid int64 `json:"mid"`
  90. UploadStatus int64 `json:"upload_status"`
  91. RetryTimes int64 `json:"retry_times"`
  92. HomeImgURL string `json:"home_img_url"`
  93. HomeImgWidth int64 `json:"home_img_width"`
  94. HomeImgHeight int64 `json:"home_img_height"`
  95. }
  96. //VideoRepository ...
  97. type VideoRepository struct {
  98. AVID int64 `json:"avid"`
  99. CID int64 `json:"cid"`
  100. MID int64 `json:"mid"`
  101. SVID int64 `json:"svid"`
  102. From int64 `json:"from"`
  103. Title string `json:"title"`
  104. Content string `json:"content"`
  105. Original int64 `json:"original"`
  106. Duration int64 `json:"duration"`
  107. Pubtime string `json:"pubtime"`
  108. TID int64 `json:"tid"`
  109. SubTID int64 `json:"sub_tid"`
  110. IsFullScreen int64 `json:"is_full_screen"`
  111. CoverURL string `json:"cover_url"`
  112. CoverWidth string `json:"cover_width"`
  113. CoverHeight string `json:"cover_height"`
  114. HomeImgURL string `json:"home_img_url"`
  115. HomeImgWidth int64 `json:"home_img_width"`
  116. HomeImgHeight int64 `json:"home_img_height"`
  117. SyncStatus int64 `json:"sync_status"`
  118. }
  119. // VideoStHive 视频hive统计数据
  120. type VideoStHive struct {
  121. SVID int64 `json:"svid"`
  122. Play int64 `json:"play"`
  123. Report int64 `json:"report"`
  124. DurationAll int64 `json:"duration_all"`
  125. Access int64 `json:"access"`
  126. Reply int64 `json:"reply"`
  127. Fav int64 `json:"fav"`
  128. Likes int64 `json:"likes"`
  129. Coin int64 `json:"coin"`
  130. Share int64 `json:"share"`
  131. Subtitles int64 `json:"subtitles"`
  132. ElecPay int64 `json:"elec_pay"`
  133. ElecNum int64 `json:"elec_num"`
  134. ElecUser int64 `json:"elec_user"`
  135. DurationDaily int64 `json:"duration_daily"`
  136. ShareDaily int64 `json:"share_daily"`
  137. PlayDaily int64 `json:"play_daily"`
  138. FavDaily int64 `json:"fav_daily"`
  139. ReplyDaily int64 `json:"reply_daily"`
  140. SubtitlesDaily int64 `json:"subtitles_daily"`
  141. LikesDaily int64 `json:"likes_daily"`
  142. }
  143. //VideoHiveInfo struct
  144. type VideoHiveInfo struct {
  145. AVID int64 `json:"avid"`
  146. CID int64 `json:"cid"`
  147. MID int64 `json:"mid"`
  148. Title string `json:"title"`
  149. Content string `json:"content"`
  150. Original int16 `json:"original"`
  151. Report int64 `json:"report"`
  152. DurationAll int64 `json:"duration_all"`
  153. Play int64 `json:"play"`
  154. PlayGuest int64 `json:"play_guest"`
  155. PlayFans int64 `json:"play_fans"`
  156. Access int64 `json:"access"`
  157. Reply int64 `json:"reply"`
  158. Fav int64 `json:"fav"`
  159. Likes int64 `json:"likes"`
  160. Coin int64 `json:"coin"`
  161. Share int64 `json:"share"`
  162. Danmu int64 `json:"danmu"`
  163. ElecPay int64 `json:"elec_pay"`
  164. ElecNum int64 `json:"elec_num"`
  165. ElecUser int64 `json:"elec_user"`
  166. Duration int64 `json:"duration"`
  167. State int64 `json:"state"`
  168. Tag string `json:"tag"`
  169. ShareDaily int64 `json:"share_daily"`
  170. PlayDaily int64 `json:"play_daily"`
  171. FavDaily int64 `json:"fav_daily"`
  172. ReplyDaily int64 `json:"reply_daily"`
  173. DanmuDaily int64 `json:"danmu_daily"`
  174. LikesDaily int64 `json:"likes_daily"`
  175. DurationDaily int64 `json:"duration_daily"`
  176. Pubtime string `json:"pubtime"`
  177. LogDate string `json:"log_date"`
  178. TID int64 `json:"tid"`
  179. SubTID int64 `json:"sub_tid"`
  180. Ctime string `json:"ctime"`
  181. }
  182. //UserBase .
  183. type UserBase struct {
  184. Mid int64 `json:"mid"`
  185. Name string `json:"uname"`
  186. Sex string `json:"sex"`
  187. Face string `json:"face"`
  188. Sign string `json:"sign"`
  189. Rank int32 `json:"rank"`
  190. }
  191. // VideoBVC 视频转码信息
  192. type VideoBVC struct {
  193. SVID int64 `json:"svid"`
  194. Path string `json:"path"`
  195. ResolutionRetio string `json:"resolution_retio"`
  196. CodeRate int64 `json:"code_rate"`
  197. VideoCode string `json:"video_code"`
  198. Duration int64 `json:"duration"`
  199. FileSize int64 `json:"file_size"`
  200. }
  201. // SvStInfo 视频统计
  202. type SvStInfo struct {
  203. SVID int64 `json:"svid"`
  204. Play int64 `json:"view"` //和上层的play重复,因此改成view
  205. Subtitles int64 `json:"subtitles"`
  206. Like int64 `json:"like"`
  207. Share int64 `json:"share"`
  208. Reply int64 `json:"reply"`
  209. Report int64 `json:"report"`
  210. }