common.proto 3.5 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156157158159160161162163164165166167168169170171172173174175176177178179180181182183184185186187188189190191192193194195196197198199200201202203204
  1. syntax = "proto3";
  2. // package声明符,用来防止不同的消息类型有命名冲突
  3. package pb_v1;
  4. // 用于生成指定语言go的包名称
  5. option go_package = "property-household-gateway/pb/v1";
  6. message SystemPermissionAddRequest {
  7. // 父code,若没有则填空
  8. string pcode = 1;
  9. // 方法
  10. int32 method = 2;
  11. // 权限名字
  12. string name = 3;
  13. // 该路由是否需要前端控制
  14. bool front = 4;
  15. // 路由
  16. string router = 5;
  17. }
  18. message SystemPermissionAddReply {
  19. string code = 1;
  20. }
  21. message SystemPermissionUpdateRequest {
  22. // 方法
  23. int32 method = 2;
  24. // 权限名字
  25. string name = 3;
  26. // 该路由是否需要前端控制
  27. bool front = 4;
  28. // 路由
  29. string router = 5;
  30. string code = 6;
  31. }
  32. message SystemPermissionUpdateReply {
  33. }
  34. message SystemPermissionDelRequest {
  35. string code = 1;
  36. }
  37. message SystemPermissionDelReply {
  38. }
  39. message SystemPermissionListRequest {
  40. }
  41. message SystemPermissionItem {
  42. // 父code,若没有则填空
  43. string pcode = 1;
  44. // 方法
  45. int32 method = 2;
  46. // 权限名字
  47. string name = 3;
  48. // 该路由是否需要前端控制
  49. bool front = 4;
  50. // 路由
  51. string router = 5;
  52. string code = 6;
  53. repeated SystemPermissionItem childs = 7;
  54. }
  55. message SystemPermissionListReply {
  56. repeated SystemPermissionItem list = 1;
  57. }
  58. message SystemPermissionNotTreeItem {
  59. // 父code,若没有则填空
  60. string pcode = 1;
  61. // 方法
  62. int32 method = 2;
  63. // 权限名字
  64. string name = 3;
  65. // 该路由是否需要前端控制
  66. bool front = 4;
  67. // 路由
  68. string router = 5;
  69. string code = 6;
  70. }
  71. // 平铺权限列表
  72. message SystemPermissionsNotTreeRequest {
  73. }
  74. message SystemPermissionsNotTreeReply {
  75. repeated SystemPermissionNotTreeItem list = 1;
  76. }
  77. message ProvinceCityAreaRequest {
  78. }
  79. message ProvinceData {
  80. string code = 1;
  81. string name = 2;
  82. }
  83. message CityData {
  84. string code = 1;
  85. string name = 2;
  86. string province_code = 3;
  87. }
  88. message AreaData {
  89. string code = 1;
  90. string name = 2;
  91. string province_code = 3;
  92. string city_code = 4;
  93. }
  94. message ProvinceCityAreaReply {
  95. repeated ProvinceData province_list = 1;
  96. repeated CityData city_list = 2;
  97. repeated AreaData area_list = 3;
  98. }
  99. message CityRequest {
  100. string city_name = 1;
  101. }
  102. message CityReply {
  103. string code = 1;
  104. string name = 2;
  105. string province_code = 3;
  106. string province_name = 4;
  107. }
  108. message StreetCommitteeRequest {
  109. string area_code = 1;
  110. }
  111. message StreetData {
  112. string code = 1;
  113. string name = 2;
  114. }
  115. message CommitteeData {
  116. string code = 1;
  117. string name = 2;
  118. string street_code = 3;
  119. }
  120. message StreetCommitteeReply {
  121. repeated StreetData street_list = 1;
  122. repeated CommitteeData committee_list = 2;
  123. }
  124. message SystemPermissionRouterRequest {
  125. string router = 1;
  126. string method = 2;
  127. }
  128. message SystemPermissionRouterReply {
  129. string code = 1;
  130. }
  131. message OssObjDelNotExistRequest {
  132. string obj_url = 1;
  133. }
  134. message OssObjDelNotExistReply {
  135. }
  136. message MaterialInfoRequest {
  137. int32 mtype = 1;
  138. }
  139. message MaterialInfoReply {
  140. string pic = 1;
  141. }
  142. message MaterialItem {
  143. int64 id = 1;
  144. int32 mtype = 2;
  145. string pic = 3;
  146. int64 created_at = 4;
  147. int32 enable = 5;
  148. }
  149. message MaterialListRequest {
  150. int64 page = 1;
  151. int64 page_size = 2;
  152. repeated int32 mtypes = 3;
  153. }
  154. message MaterialListReply {
  155. int64 page = 1;
  156. int64 total = 2;
  157. repeated MaterialItem list = 3;
  158. }