garden.proto 8.9 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156157158159160161162163164165166167168169170171172173174175176177178179180181182183184185186187188189190191192193194195196197198199200201202203204205206207208209210211212213214215216217218219220221222223224225226227228229230231232233234235236237238239240241242243244245246247248249250251252253254255256257258259260261262263264265266267268269270271272273274275276277278279280281282283284285286287288289290291292293294295296297298299300301302303304305306307308309310311312313314315316317318319320321322323324325326327328329330331332333334335336337338339340341342343344345346347348349350351352353354355356357358359360361362363364365366367368369370371372373374375376377378379380381382383384385386387388389390391392393394395396397398399400401402403404405406407408409410411412413414415416417418419420421422423424425426427428429430431432433434435436437438439440441442443444445446447448449450451452453454455456457458459460461462463464465466467468469470471472473
  1. syntax = "proto3";
  2. // package声明符,用来防止不同的消息类型有命名冲突
  3. package pb_v1;
  4. // 用于生成指定语言go的包名称
  5. option go_package = "property-household/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. }
  131. message UnitListReply {
  132. int64 total = 1;
  133. int64 page = 2;
  134. repeated UnitItem list = 3;
  135. }
  136. message HouseAddRequest {
  137. int64 garden_id = 1;
  138. int64 building_id = 2;
  139. // 单元id
  140. int64 unit_id = 3;
  141. // 门牌号
  142. string house_number = 4;
  143. // 楼层
  144. int64 layer = 5;
  145. // 几室
  146. int64 room_count = 6;
  147. // 几厅
  148. int64 hall_count = 7;
  149. // 房屋类型 1 住宅 2 公寓 3 商业 4 洋房 5 别墅
  150. int64 house_type = 8;
  151. // 房屋建筑面积
  152. double house_area = 9;
  153. // 房屋使用面积
  154. double house_used_area = 10;
  155. }
  156. message HouseAddReply {
  157. int64 id = 1;
  158. }
  159. message HouseUpdateRequest {
  160. int64 id = 1;
  161. // 房屋使用面积
  162. double house_used_area = 2;
  163. int64 garden_id = 3;
  164. // 门牌号
  165. string house_number = 4;
  166. // 楼层
  167. int64 layer = 5;
  168. // 几室
  169. int64 room_count = 6;
  170. // 几厅
  171. int64 hall_count = 7;
  172. // 房屋类型 1 住宅 2 公寓 3 商业 4 洋房 5 别墅
  173. int64 house_type = 8;
  174. // 房屋建筑面积
  175. double house_area = 9;
  176. int64 unit_id = 10;
  177. }
  178. message HouseUpdateReply {
  179. HouseUpdateRequest origin = 1;
  180. }
  181. message HouseDelRequest {
  182. int64 id = 1;
  183. int64 garden_id = 2;
  184. }
  185. message HouseDelReply {
  186. HouseUpdateRequest origin = 1;
  187. }
  188. message HouseListRequest {
  189. string house_number = 1;
  190. int64 building_id = 2;
  191. int64 unit_id = 3;
  192. int32 house_type = 4;
  193. int64 page = 5;
  194. int64 page_size = 6;
  195. int64 garden_id = 7;
  196. int32 house_status = 8;
  197. int64 layer = 9;
  198. int64 house_id = 10;
  199. }
  200. message HouseItem {
  201. int64 id = 1;
  202. int64 building_id = 2;
  203. // 单元id
  204. int64 unit_id = 3;
  205. // 门牌号
  206. string house_number = 4;
  207. // 楼层
  208. int64 layer = 5;
  209. // 几室
  210. int64 room_count = 6;
  211. // 几厅
  212. int64 hall_count = 7;
  213. // 房屋类型 1 住宅 2 公寓 3 商业 4 洋房 5 别墅
  214. int64 house_type = 8;
  215. // 房屋建筑面积
  216. double house_area = 9;
  217. // 房屋使用面积
  218. double house_used_area = 10;
  219. string house_name = 11;
  220. // 房屋状态 1 未入住 2 已入住 3 已出租
  221. int32 status = 12;
  222. }
  223. message HouseListReply {
  224. int64 total = 1;
  225. int64 page = 2;
  226. repeated HouseItem list = 3;
  227. }
  228. message BatchBuildingItem {
  229. // 备注
  230. string comment = 1;
  231. // 楼栋编号
  232. string building_number = 2;
  233. // 楼栋名
  234. string building_name = 3;
  235. // 楼栋建筑面积
  236. double building_area = 4;
  237. // 楼栋使用面积
  238. double building_used_area = 5;
  239. }
  240. message BatchUnitItem {
  241. // 是否有电梯
  242. bool has_lift = 1;
  243. // 楼栋编号
  244. string building_number = 2;
  245. // 单元编号
  246. int64 unit_number = 3;
  247. // 单元名
  248. string unit_name = 4;
  249. // 楼层数
  250. int64 unit_layers = 5;
  251. }
  252. message BatchHouseItem {
  253. // 房屋使用面积
  254. double house_used_area = 1;
  255. string building_number = 2;
  256. // 单元编号
  257. int64 unit_number = 3;
  258. // 门牌号
  259. string house_number = 4;
  260. // 楼层
  261. int64 layer = 5;
  262. // 几室
  263. int64 room_count = 6;
  264. // 几厅
  265. int64 hall_count = 7;
  266. // 房屋类型 1 住宅 2 公寓 3 商业 4 洋房 5 别墅
  267. int64 house_type = 8;
  268. // 房屋建筑面积
  269. double house_area = 9;
  270. }
  271. message BatchHouseAddRequest {
  272. int64 garden_id = 1;
  273. repeated BatchBuildingItem buildings = 2;
  274. repeated BatchUnitItem units = 3;
  275. repeated BatchHouseItem houses = 4;
  276. }
  277. message BatchHouseAddReply {
  278. }
  279. message HouseInfoRequest {
  280. int64 house_id = 1;
  281. int64 garden_id = 2;
  282. }
  283. message HouseInfoReply {
  284. int64 garden_id = 1;
  285. string building_number = 2;
  286. int64 unit_number = 3;
  287. string house_number = 4;
  288. string garden_name = 5;
  289. string province = 6;
  290. string city = 7;
  291. string area = 8;
  292. string street = 9;
  293. string comittee = 10;
  294. int64 layer = 11;
  295. double house_area = 12;
  296. double house_used_area = 13;
  297. int64 room_count = 14;
  298. // 几厅
  299. int64 hall_count = 15;
  300. // 房屋类型 1 住宅 2 公寓 3 商业 4 洋房 5 别墅
  301. int64 house_type = 16;
  302. bool garden_in_use = 17;
  303. string province_code = 18;
  304. string city_code = 19;
  305. string area_code = 20;
  306. string street_code = 21;
  307. string comittee_code = 22;
  308. int32 house_status = 23;
  309. int64 building_id = 24;
  310. int64 unit_id = 25;
  311. bool has_lift = 26;
  312. }
  313. message HouseholdUserData {
  314. int64 id = 1;
  315. string phone = 2;
  316. string nick_name = 3;
  317. string real_name = 4;
  318. string id_number = 5;
  319. int32 id_type = 6;
  320. string open_id = 7;
  321. string union_id = 8;
  322. string avatar = 9;
  323. string public_open_id = 10;
  324. }
  325. message HouseholdSyncRequest {
  326. int64 garden_id = 1;
  327. string open_id = 2;
  328. int64 uid = 3;
  329. int64 created_at = 4;
  330. int64 updated_at = 5;
  331. int32 user_type = 6;
  332. int64 house_id = 7;
  333. string building_number = 8;
  334. int64 unit_number = 9;
  335. string house_number = 10;
  336. int64 building_id = 11;
  337. int64 unit_id = 12;
  338. string appendix = 13;
  339. string feedback = 14;
  340. string phone = 15;
  341. string name = 16;
  342. int32 id_type = 17;
  343. string id_number = 18;
  344. int64 approved_at = 19;
  345. int64 id = 20;
  346. string public_open_id = 21;
  347. HouseholdUserData household_user = 22;
  348. }
  349. message HouseholdSyncReply {
  350. }
  351. message HouseholdChangeRequest {
  352. repeated int64 garden_ids = 1;
  353. int64 uid = 2;
  354. string phone = 15;
  355. string name = 16;
  356. int32 id_type = 17;
  357. string id_number = 18;
  358. string public_open_id = 19;
  359. string nick_name = 20;
  360. }
  361. message HouseholdChangeReply {
  362. }
  363. message GardenChangeCompanyRequest {
  364. int64 garden_id = 1;
  365. int64 cid = 2;
  366. }
  367. message GardenChangeCompanyReply {
  368. GardenChangeCompanyRequest origin = 1;
  369. }
  370. message GardenHouseRentSyncRequest {
  371. bool insert = 1;
  372. int64 garden_id = 2;
  373. bytes datas = 3;
  374. int64 increase = 4;
  375. }
  376. message GardenHouseRentSyncReply {
  377. }
  378. message SystemMsgAddRequest {
  379. int64 garden_id = 1;
  380. string content = 2;
  381. string code = 3;
  382. int64 uid = 4;
  383. }
  384. message SystemMsgAddReply {
  385. }
  386. message RepairStatisticSetRequest {
  387. int64 garden_id = 1;
  388. int32 handle_type = 2;
  389. // 为负数表示减少
  390. int64 total_increase = 3;
  391. int64 finish_increase = 4;
  392. }
  393. message RepairStatisticSetReply {
  394. }