neighbor.go 4.7 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156157158159160161162163164165166167168169170171172173174175176177178179180181182183184185186187
  1. package v1
  2. import (
  3. "property-household-gateway/param/base"
  4. pb_v1 "property-household-gateway/pb/v1"
  5. )
  6. type NeighborClassListQuery struct {
  7. GardenId int64 `form:"garden_id" json:"garden_id"`
  8. Page int64 `form:"page" json:"page"`
  9. PageSize int64 `form:"page_size" json:"page_size"`
  10. ClassName string `form:"class_name" json:"class_name"`
  11. }
  12. type NeighborClassListRequest struct {
  13. base.Header
  14. NeighborClassListQuery
  15. }
  16. type NeighborClassListResponse struct {
  17. base.Result
  18. Data pb_v1.NeighborClassListReply `json:"data"`
  19. }
  20. type NeighborArticleAddBody struct {
  21. GardenId int64 `form:"garden_id" json:"garden_id"`
  22. // 文章标题
  23. Title string `form:"title" json:"title"`
  24. // 文章类容
  25. Content string `form:"content" json:"content"`
  26. // 文章图片
  27. Pics []string `form:"pics" json:"pics"`
  28. // 分类id
  29. ClassId int64 `protobuf:"varint,5,opt,name=class_id,json=classId,proto3" json:"class_id"`
  30. //Uid int64 `protobuf:"varint,6,opt,name=uid,proto3" json:"uid"`
  31. //UserIcon string `protobuf:"bytes,7,opt,name=user_icon,json=userIcon,proto3" json:"user_icon"`
  32. }
  33. type NeighborArticleAddRequest struct {
  34. base.Header
  35. NeighborArticleAddBody
  36. }
  37. type NeighborArticleAddResponse struct {
  38. base.Result
  39. }
  40. type NeighborArticleUpdateBody struct {
  41. GardenId int64 `form:"garden_id" json:"garden_id"`
  42. // 文章标题
  43. Title string `form:"title" json:"title"`
  44. // 文章类容
  45. Content string `form:"content" json:"content"`
  46. // 文章图片
  47. Pics []string `form:"pics" json:"pics"`
  48. Id int64 `form:"id" json:"id"`
  49. }
  50. type NeighborArticleUpdateRequest struct {
  51. base.Header
  52. NeighborArticleUpdateBody
  53. }
  54. type NeighborArticleUpdateResponse struct {
  55. base.Result
  56. }
  57. type NeighborArticleDelQuery struct {
  58. GardenId int64 `form:"garden_id" json:"garden_id"`
  59. Id int64 `form:"id" json:"id"`
  60. }
  61. type NeighborArticleDelRequest struct {
  62. base.Header
  63. NeighborArticleDelQuery
  64. }
  65. type NeighborArticleDelResponse struct {
  66. base.Result
  67. }
  68. type NeighborArticleListQuery struct {
  69. GardenId int64 `form:"garden_id" json:"garden_id"`
  70. Page int64 `form:"page" json:"page"`
  71. PageSize int64 `form:"page_size" json:"page_size"`
  72. Title string `form:"title" json:"title"`
  73. IsMe bool `form:"is_me" json:"is_me"`
  74. }
  75. type NeighborArticleListRequest struct {
  76. base.Header
  77. NeighborArticleListQuery
  78. }
  79. type NeighborArticleListResponse struct {
  80. base.Result
  81. Data pb_v1.NeighborArticleListReply `json:"data"`
  82. }
  83. type NeighborCommentAddBody struct {
  84. GardenId int64 `form:"garden_id" json:"garden_id"`
  85. // 文章类容
  86. Content string `form:"content" json:"content"`
  87. // 文章图片
  88. Pics []string `form:"pics" json:"pics"`
  89. // pid 和 article_id 二选一, 当为文章评论使用article_id, 当为评论添加子评论使用pid(即父评论id)
  90. Pid int64 `form:"pid" json:"pid"`
  91. ArticleId int64 `form:"article_id" json:"article_id"`
  92. }
  93. type NeighborCommentAddRequest struct {
  94. base.Header
  95. NeighborCommentAddBody
  96. }
  97. type NeighborCommentAddResponse struct {
  98. base.Result
  99. }
  100. type NeighborCommentUpdateBody struct {
  101. GardenId int64 `form:"garden_id" json:"garden_id"`
  102. // 文章类容
  103. Content string `form:"content" json:"content"`
  104. // 文章图片
  105. Pics []string `form:"pics" json:"pics"`
  106. Id int64 `form:"id" json:"id"`
  107. }
  108. type NeighborCommentUpdateRequest struct {
  109. base.Header
  110. NeighborCommentUpdateBody
  111. }
  112. type NeighborCommentUpdateResponse struct {
  113. base.Result
  114. }
  115. type NeighborCommentDelQuery struct {
  116. GardenId int64 `form:"garden_id" json:"garden_id"`
  117. Id int64 `form:"id" json:"id"`
  118. }
  119. type NeighborCommentDelRequest struct {
  120. base.Header
  121. NeighborCommentDelQuery
  122. }
  123. type NeighborCommentDelResponse struct {
  124. base.Result
  125. }
  126. type NeighborCommentListQuery struct {
  127. GardenId int64 `form:"garden_id" json:"garden_id"`
  128. Page int64 `form:"page" json:"page"`
  129. PageSize int64 `form:"page_size" json:"page_size"`
  130. Pid int64 `form:"pid" json:"pid"`
  131. ArticleId int64 `form:"article_id" json:"article_id"`
  132. }
  133. type NeighborCommentListRequest struct {
  134. base.Header
  135. NeighborCommentListQuery
  136. }
  137. type NeighborCommentListResponse struct {
  138. base.Result
  139. Data pb_v1.NeighborCommentListReply `json:"data"`
  140. }
  141. type NeighborLikeBody struct {
  142. GardenId int64 `form:"garden_id" json:"garden_id"`
  143. // 点赞id(like_type为1时代表文章id,like_type为2时代表评论id)
  144. LikeId int64 `form:"like_id" json:"like_id"`
  145. // 点赞类型 1 文章 2 评论
  146. LikeType int32 `form:"like_type" json:"like_type"`
  147. // true 点赞 false 撤销点赞(前端应做相应控制,如果目标已点赞则不能点赞只能撤销,如果目标未点赞则只能点赞,不能撤销)
  148. Like bool `form:"like" json:"like"`
  149. }
  150. type NeighborLikeRequest struct {
  151. base.Header
  152. NeighborLikeBody
  153. }
  154. type NeighborLikeResponse struct {
  155. base.Result
  156. }