common.proto 5.8 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156157158159160161162163164165166167168169170171172173174175176177178179180181182183184185186187188189190191192193194195196197198199200201202203204205206207208209210211212213214215216217218219220221222223224225226227228229230231232233234235236237238239240241242243244245246247248249250251252253254255256257258259260261262263264265266267268269270271272273274275276277278279280281282283284285286287288289290291292293294295296297298299300301302303304305306307308309310311312313314315316317318319320321
  1. syntax = "proto3";
  2. // package声明符,用来防止不同的消息类型有命名冲突
  3. package pb_v1;
  4. // 用于生成指定语言go的包名称
  5. option go_package = "property-system/pb/v1";
  6. message SystemPermissionAddRequest {
  7. // 父code,若没有则填空
  8. string pcode = 1;
  9. // 组件路径
  10. string path = 2;
  11. // 权限名字
  12. string name = 3;
  13. // 小程序组件路径
  14. string applete_path = 4;
  15. // 路由
  16. string router = 5;
  17. // 1 已发布 2 未发布
  18. int32 enable = 6;
  19. }
  20. message SystemPermissionAddReply {
  21. string code = 1;
  22. }
  23. message SystemPermissionUpdateRequest {
  24. // 组件路径
  25. string path = 1;
  26. // 权限名字
  27. string name = 2;
  28. // 小程序组件路径
  29. string applete_path = 3;
  30. // 路由
  31. string router = 4;
  32. string code = 5;
  33. }
  34. message SystemPermissionUpdateReply {
  35. SystemPermissionUpdateRequest origin = 1;
  36. }
  37. message SystemPermissionDelRequest {
  38. string code = 1;
  39. }
  40. message SystemPermissionDelReply {
  41. repeated SystemPermissionUpdateRequest origin = 1;
  42. }
  43. message SystemPermissionListRequest {
  44. }
  45. message SystemPermissionItem {
  46. // 父code,若没有则填空
  47. string pcode = 1;
  48. // 组件路径
  49. string path =2;
  50. // 权限名字
  51. string name = 3;
  52. // 小程序组件路径
  53. string applete_path = 4;
  54. // 路由
  55. string router = 5;
  56. string code = 6;
  57. // 1 已发布 2 未发布
  58. int32 enable = 7;
  59. int64 created_at = 8;
  60. int64 enable_at = 9;
  61. int64 level = 10;
  62. repeated SystemPermissionItem childs = 11;
  63. }
  64. message SystemPermissionListReply {
  65. repeated SystemPermissionItem list = 1;
  66. }
  67. message SystemPermissionNotTreeItem {
  68. // 父code,若没有则填空
  69. string pcode = 1;
  70. // 组件路径
  71. string path = 2;
  72. // 权限名字
  73. string name = 3;
  74. // 小程序组件路径
  75. string applete_path = 4;
  76. // 路由
  77. string router = 5;
  78. string code = 6;
  79. // 1 已发布 2 未发布
  80. int32 enable = 7;
  81. int64 created_at = 8;
  82. int64 enable_at = 9;
  83. int64 level = 10;
  84. }
  85. // 平铺权限列表
  86. message SystemPermissionsNotTreeRequest {
  87. }
  88. message SystemPermissionsNotTreeReply {
  89. repeated SystemPermissionNotTreeItem list = 1;
  90. }
  91. message ProvinceCityAreaRequest {
  92. }
  93. message ProvinceData {
  94. string code = 1;
  95. string name = 2;
  96. }
  97. message CityData {
  98. string code = 1;
  99. string name = 2;
  100. string province_code = 3;
  101. }
  102. message AreaData {
  103. string code = 1;
  104. string name = 2;
  105. string province_code = 3;
  106. string city_code = 4;
  107. }
  108. message ProvinceCityAreaReply {
  109. repeated ProvinceData province_list = 1;
  110. repeated CityData city_list = 2;
  111. repeated AreaData area_list = 3;
  112. }
  113. message StreetCommitteeRequest {
  114. string area_code = 1;
  115. }
  116. message StreetData {
  117. string code = 1;
  118. string name = 2;
  119. }
  120. message CommitteeData {
  121. string code = 1;
  122. string name = 2;
  123. string street_code = 3;
  124. }
  125. message StreetCommitteeReply {
  126. repeated StreetData street_list = 1;
  127. repeated CommitteeData committee_list = 2;
  128. }
  129. message OssObjAddRequest {
  130. repeated string in_list = 1;
  131. repeated string out_list = 2;
  132. }
  133. message OssObjAddReply {
  134. }
  135. message OssObjDelNotExistRequest {
  136. string obj_url = 1;
  137. }
  138. message OssObjDelNotExistReply {
  139. }
  140. message ApplicationListRequest {
  141. int64 page = 1;
  142. int64 page_size = 2;
  143. int32 enable = 3;
  144. int64 package_id = 4;
  145. repeated int64 exclude_ids = 5;
  146. }
  147. message ApplicationItem {
  148. string icon = 1;
  149. string desc = 2;
  150. string name = 3;
  151. string content = 4;
  152. int64 price = 5;
  153. bool enable = 6;
  154. int64 id = 7;
  155. }
  156. message ApplicationListReply {
  157. int64 total = 1;
  158. int64 page = 2;
  159. repeated ApplicationItem list = 3;
  160. }
  161. message ApplicationPermissionItem {
  162. // 父code,若没有则填空
  163. string pcode = 1;
  164. // 小程序组件路径
  165. string applete_path = 2;
  166. // 权限名字
  167. string name = 3;
  168. // 是否拥有该权限
  169. bool selected = 4;
  170. // 路由
  171. string router = 5;
  172. string code = 6;
  173. // 组件路径
  174. string path = 7;
  175. repeated ApplicationPermissionItem childs = 8;
  176. }
  177. message ApplicationPermissionsRequest {
  178. int64 id = 1;
  179. }
  180. message ApplicationPermissionsReply {
  181. repeated ApplicationPermissionItem list = 1;
  182. }
  183. message PackageItem {
  184. string name = 1;
  185. string desc = 2;
  186. int64 price = 3;
  187. int64 house_count = 4;
  188. int64 id = 5;
  189. bool enable = 6;
  190. }
  191. message PackageListRequest {
  192. int64 page = 1;
  193. int64 page_size = 2;
  194. int32 enable = 3;
  195. repeated int64 exclude_ids = 4;
  196. }
  197. message PackageListReply {
  198. int64 page = 1;
  199. int64 total = 2;
  200. repeated PackageItem list = 3;
  201. }
  202. message ApplicationInfoRequest {
  203. int64 id = 1;
  204. }
  205. message ApplicationInfo {
  206. string icon = 1;
  207. string desc = 2;
  208. string name = 3;
  209. string content = 4;
  210. int64 price = 5;
  211. bool enable = 6;
  212. int64 id = 7;
  213. repeated SystemPermissionNotTreeItem permissions = 8;
  214. }
  215. message ApplicationInfoReply {
  216. ApplicationInfo info = 1;
  217. }
  218. message PackageInfoRequest {
  219. int64 id = 1;
  220. }
  221. message PackageInfoReply {
  222. string name = 1;
  223. string desc = 2;
  224. int64 price = 3;
  225. int64 house_count = 4;
  226. int64 id = 5;
  227. bool enable = 6;
  228. repeated ApplicationInfo applications = 7;
  229. }
  230. message MsgPackageInfoRequest {
  231. int64 id = 1;
  232. }
  233. message MsgPackageInfoReply {
  234. // 套餐名称
  235. string name = 1;
  236. // 套餐描述
  237. string comment = 2;
  238. // 套餐价格
  239. int64 price = 3;
  240. // 短信条数
  241. int64 msg_count = 4;
  242. int64 id = 5;
  243. }