garden.proto 9.9 KB

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