garden.proto 8.2 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156157158159160161162163164165166167168169170171172173174175176177178179180181182183184185186187188189190191192193194195196197198199200201202203204205206207208209210211212213214215216217218219220221222223224225226227228229230231232233234235236237238239240241242243244245246247248249250251252253254255256257258259260261262263264265266267268269270271272273274275276277278279280281282283284285286287288289290291292293294295296297298299300301302303304305306307308309310311312313314315316317318319320321322323324325326327328329330331332333334335336337338339340341342343344345346347348349350351352353354355356357358359360361362363364365366367368369370371372373374375376377378379380381382383384385386387388389390391392393394395396397398399400401402403404405406407408409410411412413414415416417418419420421422423424425426427428429430431432
  1. syntax = "proto3";
  2. // package声明符,用来防止不同的消息类型有命名冲突
  3. package pb_v1;
  4. // 用于生成指定语言go的包名称
  5. option go_package = "property-household-gateway/pb/v1";
  6. message BuildingAddRequest {
  7. // 小区id
  8. int64 garden_id = 1;
  9. // 楼栋编号
  10. string building_number = 2;
  11. // 楼栋名
  12. string building_name = 3;
  13. // 楼栋建筑面积
  14. double building_area = 4;
  15. // 楼栋使用面积
  16. double building_used_area = 5;
  17. // 备注
  18. string comment = 6;
  19. }
  20. message BuildingAddReply {
  21. int64 id = 1;
  22. }
  23. message BuildingUpdateRequest {
  24. // id
  25. int64 id = 1;
  26. // 楼栋编号
  27. string building_number = 2;
  28. // 楼栋名
  29. string building_name = 3;
  30. // 楼栋建筑面积
  31. double building_area = 4;
  32. // 楼栋使用面积
  33. double building_used_area = 5;
  34. // 备注
  35. string comment = 6;
  36. int64 garden_id = 7;
  37. }
  38. message BuildingUpdateReply {
  39. BuildingUpdateRequest origin = 1;
  40. }
  41. message BuildingDelRequest {
  42. int64 id = 1;
  43. int64 garden_id = 2;
  44. }
  45. message BuildingDelReply {
  46. BuildingUpdateRequest origin = 1;
  47. }
  48. message BuildingListRequest {
  49. string building_number = 1;
  50. int64 page = 2;
  51. int64 page_size = 3;
  52. int64 garden_id = 4;
  53. }
  54. message BuildingItem {
  55. // id
  56. int64 id = 1;
  57. // 楼栋编号
  58. string building_number = 2;
  59. // 楼栋名
  60. string building_name = 3;
  61. // 楼栋建筑面积
  62. double building_area = 4;
  63. // 楼栋使用面积
  64. double building_used_area = 5;
  65. // 备注
  66. string comment = 6;
  67. int64 unit_count = 7;
  68. }
  69. message BuildingListReply {
  70. int64 total = 1;
  71. int64 page = 2;
  72. repeated BuildingItem list = 3;
  73. }
  74. message BuildingManagerListRequest {
  75. int64 garden_id = 1;
  76. int64 building_id = 2;
  77. int64 house_id = 3;
  78. }
  79. message BuildingManagerItem {
  80. int64 id = 1;
  81. int64 manager_uid = 2;
  82. // 姓名
  83. string name = 3;
  84. string phone = 4;
  85. // 账号
  86. string user_name = 5;
  87. string openim_id = 6;
  88. }
  89. message BuildingManagerListReply {
  90. repeated BuildingManagerItem list = 1;
  91. }
  92. message UnitAddRequest {
  93. int64 garden_id = 1;
  94. // 楼栋id
  95. int64 building_id = 2;
  96. // 单元编号
  97. int64 unit_number = 3;
  98. // 单元名
  99. string unit_name = 4;
  100. // 楼层数
  101. int64 unit_layers = 5;
  102. bool has_lift = 6;
  103. }
  104. message UnitAddReply {
  105. int64 id = 1;
  106. }
  107. message UnitUpdateRequest {
  108. int64 id = 1;
  109. //
  110. int64 garden_id = 2;
  111. // 单元编号
  112. int64 unit_number = 3;
  113. // 单元名
  114. string unit_name = 4;
  115. // 楼层数
  116. int64 unit_layers = 5;
  117. int64 building_id = 6;
  118. bool has_lift = 7;
  119. }
  120. message UnitUpdateReply {
  121. UnitUpdateRequest origin = 1;
  122. }
  123. message UnitDelRequest {
  124. int64 id = 1;
  125. int64 garden_id = 2;
  126. }
  127. message UnitDelReply {
  128. UnitUpdateRequest origin = 1;
  129. }
  130. message UnitListRequest {
  131. int64 unit_number = 1;
  132. int64 building_id = 2;
  133. int64 page = 3;
  134. int64 page_size = 4;
  135. int64 garden_id = 5;
  136. }
  137. message UnitItem {
  138. int64 id = 1;
  139. // 楼栋id
  140. int64 building_id = 2;
  141. // 单元编号
  142. int64 unit_number = 3;
  143. // 单元名
  144. string unit_name = 4;
  145. // 楼层数
  146. int64 unit_layers = 5;
  147. string building_name = 6;
  148. }
  149. message UnitListReply {
  150. int64 total = 1;
  151. int64 page = 2;
  152. repeated UnitItem list = 3;
  153. }
  154. message HouseAddRequest {
  155. int64 garden_id = 1;
  156. int64 building_id = 2;
  157. // 单元id
  158. int64 unit_id = 3;
  159. // 门牌号
  160. string house_number = 4;
  161. // 楼层
  162. int64 layer = 5;
  163. // 几室
  164. int64 room_count = 6;
  165. // 几厅
  166. int64 hall_count = 7;
  167. // 房屋类型 1 住宅 2 公寓 3 商业 4 洋房 5 别墅
  168. int64 house_type = 8;
  169. // 房屋建筑面积
  170. double house_area = 9;
  171. // 房屋使用面积
  172. double house_used_area = 10;
  173. }
  174. message HouseAddReply {
  175. int64 id = 1;
  176. }
  177. message HouseUpdateRequest {
  178. int64 id = 1;
  179. // 房屋使用面积
  180. double house_used_area = 2;
  181. int64 garden_id = 3;
  182. // 门牌号
  183. string house_number = 4;
  184. // 楼层
  185. int64 layer = 5;
  186. // 几室
  187. int64 room_count = 6;
  188. // 几厅
  189. int64 hall_count = 7;
  190. // 房屋类型 1 住宅 2 公寓 3 商业 4 洋房 5 别墅
  191. int64 house_type = 8;
  192. // 房屋建筑面积
  193. double house_area = 9;
  194. int64 unit_id = 10;
  195. }
  196. message HouseUpdateReply {
  197. HouseUpdateRequest origin = 1;
  198. }
  199. message HouseDelRequest {
  200. int64 id = 1;
  201. int64 garden_id = 2;
  202. }
  203. message HouseDelReply {
  204. HouseUpdateRequest origin = 1;
  205. }
  206. message HouseListRequest {
  207. string house_number = 1;
  208. int64 building_id = 2;
  209. int64 unit_id = 3;
  210. int32 house_type = 4;
  211. int64 page = 5;
  212. int64 page_size = 6;
  213. int64 garden_id = 7;
  214. int32 house_status = 8;
  215. int64 layer = 9;
  216. int64 house_id = 10;
  217. int64 uid = 11;
  218. bool house_rent = 12;
  219. }
  220. message HouseItem {
  221. int64 id = 1;
  222. int64 building_id = 2;
  223. // 单元id
  224. int64 unit_id = 3;
  225. // 门牌号
  226. string house_number = 4;
  227. // 楼层
  228. int64 layer = 5;
  229. // 几室
  230. int64 room_count = 6;
  231. // 几厅
  232. int64 hall_count = 7;
  233. // 房屋类型 1 住宅 2 公寓 3 商业 4 洋房 5 别墅
  234. int64 house_type = 8;
  235. // 房屋建筑面积
  236. double house_area = 9;
  237. // 房屋使用面积
  238. double house_used_area = 10;
  239. string house_name = 11;
  240. // 房屋状态 1 未入住 2 已入住 3 已出租
  241. int32 status = 12;
  242. bool has_lift = 13;
  243. }
  244. message HouseListReply {
  245. int64 total = 1;
  246. int64 page = 2;
  247. repeated HouseItem list = 3;
  248. }
  249. message BatchBuildingItem {
  250. // 备注
  251. string comment = 1;
  252. // 楼栋编号
  253. string building_number = 2;
  254. // 楼栋名
  255. string building_name = 3;
  256. // 楼栋建筑面积
  257. double building_area = 4;
  258. // 楼栋使用面积
  259. double building_used_area = 5;
  260. }
  261. message BatchUnitItem {
  262. // 是否有电梯
  263. bool has_lift = 1;
  264. // 楼栋编号
  265. string building_number = 2;
  266. // 单元编号
  267. int64 unit_number = 3;
  268. // 单元名
  269. string unit_name = 4;
  270. // 楼层数
  271. int64 unit_layers = 5;
  272. }
  273. message BatchHouseItem {
  274. // 房屋使用面积
  275. double house_used_area = 1;
  276. string building_number = 2;
  277. // 单元编号
  278. int64 unit_number = 3;
  279. // 门牌号
  280. string house_number = 4;
  281. // 楼层
  282. int64 layer = 5;
  283. // 几室
  284. int64 room_count = 6;
  285. // 几厅
  286. int64 hall_count = 7;
  287. // 房屋类型 1 住宅 2 公寓 3 商业 4 洋房 5 别墅
  288. int64 house_type = 8;
  289. // 房屋建筑面积
  290. double house_area = 9;
  291. }
  292. message BatchHouseAddRequest {
  293. int64 garden_id = 1;
  294. repeated BatchBuildingItem buildings = 2;
  295. repeated BatchUnitItem units = 3;
  296. repeated BatchHouseItem houses = 4;
  297. }
  298. message BatchHouseAddReply {
  299. }
  300. message HouseInfoRequest {
  301. int64 house_id = 1;
  302. }
  303. message HouseInfoReply {
  304. int64 garden_id = 1;
  305. string building_number = 2;
  306. int64 unit_number = 3;
  307. string house_number = 4;
  308. string garden_name = 5;
  309. string province = 6;
  310. string city = 7;
  311. string area = 8;
  312. string street = 9;
  313. string comittee = 10;
  314. int64 layer = 11;
  315. double house_area = 12;
  316. double house_used_area = 13;
  317. int64 room_count = 14;
  318. // 几厅
  319. int64 hall_count = 15;
  320. // 房屋类型 1 住宅 2 公寓 3 商业 4 洋房 5 别墅
  321. int64 house_type = 16;
  322. bool garden_in_use = 17;
  323. string province_code = 18;
  324. string city_code = 19;
  325. string area_code = 20;
  326. string street_code = 21;
  327. string comittee_code = 22;
  328. int32 house_status = 23;
  329. int64 building_id = 24;
  330. int64 unit_id = 25;
  331. }
  332. message HouseChangeStatusRequest {
  333. int64 house_id = 1;
  334. int32 house_status = 2;
  335. }
  336. message HouseChangeStatusReply {
  337. }
  338. message GardenChangeCompanyRequest {
  339. int64 garden_id = 1;
  340. int64 cid = 2;
  341. }
  342. message GardenChangeCompanyReply {
  343. GardenChangeCompanyRequest origin = 1;
  344. }
  345. message GardenHouseholdDelHouseRequest {
  346. int64 house_id = 1;
  347. int64 household_uid = 2;
  348. int64 garden_id = 3;
  349. }
  350. message GardenHouseholdDelHouseReply {
  351. }
  352. message GardenHouseholdUnitIdsRequest {
  353. int64 garden_id = 1;
  354. repeated int64 uids = 2;
  355. }
  356. message GardenHouseholdUnitId {
  357. int64 uid = 1;
  358. string house_names = 2;
  359. repeated int64 unit_ids = 3;
  360. }
  361. message GardenHouseholdUnitIdsReply {
  362. repeated GardenHouseholdUnitId list = 1;
  363. }