neighbor.proto 4.8 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156157158159160161162163164165166167168169170171172173174175176177178179180181182183184185186187188189190191192193194195196197198199200201202203204205206207208209210211212213214215216217218219220221222223224225226227228229230231232233234235236237238239240241242243
  1. syntax = "proto3";
  2. // package声明符,用来防止不同的消息类型有命名冲突
  3. package pb_v1;
  4. // 用于生成指定语言go的包名称
  5. option go_package = "property-system-gateway/pb/v1";
  6. // 社区邻里分类
  7. message NeighborClassAddRequest {
  8. int64 garden_id = 1;
  9. // 分类名
  10. string class_name = 2;
  11. // 分类图标
  12. string class_pic = 3;
  13. // true 开启 false 禁用
  14. bool enable = 4;
  15. }
  16. message NeighborClassAddReply {
  17. }
  18. message NeighborClassDelRequest {
  19. int64 garden_id = 1;
  20. int64 id = 2;
  21. }
  22. message NeighborClassDelReply {
  23. }
  24. message NeighborClassUpdateRequest {
  25. int64 garden_id = 1;
  26. int64 id = 2;
  27. string class_name = 3;
  28. string class_pic = 4;
  29. bool enable = 5;
  30. }
  31. message NeighborClassUpdateReply {
  32. }
  33. message NeighborClassItem {
  34. int64 id = 1;
  35. string class_name = 2;
  36. string class_pic = 3;
  37. bool enable = 4;
  38. // 分类下的文章总数
  39. int64 article_count = 5;
  40. // 分类创建时间
  41. string created_at = 6;
  42. // 分类结束时间
  43. string updated_at = 7;
  44. }
  45. message NeighborClassListRequest {
  46. int64 garden_id = 1;
  47. string class_name = 2;
  48. int64 page = 3;
  49. int64 page_size = 4;
  50. }
  51. message NeighborClassListReply {
  52. int64 page = 1;
  53. int64 total = 2;
  54. repeated NeighborClassItem list = 3;
  55. }
  56. // 社区邻里文章
  57. message NeighborArticleAddRequest {
  58. int64 garden_id = 1;
  59. // 文章标题
  60. string title = 2;
  61. // 文章类容
  62. string content = 3;
  63. // 文章图片
  64. repeated string pics = 4;
  65. // 分类id
  66. int64 class_id = 5;
  67. int64 uid = 6;
  68. string user_icon = 7;
  69. }
  70. message NeighborArticleAddReply {
  71. }
  72. message NeighborArticleDelRequest {
  73. int64 garden_id = 1;
  74. int64 id = 2;
  75. int64 uid = 3;
  76. bool admin = 4;
  77. }
  78. message NeighborArticleDelReply {
  79. }
  80. message NeighborArticleUpdateRequest {
  81. int64 garden_id = 1;
  82. string title = 2;
  83. string content = 3;
  84. repeated string pics = 4;
  85. int64 id = 5;
  86. int64 uid = 6;
  87. }
  88. message NeighborArticleUpdateReply {
  89. }
  90. message NeighborArticleItem {
  91. int64 id = 1;
  92. string title = 2;
  93. string content = 3;
  94. repeated string pics = 4;
  95. // 文章点赞数
  96. int64 likes = 5;
  97. // 评论总数
  98. int64 comment_count = 6;
  99. string created_at = 7;
  100. string updated_at = 8;
  101. // 分类id
  102. int64 class_id = 9;
  103. // true 本人已点赞 false 本人未点赞
  104. bool like = 10;
  105. int64 uid = 11;
  106. string user_name = 12;
  107. string user_phone = 13;
  108. // 用户头像
  109. string user_icon = 14;
  110. // 是否是本人发布的文章
  111. bool owner = 15;
  112. }
  113. message NeighborArticleListRequest {
  114. int64 garden_id = 1;
  115. int64 page = 2;
  116. int64 page_size = 3;
  117. string title = 4;
  118. int64 class_id = 5;
  119. int64 uid = 6;
  120. }
  121. message NeighborArticleListReply {
  122. int64 page = 1;
  123. int64 total = 2;
  124. repeated NeighborArticleItem list = 3;
  125. }
  126. message NeighborLikeRequest {
  127. int64 garden_id = 1;
  128. int64 uid = 2;
  129. // 点赞id
  130. int64 like_id = 3;
  131. // 点赞类型 1 文章 2 评论
  132. int32 like_type = 4;
  133. // true 点赞 false 取消点赞
  134. bool like = 5;
  135. }
  136. message NeighborLikeReply {
  137. }
  138. // 社区邻里评论
  139. message NeighborCommentAddRequest {
  140. int64 garden_id = 1;
  141. // pid 和 article_id 二选一, 当为文章评论使用article_id, 当为评论添加子评论使用pid
  142. int64 pid = 4;
  143. int64 article_id = 5;
  144. string content = 6;
  145. repeated string pics = 7;
  146. int64 uid = 8;
  147. string user_icon = 9;
  148. }
  149. message NeighborCommentAddReply {
  150. }
  151. message NeighborCommentDelRequest {
  152. int64 garden_id = 1;
  153. int64 id = 2;
  154. int64 uid = 3;
  155. bool admin = 4;
  156. }
  157. message NeighborCommentDelReply {
  158. }
  159. message NeighborCommentUpdateRequest {
  160. int64 garden_id = 1;
  161. string content = 2;
  162. int64 uid = 3;
  163. int64 id = 4;
  164. repeated string pics = 5;
  165. }
  166. message NeighborCommentUpdateReply {
  167. }
  168. message NeighborCommentListRequest {
  169. int64 garden_id = 1;
  170. int64 article_id = 2;
  171. int64 comment_id = 3;
  172. int64 page = 4;
  173. int64 page_size = 5;
  174. int64 uid = 6;
  175. }
  176. message NeighborCommentItem {
  177. int64 id = 1;
  178. string content = 2;
  179. int64 uid = 3;
  180. string user_name = 4;
  181. string user_phone = 5;
  182. // 用户头像
  183. string user_icon = 6;
  184. repeated string pics = 7;
  185. // 子评论数
  186. int64 sub_comment_count = 8;
  187. // 点赞数
  188. int64 likes = 9;
  189. // 本人是否点赞
  190. bool like = 10;
  191. string created_at = 11;
  192. string updated_at = 12;
  193. // 是否是本人发布的文章
  194. bool owner = 13;
  195. }
  196. message NeighborCommentListReply {
  197. int64 total = 1;
  198. int64 page = 2;
  199. repeated NeighborCommentItem list = 3;
  200. }