announcement.proto 1.2 KB

1234567891011121314151617181920212223242526272829303132333435363738394041424344454647484950515253545556575859
  1. syntax = "proto3";
  2. // package声明符,用来防止不同的消息类型有命名冲突
  3. package pb_v1;
  4. // 用于生成指定语言go的包名称
  5. option go_package = "property-system-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. int64 uid = 4;
  35. }
  36. message AnnouncementItem {
  37. int64 id = 1;
  38. string title = 2;
  39. string content = 3;
  40. string created_at = 4;
  41. int64 read_count = 5;
  42. bool read = 6;
  43. }
  44. message AnnouncementListReply {
  45. int64 page = 1;
  46. int64 total = 2;
  47. repeated AnnouncementItem list = 3;
  48. }