comment.go 5.4 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132
  1. package response
  2. import (
  3. "github.com/rdlucklib/rdluck_tools/paging"
  4. "time"
  5. )
  6. type CommentReportItem struct {
  7. ReportId int `description:"报告Id"`
  8. ClassifyIdFirst int `description:"一级分类id"`
  9. ClassifyNameFirst string `description:"一级分类名称"`
  10. ClassifyIdSecond int `description:"二级分类id"`
  11. ClassifyNameSecond string `description:"二级分类名称"`
  12. Title string `description:"标题"`
  13. CreateTime string `description:"创建时间"`
  14. State int `description:"1:未发布,2:已发布"`
  15. PublishTime string `description:"发布时间"`
  16. ReportChapterList []*CommentReportChapterItem `description:"章节列表"`
  17. CommentNum int `description:"留言数量"`
  18. CommentUnreadNum int `description:"未读留言数量"`
  19. }
  20. type CommentReportResp struct {
  21. List []*CommentReportItem
  22. Paging *paging.PagingItem
  23. }
  24. type CommentReportChapterItem struct {
  25. ReportChapterId int `description:"报告章节Id"`
  26. Title string `description:"标题"`
  27. TypeName string `description:"品种名称"`
  28. CommentNum int `description:"留言数量"`
  29. CommentUnreadNum int `description:"未读留言数量"`
  30. PublishTime string `description:"发布时间"`
  31. CreateTime string `description:"创建时间"`
  32. }
  33. type CommentListResp struct {
  34. List []*CommentItemResp
  35. Paging *paging.PagingItem
  36. StatNum CommentStatNum
  37. }
  38. type CommentItemResp struct {
  39. CommentId uint64 `description:"留言ID" `
  40. ReportId int `description:"报告ID"`
  41. UserId uint64 `description:"用户id" `
  42. Content string `description:"留言内容" `
  43. IsTop int8 `description:"是否置顶(0-未置顶,1-置顶)"`
  44. IsHot int8 `description:"是否设置精选(0-未设置,1-已设置)"`
  45. HotTopTime time.Time `description:"设置精选或者设置置顶的时间" `
  46. SourceAgent int `description:"留言入口来源,1:小程序,2:小程序pc,4:web pc"`
  47. NickName string `description:"用户昵称" `
  48. HeadImgUrl string `description:"用户头像"`
  49. CreateTime string `description:"留言创建时间"`
  50. Enabled int8 `description:"是否有效, 0-无效留言 1-有效留言"`
  51. ReplyList []*ReplyItem
  52. }
  53. type ReplyItem struct {
  54. CommentId uint64 `description:"留言ID"`
  55. AdminId uint64 `description:"发布留言回复的管理员ID"`
  56. AdminName string `description:"系统昵称"`
  57. AdminImgUrl string `description:"系统头像"`
  58. Content string `description:"回复内容"`
  59. ReplyCommentId uint64 `description:"回复的留言ID"`
  60. CreateTime string `description:"留言创建时间"`
  61. }
  62. type CommentStatNum struct {
  63. TopNum int64 `description:"置顶数量"`
  64. HotNum int64 `description:"精选数量"`
  65. AllNum int64 `description:"全部总数"`
  66. }
  67. type CommentTopResp struct {
  68. CommentId int64 `description:"留言ID"`
  69. IsTop int8 `description:"是否置顶(0-未置顶,1-置顶)"`
  70. }
  71. type CommentHotResp struct {
  72. CommentId int64 `description:"留言ID"`
  73. IsHot int8 `description:"是否设置精选(0-未设置,1-已设置)"`
  74. }
  75. // 研报 用户未读的留言记录
  76. type UnReadComment struct {
  77. CommentId uint64 `orm:"column(comment_id);pk;" description:"留言ID"`
  78. UserId uint64 `orm:"column(user_id)" description:"用户id"`
  79. ReportId int `orm:"column(report_id)" description:"报告ID"`
  80. ReportChapterId int `orm:"column(report_chapter_id)" description:"报告章节ID"`
  81. Content string `orm:"column(content)" description:"留言内容"`
  82. CreateTime time.Time `orm:"column(create_time)" description:"创建时间"`
  83. ModifyTime time.Time `orm:"column(modify_time)" description:"修改时间"`
  84. }
  85. // AllCommentResp 所有未读留言数据
  86. type AllCommentResp struct {
  87. List []CommentItemResp `description:"留言数据"`
  88. IsShow bool `description:"是否展示该图标"`
  89. }
  90. type ProductCommentItemResp struct {
  91. CommentId int `description:"研报留言ID或者问答社区评论ID"`
  92. UserId int `description:"用户ID"`
  93. ReportId int `description:"报告Id"`
  94. ReportChapterId int `description:"报告章节Id"`
  95. CommunityQuestionId int `description:"问答ID"`
  96. Content string `description:"留言内容"`
  97. CreateTime string `description:"创建时间"`
  98. ProductType int `description:"留言板块ID: 1-研报留言,2-问答社区评论"`
  99. ProductName string `description:"板块名称"`
  100. IsTop int8 `description:"是否置顶(0-未置顶,1-置顶)"`
  101. RealName string `description:"用户姓名"`
  102. CompanyId int
  103. CompanyName string
  104. CompanyStatus string
  105. Title string
  106. SellerName string
  107. ReplyList []*ReplyItem
  108. }
  109. // ProductCommentResp 社区问答评论列表返回数据
  110. type ProductCommentResp struct {
  111. List []*ProductCommentItemResp
  112. Paging *paging.PagingItem
  113. }
  114. // OtherProductTypeListResp 其他分产品类型
  115. type OtherProductTypeListResp struct {
  116. ProductType int `description:"产品类型"`
  117. ProductName string `description:"产品名称"`
  118. }