garden.proto 9.6 KB

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