announcement.proto 1.0 KB

12345678910111213141516171819202122232425262728293031323334353637383940414243444546474849505152535455
  1. syntax = "proto3";
  2. // package声明符,用来防止不同的消息类型有命名冲突
  3. package pb_v1;
  4. // 用于生成指定语言go的包名称
  5. option go_package = "property-applete-gateway/pb/v1";
  6. message AnnouncementAddRequest {
  7. int64 garden_id = 1;
  8. string title = 2;
  9. string content = 3;
  10. }
  11. message AnnouncementAddReply {
  12. int64 id = 1;
  13. }
  14. message AnnouncementUpdateRequest {
  15. int64 garden_id = 1;
  16. string title = 2;
  17. string content = 3;
  18. int64 id = 4;
  19. }
  20. message AnnouncementUpdateReply {
  21. AnnouncementUpdateRequest origin = 1;
  22. }
  23. message AnnouncementDelRequest {
  24. int64 garden_id = 1;
  25. int64 id = 2;
  26. }
  27. message AnnouncementDelReply {
  28. AnnouncementUpdateRequest origin = 1;
  29. }
  30. message AnnouncementListRequest {
  31. int64 page = 1;
  32. int64 page_size = 2;
  33. int64 garden_id = 3;
  34. }
  35. message AnnouncementItem {
  36. int64 id = 1;
  37. string title = 2;
  38. string content = 3;
  39. }
  40. message AnnouncementListReply {
  41. int64 page = 1;
  42. int64 total = 2;
  43. repeated AnnouncementItem list = 3;
  44. }