organization.proto 1.7 KB

1234567891011121314151617181920212223242526272829303132333435363738394041424344454647484950515253545556575859606162636465666768697071727374757677787980818283848586
  1. syntax = "proto3";
  2. // package声明符,用来防止不同的消息类型有命名冲突
  3. package pb_v1;
  4. // 用于生成指定语言go的包名称
  5. option go_package = "cp-system-management/pb/v1";
  6. message InitOrganizationDbRequest{
  7. string organization_code = 1;
  8. }
  9. message InitOrganizationDbReply{
  10. }
  11. message RbacNode {
  12. int64 id = 1;
  13. string name =2;
  14. string router=3;
  15. string method=4;
  16. string resource=5;
  17. string object=6;
  18. int64 pid=7;
  19. bool is_super = 8;
  20. }
  21. message CreateManagementUserRequest{
  22. string organization_code = 1;
  23. string username = 2;
  24. string password = 3;
  25. string phone = 4;
  26. string email = 5;
  27. repeated RbacNode rbac_node_list=6;
  28. bool is_supper_user = 7;
  29. int64 group_id = 8;
  30. string zones = 9;
  31. }
  32. message CreateManagementUserReply{
  33. int64 uid = 1;
  34. }
  35. message ManagementSuperUserItem {
  36. string organization_code = 1;
  37. string username = 2;
  38. string phone = 3;
  39. string email = 4;
  40. int64 id = 5;
  41. string created_at = 6;
  42. }
  43. // 供系统端调用
  44. message ManagementSuperUserListRequest {
  45. int64 page = 1;
  46. int64 page_size = 2;
  47. string organization_code = 3;
  48. }
  49. message ManagementSuperUserListReply {
  50. int64 total = 1;
  51. int64 page = 2;
  52. repeated ManagementSuperUserItem list = 3;
  53. }
  54. message ManagementSuperUserUpdateRequest {
  55. string organization_code = 1;
  56. string username = 2;
  57. string phone = 3;
  58. string email = 4;
  59. int64 id = 5;
  60. string password = 6;
  61. }
  62. message ManagementSuperUserUpdateReply {
  63. ManagementSuperUserUpdateRequest origin = 1;
  64. }
  65. message ManagementSuperUserResetPasswordRequest {
  66. string organization_code = 1;
  67. int64 id = 2;
  68. string password = 3;
  69. }
  70. message ManagementSuperUserResetPasswordReply {
  71. }