feed.go 2.0 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263
  1. package v1
  2. import (
  3. "go-common/app/interface/bbq/app-bbq/model"
  4. video "go-common/app/service/bbq/video/api/grpc/v1"
  5. bm "go-common/library/net/http/blademaster"
  6. )
  7. // HotReply 热评
  8. type HotReply struct {
  9. Hots []*model.Reply `json:"hots,omitempty"`
  10. }
  11. // SvDetail one video detail
  12. type SvDetail struct {
  13. VideoResponse
  14. CursorValue string `json:"cursor_value"` // 透传给客户端,标记在列表中的位置
  15. ElapsedTime int64 `json:"elapsed_time"` // 从发布到现在时间
  16. HotReply HotReply `json:"hot_reply"` // 热评
  17. }
  18. // FeedListRequest feed/list request
  19. type FeedListRequest struct {
  20. MID int64
  21. Device *bm.Device
  22. BUVID string
  23. Mark string `json:"mark" form:"mark"`
  24. Page int `json:"page" form:"page" validate:"required"`
  25. Qn int64 `json:"qn" form:"qn" validate:"required"`
  26. }
  27. // FeedListResponse feed/list request
  28. type FeedListResponse struct {
  29. Mark string `json:"mark" form:"mark"`
  30. HasMore bool `json:"has_more" form:"has_more"`
  31. List []*SvDetail `json:"list,omitempty" form:"list"`
  32. RecList []*SvDetail `json:"rec_list,omitempty" form:"list"`
  33. }
  34. // FeedUpdateNumResponse feed/list request
  35. type FeedUpdateNumResponse struct {
  36. Num int64 `json:"num"`
  37. }
  38. // SpaceSvListRequest feed/list request
  39. // 所有在空间中的视频列表,都复用该请求,同理回包
  40. type SpaceSvListRequest struct {
  41. MID int64
  42. Size int
  43. Device *bm.Device
  44. DeviceID string `json:"device_id" form:"device_id"`
  45. Qn int64 `json:"qn" form:"qn" validate:"required"`
  46. UpMid int64 `json:"up_mid" form:"up_mid" validate:"required"`
  47. CursorPrev string `json:"cursor_prev" form:"cursor_prev"` // CursorValue
  48. CursorNext string `json:"cursor_next" form:"cursor_next"`
  49. }
  50. // SpaceSvListResponse feed/list request
  51. type SpaceSvListResponse struct {
  52. HasMore bool `json:"has_more" form:"has_more"`
  53. List []*SvDetail `json:"list,omitempty" form:"list"`
  54. PrepareList []*video.UploadingVideo `json:"prepare_list,omitempty"`
  55. }