garden.proto 11 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156157158159160161162163164165166167168169170171172173174175176177178179180181182183184185186187188189190191192193194195196197198199200201202203204205206207208209210211212213214215216217218219220221222223224225226227228229230231232233234235236237238239240241242243244245246247248249250251252253254255256257258259260261262263264265266267268269270271272273274275276277278279280281282283284285286287288289290291292293294295296297298299300301302303304305306307308309310311312313314315316317318319320321322323324325326327328329330331332333334335336337338339340341342343344345346347348349350351352353354355356357358359360361362363364365366367368369370371372373374375376377378379380381382383384385386387388389390391392393394395396397398399400401402403404405406407408409410411412413414415416417418419420421422423424425426427428429430431432433434435436437438439440441442443444445446447448449450451452453454455456457458459460461462463464465466467468469470471472473474475476477478479480481482483484485486487488489490491492493494495496497498499500501502503504505506507508509510511512513514515516517518519520521522523524525526527528529530531532533534535536537538539540541542543544545546547548549550551552553554555556557558559
  1. syntax = "proto3";
  2. // package声明符,用来防止不同的消息类型有命名冲突
  3. package pb_v1;
  4. // 用于生成指定语言go的包名称
  5. option go_package = "property-system-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 BuildingAddManagerRequest {
  75. int64 garden_id = 1;
  76. int64 manager_uid = 2;
  77. int64 building_id = 3;
  78. }
  79. message BuildingAddManagerReply {
  80. int64 id = 1;
  81. }
  82. message BuildingDelManagerRequest {
  83. int64 garden_id = 1;
  84. int64 id = 2;
  85. }
  86. message BuildingDelManagerReply {
  87. }
  88. message BuildingManagerListRequest {
  89. int64 garden_id = 1;
  90. int64 building_id = 2;
  91. int64 house_id = 3;
  92. }
  93. message BuildingManagerItem {
  94. int64 id = 1;
  95. int64 manager_uid = 2;
  96. // 姓名
  97. string name = 3;
  98. string phone = 4;
  99. // 账号
  100. string user_name = 5;
  101. string openim_id = 6;
  102. }
  103. message BuildingManagerListReply {
  104. repeated BuildingManagerItem list = 1;
  105. }
  106. message UnitAddRequest {
  107. int64 garden_id = 1;
  108. // 楼栋id
  109. int64 building_id = 2;
  110. // 单元编号
  111. int64 unit_number = 3;
  112. // 单元名
  113. string unit_name = 4;
  114. // 楼层数
  115. int64 unit_layers = 5;
  116. bool has_lift = 6;
  117. }
  118. message UnitAddReply {
  119. int64 id = 1;
  120. }
  121. message UnitUpdateRequest {
  122. int64 id = 1;
  123. //
  124. int64 garden_id = 2;
  125. // 单元编号
  126. int64 unit_number = 3;
  127. // 单元名
  128. string unit_name = 4;
  129. // 楼层数
  130. int64 unit_layers = 5;
  131. int64 building_id = 6;
  132. bool has_lift = 7;
  133. }
  134. message UnitUpdateReply {
  135. UnitUpdateRequest origin = 1;
  136. }
  137. message UnitDelRequest {
  138. int64 id = 1;
  139. int64 garden_id = 2;
  140. }
  141. message UnitDelReply {
  142. UnitUpdateRequest origin = 1;
  143. }
  144. message UnitListRequest {
  145. int64 unit_number = 1;
  146. int64 building_id = 2;
  147. int64 page = 3;
  148. int64 page_size = 4;
  149. int64 garden_id = 5;
  150. }
  151. message UnitItem {
  152. int64 id = 1;
  153. // 楼栋id
  154. int64 building_id = 2;
  155. // 单元编号
  156. int64 unit_number = 3;
  157. // 单元名
  158. string unit_name = 4;
  159. // 楼层数
  160. int64 unit_layers = 5;
  161. string building_name = 6;
  162. bool has_lift = 7;
  163. string building_number = 8;
  164. }
  165. message UnitListReply {
  166. int64 total = 1;
  167. int64 page = 2;
  168. repeated UnitItem list = 3;
  169. }
  170. message HouseAddRequest {
  171. int64 garden_id = 1;
  172. int64 building_id = 2;
  173. // 单元id
  174. int64 unit_id = 3;
  175. // 门牌号
  176. string house_number = 4;
  177. // 楼层
  178. int64 layer = 5;
  179. // 几室
  180. int64 room_count = 6;
  181. // 几厅
  182. int64 hall_count = 7;
  183. // 房屋类型 1 住宅 2 公寓 3 商业 4 洋房 5 别墅
  184. int64 house_type = 8;
  185. // 房屋建筑面积
  186. double house_area = 9;
  187. // 房屋使用面积
  188. double house_used_area = 10;
  189. }
  190. message HouseAddReply {
  191. int64 id = 1;
  192. }
  193. message HouseUpdateRequest {
  194. int64 id = 1;
  195. // 房屋使用面积
  196. double house_used_area = 2;
  197. int64 garden_id = 3;
  198. // 门牌号
  199. string house_number = 4;
  200. // 楼层
  201. int64 layer = 5;
  202. // 几室
  203. int64 room_count = 6;
  204. // 几厅
  205. int64 hall_count = 7;
  206. // 房屋类型 1 住宅 2 公寓 3 商业 4 洋房 5 别墅
  207. int64 house_type = 8;
  208. // 房屋建筑面积
  209. double house_area = 9;
  210. int64 unit_id = 10;
  211. }
  212. message HouseUpdateReply {
  213. HouseUpdateRequest origin = 1;
  214. }
  215. message HouseDelRequest {
  216. int64 id = 1;
  217. int64 garden_id = 2;
  218. }
  219. message HouseDelReply {
  220. HouseUpdateRequest origin = 1;
  221. }
  222. message HouseListRequest {
  223. string house_number = 1;
  224. int64 building_id = 2;
  225. int64 unit_id = 3;
  226. int32 house_type = 4;
  227. int64 page = 5;
  228. int64 page_size = 6;
  229. int64 garden_id = 7;
  230. int32 house_status = 8;
  231. int64 layer = 9;
  232. int64 house_id = 10;
  233. int64 uid = 11;
  234. bool house_rent = 12;
  235. }
  236. message HouseItem {
  237. int64 id = 1;
  238. int64 building_id = 2;
  239. // 单元id
  240. int64 unit_id = 3;
  241. // 门牌号
  242. string house_number = 4;
  243. // 楼层
  244. int64 layer = 5;
  245. // 几室
  246. int64 room_count = 6;
  247. // 几厅
  248. int64 hall_count = 7;
  249. // 房屋类型 1 住宅 2 公寓 3 商业 4 洋房 5 别墅
  250. int64 house_type = 8;
  251. // 房屋建筑面积
  252. double house_area = 9;
  253. // 房屋使用面积
  254. double house_used_area = 10;
  255. string house_name = 11;
  256. // 房屋状态 1 未入住 2 已入住 3 已出租
  257. int32 status = 12;
  258. bool has_lift = 13;
  259. string building_number = 14;
  260. int64 unit_number = 15;
  261. }
  262. message HouseListReply {
  263. int64 total = 1;
  264. int64 page = 2;
  265. repeated HouseItem list = 3;
  266. }
  267. message BatchBuildingItem {
  268. // 备注
  269. string comment = 1;
  270. // 楼栋编号
  271. string building_number = 2;
  272. // 楼栋名
  273. string building_name = 3;
  274. // 楼栋建筑面积
  275. double building_area = 4;
  276. // 楼栋使用面积
  277. double building_used_area = 5;
  278. }
  279. message BatchUnitItem {
  280. // 是否有电梯
  281. bool has_lift = 1;
  282. // 楼栋编号
  283. string building_number = 2;
  284. // 单元编号
  285. int64 unit_number = 3;
  286. // 单元名
  287. string unit_name = 4;
  288. // 楼层数
  289. int64 unit_layers = 5;
  290. }
  291. message BatchHouseItem {
  292. // 房屋使用面积
  293. double house_used_area = 1;
  294. string building_number = 2;
  295. // 单元编号
  296. int64 unit_number = 3;
  297. // 门牌号
  298. string house_number = 4;
  299. // 楼层
  300. int64 layer = 5;
  301. // 几室
  302. int64 room_count = 6;
  303. // 几厅
  304. int64 hall_count = 7;
  305. // 房屋类型 1 住宅 2 公寓 3 商业 4 洋房 5 别墅
  306. int64 house_type = 8;
  307. // 房屋建筑面积
  308. double house_area = 9;
  309. }
  310. message BatchHouseAddRequest {
  311. int64 garden_id = 1;
  312. repeated BatchBuildingItem buildings = 2;
  313. repeated BatchUnitItem units = 3;
  314. repeated BatchHouseItem houses = 4;
  315. }
  316. message BatchHouseAddReply {
  317. }
  318. message HouseInfoRequest {
  319. int64 house_id = 1;
  320. int64 garden_id = 2;
  321. }
  322. message HouseInfoReply {
  323. int64 garden_id = 1;
  324. string building_number = 2;
  325. int64 unit_number = 3;
  326. string house_number = 4;
  327. string garden_name = 5;
  328. string province = 6;
  329. string city = 7;
  330. string area = 8;
  331. string street = 9;
  332. string comittee = 10;
  333. int64 layer = 11;
  334. double house_area = 12;
  335. double house_used_area = 13;
  336. int64 room_count = 14;
  337. // 几厅
  338. int64 hall_count = 15;
  339. // 房屋类型 1 住宅 2 公寓 3 商业 4 洋房 5 别墅
  340. int64 house_type = 16;
  341. bool garden_in_use = 17;
  342. string province_code = 18;
  343. string city_code = 19;
  344. string area_code = 20;
  345. string street_code = 21;
  346. string comittee_code = 22;
  347. int32 house_status = 23;
  348. int64 building_id = 24;
  349. int64 unit_id = 25;
  350. }
  351. message HouseChangeStatusRequest {
  352. int64 house_id = 1;
  353. int32 house_status = 2;
  354. }
  355. message HouseChangeStatusReply {
  356. }
  357. message GardenHouseholdListRequest {
  358. int64 garden_id = 1;
  359. int64 uid = 2;
  360. int64 page = 3;
  361. int64 page_size = 4;
  362. int32 user_type = 5;
  363. string name = 6;
  364. }
  365. message GardenHouseholdItem {
  366. int64 id = 1;
  367. // 1业主 2家人 3租客
  368. int32 user_type = 2;
  369. string phone = 3;
  370. string name = 4;
  371. repeated string appendix = 5;
  372. // 1 身份证 2 护照
  373. int32 id_type = 6;
  374. // 证件号
  375. string id_number = 7;
  376. // 房号
  377. string house_name = 8;
  378. int32 approve_status = 9;
  379. string garden_name = 10;
  380. int64 uid = 11;
  381. int64 house_id = 12;
  382. }
  383. message GardenHouseholdListReply {
  384. int64 page = 1;
  385. int64 total = 2;
  386. repeated GardenHouseholdItem list = 3;
  387. }
  388. message GardenHouseholdUserListRequest {
  389. int64 garden_id = 1;
  390. int64 page = 2;
  391. int64 page_size = 3;
  392. string name = 4;
  393. string phone = 5;
  394. string id_number = 6;
  395. int32 user_type = 7;
  396. repeated int64 uids = 8;
  397. int64 house_id = 9;
  398. repeated int64 exclude_uids = 10;
  399. int64 building_id = 11;
  400. int64 unit_id = 12;
  401. }
  402. message GardenHouseholdUserItem {
  403. int64 id = 1;
  404. // 1业主 2家人 3租客
  405. int32 user_type = 2;
  406. string phone = 3;
  407. string name = 4;
  408. // 1 身份证 2 护照
  409. int32 id_type = 5;
  410. // 证件号
  411. string id_number = 6;
  412. string garden_name = 7;
  413. string house_name = 8;
  414. }
  415. message GardenHouseholdUserListReply {
  416. int64 total = 1;
  417. int64 page = 2;
  418. repeated GardenHouseholdUserItem list = 3;
  419. }
  420. message SystemMsgAddRequest {
  421. int64 garden_id = 1;
  422. string content = 2;
  423. string code = 3;
  424. int64 uid = 4;
  425. }
  426. message SystemMsgAddReply {
  427. }
  428. message SystemMsgListRequest {
  429. int64 garden_id = 1;
  430. int64 page = 2;
  431. int64 page_size = 3;
  432. int64 uid = 4;
  433. }
  434. message SystemMsgItem {
  435. int64 id = 1;
  436. string content = 2;
  437. string created_at = 3;
  438. string code = 5;
  439. }
  440. message SystemMsgListReply {
  441. int64 total = 1;
  442. int64 page = 2;
  443. repeated SystemMsgItem list = 3;
  444. }
  445. message SystemMsgReadedRequest {
  446. int64 garden_id = 1;
  447. repeated int64 id = 2;
  448. }
  449. message SystemMsgReadedReply {
  450. }
  451. message StatisticRequest {
  452. int64 garden_id = 1;
  453. }
  454. message StatisticWaitFinish {
  455. string type = 1;
  456. int64 wait_count = 2;
  457. int64 finish_count = 3;
  458. }
  459. message StatisticReply {
  460. // 房屋数
  461. int64 house_count = 1;
  462. // 住户数
  463. int64 user_count = 2;
  464. // 车位数
  465. int64 space_count = 3;
  466. // 车辆数
  467. int64 vehicle_count = 4;
  468. repeated StatisticWaitFinish list = 5;
  469. }