comment.go 2.5 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687
  1. package v1
  2. import (
  3. "go-common/app/interface/bbq/app-bbq/model"
  4. )
  5. //CommentList 评论列表
  6. type CommentList struct {
  7. OReply *model.CursorRes `json:"oreply,omitempty"`
  8. }
  9. //CommentCursorReq 游标获取评论请求参数
  10. type CommentCursorReq struct {
  11. SvID int64 `form:"oid" validate:"gt=0,required"`
  12. RpID int64 `form:"rpid"`
  13. Sort int16 `form:"sort"`
  14. MaxID int64 `form:"max_id"`
  15. MinID int64 `form:"min_id"`
  16. Size int64 `form:"size" validate:"min=0"`
  17. Plat int64 `form:"plat"`
  18. Build int64 `form:"build"`
  19. Access string `form:"access_key"`
  20. Type int64
  21. MID int64
  22. }
  23. //CommentAddReq 发表评论请求参数
  24. type CommentAddReq struct {
  25. SvID int64 `form:"oid" validate:"gt=0,required"`
  26. Root int64 `form:"root"`
  27. Parent int64 `form:"parent"`
  28. At string `form:"at"`
  29. Message string `form:"message" validate:"required"`
  30. Plat int16 `form:"plat"`
  31. Device string `form:"device"`
  32. Code string `form:"code"`
  33. Type int64
  34. AccessKey string
  35. }
  36. //CommentLikeReq 评论点怎/取消请求参数
  37. type CommentLikeReq struct {
  38. SvID int64 `form:"oid" validate:"gt=0,required"`
  39. RpID int64 `form:"rpid" validate:"gt=0,required"`
  40. Action int16 `form:"action" validate:"min=0"`
  41. Type int64
  42. AccessKey string
  43. }
  44. //CommentReportReq 评论举报参数
  45. type CommentReportReq struct {
  46. SvID int64 `form:"oid" validate:"required"`
  47. RpID int64 `form:"rpid" validate:"gt=0,required"`
  48. Reason int16 `form:"reason" validate:"min=0"`
  49. Content string `form:"content" validate:"min=2,max=200"`
  50. Type int64
  51. AccessKey string
  52. }
  53. //CommentListReq 评论列表请求参数
  54. type CommentListReq struct {
  55. SvID int64 `form:"oid" validate:"gt=0,required"`
  56. Sort int16 `form:"sort"`
  57. NoHot int16 `form:"nohot"`
  58. Pn int64 `form:"pn"`
  59. Ps int64 `form:"ps"`
  60. Plat int64 `form:"plat"`
  61. Build int64 `form:"build"`
  62. Access string `form:"access_key"`
  63. Type int64
  64. MID int64
  65. }
  66. //CommentSubCursorReq 游标获取子回复及子评论定位参数
  67. type CommentSubCursorReq struct {
  68. SvID int64 `form:"oid" validate:"gt=0,required"`
  69. Sort int16 `form:"sort" validate:"min=0"`
  70. Root int64 `form:"root" validate:"gt=0,required"`
  71. RpID int64 `form:"rpid" validate:"min=0"`
  72. Size int64 `form:"size" validate:"min=0"`
  73. MaxID int64 `form:"max_id" validate:"min=0"`
  74. MinID int64 `form:"min_id" validate:"min=0"`
  75. Type int64
  76. Plat int64 `form:"plat"`
  77. Build int64 `form:"build"`
  78. Access string `form:"access_key"`
  79. }