garden.proto 13 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156157158159160161162163164165166167168169170171172173174175176177178179180181182183184185186187188189190191192193194195196197198199200201202203204205206207208209210211212213214215216217218219220221222223224225226227228229230231232233234235236237238239240241242243244245246247248249250251252253254255256257258259260261262263264265266267268269270271272273274275276277278279280281282283284285286287288289290291292293294295296297298299300301302303304305306307308309310311312313314315316317318319320321322323324325326327328329330331332333334335336337338339340341342343344345346347348349350351352353354355356357358359360361362363364365366367368369370371372373374375376377378379380381382383384385386387388389390391392393394395396397398399400401402403404405406407408409410411412413414415416417418419420421422423424425426427428429430431432433434435436437438439440441442443444445446447448449450451452453454455456457458459460461462463464465466467468469470471472473474475476477478479480481482483484485486487488489490491492493494495496497498499500501502503504505506507508509510511512513514515516517518519520521522523524525526527528529530531532533534535536537538539540541542543544545546547548549550551552553554555556557558559560561562563564565566567568569570571572573574575576577578579580581582583584585586587588589590591592593594595596597598599600601602603604605606607608609610611612613614615616617618619620621622623624625626627628629630631632633634635636637638639640641642643644645646647648649650651652653654655656657658659660661662663664665666667668669670671672673674675676677678679680681682683684685686687688689690691692693694695696697698699700701702703704705706707708709710711712713714715716717718719720721722723724725726727728
  1. syntax = "proto3";
  2. // package声明符,用来防止不同的消息类型有命名冲突
  3. package pb_v1;
  4. // 用于生成指定语言go的包名称
  5. option go_package = "property-garden/pb/v1";
  6. message GardenInitDbRequest {
  7. int64 garden_id = 1;
  8. }
  9. message GardenInitDbReply{
  10. }
  11. message BuildingAddRequest {
  12. // 小区id
  13. int64 garden_id = 1;
  14. // 楼栋编号
  15. string building_number = 2;
  16. // 楼栋名
  17. string building_name = 3;
  18. // 楼栋建筑面积
  19. double building_area = 4;
  20. // 楼栋使用面积
  21. double building_used_area = 5;
  22. // 备注
  23. string comment = 6;
  24. }
  25. message BuildingAddReply {
  26. int64 id = 1;
  27. }
  28. message BuildingUpdateRequest {
  29. // id
  30. int64 id = 1;
  31. // 楼栋编号
  32. string building_number = 2;
  33. // 楼栋名
  34. string building_name = 3;
  35. // 楼栋建筑面积
  36. double building_area = 4;
  37. // 楼栋使用面积
  38. double building_used_area = 5;
  39. // 备注
  40. string comment = 6;
  41. int64 garden_id = 7;
  42. }
  43. message BuildingUpdateReply {
  44. BuildingUpdateRequest origin = 1;
  45. }
  46. message BuildingDelRequest {
  47. int64 id = 1;
  48. int64 garden_id = 2;
  49. }
  50. message BuildingDelReply {
  51. BuildingUpdateRequest origin = 1;
  52. }
  53. message BuildingListRequest {
  54. string building_number = 1;
  55. int64 page = 2;
  56. int64 page_size = 3;
  57. int64 garden_id = 4;
  58. }
  59. message BuildingItem {
  60. // id
  61. int64 id = 1;
  62. // 楼栋编号
  63. string building_number = 2;
  64. // 楼栋名
  65. string building_name = 3;
  66. // 楼栋建筑面积
  67. double building_area = 4;
  68. // 楼栋使用面积
  69. double building_used_area = 5;
  70. // 备注
  71. string comment = 6;
  72. int64 unit_count = 7;
  73. }
  74. message BuildingListReply {
  75. int64 total = 1;
  76. int64 page = 2;
  77. repeated BuildingItem list = 3;
  78. }
  79. message BuildingAddManagerRequest {
  80. int64 garden_id = 1;
  81. int64 manager_uid = 2;
  82. int64 building_id = 3;
  83. }
  84. message BuildingAddManagerReply {
  85. int64 id = 1;
  86. }
  87. message BuildingDelManagerRequest {
  88. int64 garden_id = 1;
  89. int64 id = 2;
  90. }
  91. message BuildingDelManagerReply {
  92. }
  93. message BuildingManagerListRequest {
  94. int64 garden_id = 1;
  95. int64 building_id = 2;
  96. int64 house_id = 3;
  97. }
  98. message BuildingManagerItem {
  99. int64 id = 1;
  100. int64 manager_uid = 2;
  101. // 姓名
  102. string name = 3;
  103. string phone = 4;
  104. // 账号
  105. string user_name = 5;
  106. string openim_id = 6;
  107. }
  108. message BuildingManagerListReply {
  109. repeated BuildingManagerItem list = 1;
  110. }
  111. message UnitAddRequest {
  112. int64 garden_id = 1;
  113. // 楼栋id
  114. int64 building_id = 2;
  115. // 单元编号
  116. int64 unit_number = 3;
  117. // 单元名
  118. string unit_name = 4;
  119. // 楼层数
  120. int64 unit_layers = 5;
  121. bool has_lift = 6;
  122. }
  123. message UnitAddReply {
  124. int64 id = 1;
  125. }
  126. message UnitUpdateRequest {
  127. int64 id = 1;
  128. //
  129. int64 garden_id = 2;
  130. // 单元编号
  131. int64 unit_number = 3;
  132. // 单元名
  133. string unit_name = 4;
  134. // 楼层数
  135. int64 unit_layers = 5;
  136. int64 building_id = 6;
  137. bool has_lift = 7;
  138. }
  139. message UnitUpdateReply {
  140. UnitUpdateRequest origin = 1;
  141. }
  142. message UnitDelRequest {
  143. int64 id = 1;
  144. int64 garden_id = 2;
  145. }
  146. message UnitDelReply {
  147. UnitUpdateRequest origin = 1;
  148. }
  149. message UnitListRequest {
  150. int64 unit_number = 1;
  151. int64 building_id = 2;
  152. int64 page = 3;
  153. int64 page_size = 4;
  154. int64 garden_id = 5;
  155. }
  156. message UnitItem {
  157. int64 id = 1;
  158. // 楼栋id
  159. int64 building_id = 2;
  160. // 单元编号
  161. int64 unit_number = 3;
  162. // 单元名
  163. string unit_name = 4;
  164. // 楼层数
  165. int64 unit_layers = 5;
  166. string building_name = 6;
  167. bool has_lift = 7;
  168. string building_number = 8;
  169. }
  170. message UnitListReply {
  171. int64 total = 1;
  172. int64 page = 2;
  173. repeated UnitItem list = 3;
  174. }
  175. message HouseAddRequest {
  176. int64 garden_id = 1;
  177. int64 building_id = 2;
  178. // 单元id
  179. int64 unit_id = 3;
  180. // 门牌号
  181. string house_number = 4;
  182. // 楼层
  183. int64 layer = 5;
  184. // 几室
  185. int64 room_count = 6;
  186. // 几厅
  187. int64 hall_count = 7;
  188. // 房屋类型 1 住宅 2 商铺 3 办公
  189. int64 house_type = 8;
  190. // 房屋建筑面积
  191. double house_area = 9;
  192. // 房屋使用面积
  193. double house_used_area = 10;
  194. }
  195. message HouseAddReply {
  196. int64 id = 1;
  197. }
  198. message HouseUpdateRequest {
  199. int64 id = 1;
  200. // 房屋使用面积
  201. double house_used_area = 2;
  202. int64 garden_id = 3;
  203. // 门牌号
  204. string house_number = 4;
  205. // 楼层
  206. int64 layer = 5;
  207. // 几室
  208. int64 room_count = 6;
  209. // 几厅
  210. int64 hall_count = 7;
  211. // 房屋类型 1 住宅 2 商铺 3 办公
  212. int64 house_type = 8;
  213. // 房屋建筑面积
  214. double house_area = 9;
  215. int64 unit_id = 10;
  216. }
  217. message HouseUpdateReply {
  218. HouseUpdateRequest origin = 1;
  219. }
  220. message HouseDelRequest {
  221. int64 id = 1;
  222. int64 garden_id = 2;
  223. }
  224. message HouseDelReply {
  225. HouseUpdateRequest origin = 1;
  226. }
  227. message HouseListRequest {
  228. string house_number = 1;
  229. int64 building_id = 2;
  230. int64 unit_id = 3;
  231. int32 house_type = 4;
  232. int64 page = 5;
  233. int64 page_size = 6;
  234. int64 garden_id = 7;
  235. int32 house_status = 8;
  236. int64 layer = 9;
  237. int64 house_id = 10;
  238. int64 uid = 11;
  239. bool house_rent = 12;
  240. }
  241. message HouseItem {
  242. int64 id = 1;
  243. int64 building_id = 2;
  244. // 单元id
  245. int64 unit_id = 3;
  246. // 门牌号
  247. string house_number = 4;
  248. // 楼层
  249. int64 layer = 5;
  250. // 几室
  251. int64 room_count = 6;
  252. // 几厅
  253. int64 hall_count = 7;
  254. // 房屋类型 1 住宅 2 商铺 3 办公
  255. int64 house_type = 8;
  256. // 房屋建筑面积
  257. double house_area = 9;
  258. // 房屋使用面积
  259. double house_used_area = 10;
  260. string house_name = 11;
  261. // 房屋状态 1 未入住 2 已入住 3 已出租
  262. int32 status = 12;
  263. bool has_lift = 13;
  264. string building_number = 14;
  265. int64 unit_number = 15;
  266. }
  267. message HouseListReply {
  268. int64 total = 1;
  269. int64 page = 2;
  270. repeated HouseItem list = 3;
  271. }
  272. message BatchBuildingItem {
  273. // 备注
  274. string comment = 1;
  275. // 楼栋编号
  276. string building_number = 2;
  277. // 楼栋名
  278. string building_name = 3;
  279. // 楼栋建筑面积
  280. double building_area = 4;
  281. // 楼栋使用面积
  282. double building_used_area = 5;
  283. }
  284. message BatchUnitItem {
  285. // 是否有电梯
  286. bool has_lift = 1;
  287. // 楼栋编号
  288. string building_number = 2;
  289. // 单元编号
  290. int64 unit_number = 3;
  291. // 单元名
  292. string unit_name = 4;
  293. // 楼层数
  294. int64 unit_layers = 5;
  295. }
  296. message BatchHouseItem {
  297. // 房屋使用面积
  298. double house_used_area = 1;
  299. string building_number = 2;
  300. // 单元编号
  301. int64 unit_number = 3;
  302. // 门牌号
  303. string house_number = 4;
  304. // 楼层
  305. int64 layer = 5;
  306. // 几室
  307. int64 room_count = 6;
  308. // 几厅
  309. int64 hall_count = 7;
  310. // 房屋类型 1 住宅 2 商铺 3 办公
  311. int64 house_type = 8;
  312. // 房屋建筑面积
  313. double house_area = 9;
  314. }
  315. message BatchHouseAddRequest {
  316. int64 garden_id = 1;
  317. repeated BatchBuildingItem buildings = 2;
  318. repeated BatchUnitItem units = 3;
  319. repeated BatchHouseItem houses = 4;
  320. }
  321. message BatchHouseAddReply {
  322. }
  323. message HouseInfoRequest {
  324. int64 house_id = 1;
  325. int64 garden_id = 2;
  326. }
  327. message HouseInfoReply {
  328. int64 garden_id = 1;
  329. string building_number = 2;
  330. int64 unit_number = 3;
  331. string house_number = 4;
  332. string garden_name = 5;
  333. string province = 6;
  334. string city = 7;
  335. string area = 8;
  336. string street = 9;
  337. string comittee = 10;
  338. int64 layer = 11;
  339. double house_area = 12;
  340. double house_used_area = 13;
  341. int64 room_count = 14;
  342. // 几厅
  343. int64 hall_count = 15;
  344. // 房屋类型 1 住宅 2 商铺 3 办公
  345. int64 house_type = 16;
  346. bool garden_in_use = 17;
  347. string province_code = 18;
  348. string city_code = 19;
  349. string area_code = 20;
  350. string street_code = 21;
  351. string comittee_code = 22;
  352. int32 house_status = 23;
  353. int64 building_id = 24;
  354. int64 unit_id = 25;
  355. bool has_lift = 26;
  356. }
  357. message HouseholdUserData {
  358. int64 id = 1;
  359. string phone = 2;
  360. string nick_name = 3;
  361. string real_name = 4;
  362. string id_number = 5;
  363. int32 id_type = 6;
  364. string open_id = 7;
  365. string union_id = 8;
  366. string avatar = 9;
  367. string public_open_id = 10;
  368. }
  369. message HouseholdSyncRequest {
  370. int64 garden_id = 1;
  371. string open_id = 2;
  372. int64 uid = 3;
  373. int64 created_at = 4;
  374. int64 updated_at = 5;
  375. int32 user_type = 6;
  376. int64 house_id = 7;
  377. string building_number = 8;
  378. int64 unit_number = 9;
  379. string house_number = 10;
  380. int64 building_id = 11;
  381. int64 unit_id = 12;
  382. string appendix = 13;
  383. string feedback = 14;
  384. string phone = 15;
  385. string name = 16;
  386. int32 id_type = 17;
  387. string id_number = 18;
  388. int64 approved_at = 19;
  389. int64 id = 20;
  390. string public_open_id = 21;
  391. HouseholdUserData household_user = 22;
  392. }
  393. message HouseholdSyncReply {
  394. }
  395. message HouseholdChangeRequest {
  396. repeated int64 garden_ids = 1;
  397. int64 uid = 2;
  398. string phone = 15;
  399. string name = 16;
  400. int32 id_type = 17;
  401. string id_number = 18;
  402. string public_open_id = 19;
  403. string nick_name = 20;
  404. }
  405. message HouseholdChangeReply {
  406. }
  407. message HouseIdsRequest {
  408. string house_number = 1;
  409. int64 building_id = 2;
  410. int64 unit_id = 3;
  411. int32 house_type = 4;
  412. int64 garden_id = 5;
  413. int32 house_status = 6;
  414. int64 layer = 7;
  415. repeated int64 house_ids = 8;
  416. }
  417. message HouseIdsReply {
  418. repeated int64 list = 1;
  419. }
  420. message GardenHouseholdUnitIdsRequest {
  421. int64 garden_id = 1;
  422. repeated int64 uids = 2;
  423. }
  424. message GardenHouseholdUnitId {
  425. int64 uid = 1;
  426. string house_names = 2;
  427. repeated int64 unit_ids = 3;
  428. int32 user_type = 4;
  429. }
  430. message GardenHouseholdUnitIdsReply {
  431. repeated GardenHouseholdUnitId list = 1;
  432. }
  433. message GardenHouseholdUidsFromUnitIdRequest {
  434. int64 garden_id = 1;
  435. repeated int64 unit_ids = 2;
  436. }
  437. message GardenHouseholdUidsFromUnitIdReply {
  438. repeated int64 uids = 3;
  439. }
  440. message GardenHouseholdListRequest {
  441. int64 garden_id = 1;
  442. int64 uid = 2;
  443. int64 page = 3;
  444. int64 page_size = 4;
  445. int32 user_type = 5;
  446. string name = 6;
  447. }
  448. message GardenHouseholdItem {
  449. int64 id = 1;
  450. // 1业主 2家人 3租客
  451. int32 user_type = 2;
  452. string phone = 3;
  453. string name = 4;
  454. repeated string appendix = 5;
  455. // 1 身份证 2 护照
  456. int32 id_type = 6;
  457. // 证件号
  458. string id_number = 7;
  459. // 房号
  460. string house_name = 8;
  461. int32 approve_status = 9;
  462. string garden_name = 10;
  463. int64 uid = 11;
  464. int64 house_id = 12;
  465. int64 unit_id = 13;
  466. }
  467. message GardenHouseholdListReply {
  468. int64 page = 1;
  469. int64 total = 2;
  470. repeated GardenHouseholdItem list = 3;
  471. }
  472. message GardenHouseIsInRequest {
  473. int64 garden_id = 1;
  474. }
  475. message GardenHouseIsInReply {
  476. bool in = 1;
  477. }
  478. message GardenHouseholdUserListRequest {
  479. int64 garden_id = 1;
  480. int64 page = 2;
  481. int64 page_size = 3;
  482. string name = 4;
  483. string phone = 5;
  484. string id_number = 6;
  485. int32 user_type = 7;
  486. repeated int64 uids = 8;
  487. int64 house_id = 9;
  488. repeated int64 exclude_uids = 10;
  489. int64 building_id = 11;
  490. int64 unit_id = 12;
  491. }
  492. message GardenHouseholdUserItem {
  493. int64 id = 1;
  494. // 1业主 2家人 3租客
  495. int32 user_type = 2;
  496. string phone = 3;
  497. string name = 4;
  498. // 1 身份证 2 护照
  499. int32 id_type = 5;
  500. // 证件号
  501. string id_number = 6;
  502. string garden_name = 7;
  503. string house_name = 8;
  504. }
  505. message GardenHouseholdUserListReply {
  506. int64 total = 1;
  507. int64 page = 2;
  508. repeated GardenHouseholdUserItem list = 3;
  509. }
  510. message SystemMsgAddRequest {
  511. int64 garden_id = 1;
  512. string content = 2;
  513. string code = 3;
  514. int64 uid = 4;
  515. }
  516. message SystemMsgAddReply {
  517. }
  518. message SystemMsgListRequest {
  519. int64 garden_id = 1;
  520. int64 page = 2;
  521. int64 page_size = 3;
  522. int64 uid = 4;
  523. }
  524. message SystemMsgItem {
  525. int64 id = 1;
  526. string content = 2;
  527. string created_at = 3;
  528. string code = 5;
  529. }
  530. message SystemMsgListReply {
  531. int64 total = 1;
  532. int64 page = 2;
  533. repeated SystemMsgItem list = 3;
  534. }
  535. message SystemMsgReadedRequest {
  536. int64 garden_id = 1;
  537. repeated int64 id = 2;
  538. }
  539. message SystemMsgReadedReply {
  540. }
  541. message GardenHouseRentChangeFieldRequest {
  542. int64 garden_id = 1;
  543. int64 house_id = 2;
  544. int64 unit_id = 3;
  545. int64 room_count = 4;
  546. int64 hall_count = 5;
  547. bool has_lift = 6;
  548. double house_area = 7;
  549. int64 layer = 8;
  550. string garden_name = 9;
  551. double lnt = 10;
  552. double lat = 11;
  553. }
  554. message GardenHouseRentChangeFieldReply {
  555. }
  556. message StatisticRequest {
  557. int64 garden_id = 1;
  558. }
  559. message StatisticWaitFinish {
  560. string type = 1;
  561. int64 wait_count = 2;
  562. int64 finish_count = 3;
  563. }
  564. message StatisticReply {
  565. // 房屋数
  566. int64 house_count = 1;
  567. // 住户数
  568. int64 user_count = 2;
  569. // 车位数
  570. int64 space_count = 3;
  571. // 车辆数
  572. int64 vehicle_count = 4;
  573. repeated StatisticWaitFinish list = 5;
  574. }
  575. message ObjStatisticSetRequest {
  576. int64 garden_id = 1;
  577. int32 obj_type = 2;
  578. // 为负数表示减少
  579. int64 total_increase = 3;
  580. }
  581. message ObjStatisticSetReply {
  582. }
  583. message RepairStatisticSetRequest {
  584. int64 garden_id = 1;
  585. int32 handle_type = 2;
  586. // 为负数表示减少
  587. int64 total_increase = 3;
  588. int64 finish_increase = 4;
  589. }
  590. message RepairStatisticSetReply {
  591. }
  592. message GardenHouseholdDelHouseRequest {
  593. int64 house_id = 1;
  594. int64 household_uid = 2;
  595. int64 garden_id = 3;
  596. }
  597. message GardenHouseholdDelHouseReply {
  598. }