park.proto 2.5 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137
  1. syntax = "proto3";
  2. // package声明符,用来防止不同的消息类型有命名冲突
  3. package pb_v1;
  4. // 用于生成指定语言go的包名称
  5. option go_package = "property-applete-gateway/pb/v1";
  6. message ParkAddRequest {
  7. string park_number = 1;
  8. string park_name = 2;
  9. string comment = 3;
  10. int64 garden_id = 4;
  11. int32 park_type = 5;
  12. }
  13. message ParkAddReply {
  14. int64 id = 1;
  15. }
  16. message ParkUpdateRequest {
  17. int64 id = 1;
  18. int64 garden_id = 2;
  19. string park_number = 3;
  20. string park_name = 4;
  21. string comment = 5;
  22. int32 park_type = 6;
  23. }
  24. message ParkUpdateReply {
  25. ParkUpdateRequest origin = 1;
  26. }
  27. message ParkDelRequest {
  28. int64 id = 1;
  29. int64 garden_id = 2;
  30. }
  31. message ParkDelReply {
  32. ParkUpdateRequest origin = 1;
  33. }
  34. message ParkListRequest {
  35. int64 garden_id = 1;
  36. }
  37. message ParkItem {
  38. int64 id = 1;
  39. int64 garden_id = 2;
  40. string park_number = 3;
  41. string park_name = 4;
  42. string comment = 5;
  43. int64 space_count = 6;
  44. string created_at = 7;
  45. int32 park_type = 8;
  46. }
  47. message ParkListReply {
  48. repeated ParkItem list = 1;
  49. }
  50. message ParkSpaceAddRequest {
  51. string space_number = 1;
  52. double space_area = 2;
  53. string comment = 3;
  54. int64 park_id = 4;
  55. int32 space_type = 5;
  56. int64 garden_id = 6;
  57. int64 house_id = 7;
  58. }
  59. message ParkSpaceAddReply {
  60. int64 id = 1;
  61. }
  62. message ParkSpaceUpdateRequest {
  63. string space_number = 1;
  64. double space_area = 2;
  65. string comment = 3;
  66. int64 park_id = 4;
  67. int32 space_type = 5;
  68. int64 id = 6;
  69. int64 garden_id = 7;
  70. int64 house_id = 8;
  71. }
  72. message ParkSpaceUpdateReply {
  73. ParkSpaceUpdateRequest origin = 1;
  74. }
  75. message ParkSpaceDelRequest {
  76. int64 id = 1;
  77. int64 garden_id = 2;
  78. }
  79. message ParkSpaceDelReply {
  80. ParkSpaceUpdateRequest origin = 1;
  81. }
  82. message ParkSpaceListRequest {
  83. int64 park_id = 1;
  84. int64 page = 2;
  85. int64 page_size = 3;
  86. int64 garden_id = 4;
  87. int32 space_type = 5;
  88. string space_number = 6;
  89. }
  90. message ParkSpaceItem {
  91. string space_number = 1;
  92. double space_area = 2;
  93. string comment = 3;
  94. int64 park_id = 4;
  95. int32 space_type = 5;
  96. int64 id = 6;
  97. string created_at = 7;
  98. string park_number = 8;
  99. string park_name = 9;
  100. int32 park_type = 10;
  101. int64 house_id = 11;
  102. string house_name = 12;
  103. // 1 空闲 2 已售 3 已租
  104. int32 status = 13;
  105. }
  106. message ParkSpaceListReply {
  107. int64 total = 1;
  108. int64 page = 2;
  109. repeated ParkSpaceItem list = 3;
  110. }