system.proto 1.8 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108
  1. syntax = "proto3";
  2. // package声明符,用来防止不同的消息类型有命名冲突
  3. package pb_v1;
  4. // 用于生成指定语言go的包名称
  5. option go_package = "cp-organization-management/pb/v1";
  6. message CreateUserRequest{
  7. string username = 1;
  8. string password = 2;
  9. }
  10. message CreateUserReply {
  11. int64 uid = 1;
  12. }
  13. message LoginRequest{
  14. string username = 1;
  15. string password = 2;
  16. }
  17. message LoginReply {
  18. int64 uid = 1;
  19. }
  20. message ChangePasswordRequest{
  21. int64 uid = 1;
  22. string password = 2;
  23. }
  24. message ChangePasswordReply {
  25. }
  26. message CreateOrganizationRequest{
  27. string organization_name = 1;
  28. int64 month = 2;
  29. int64 state = 3;
  30. }
  31. message CreateOrganizationReply {
  32. int64 uid = 1;
  33. }
  34. message DeleteOrganizationRequest{
  35. string organization_code = 1;
  36. }
  37. message DeleteOrganizationReply {
  38. }
  39. message Organization {
  40. string organization_name = 1;
  41. string organization_code = 2;
  42. int64 state = 3; // "1 有效,2 停用,3过期,"`
  43. int64 end_time = 4;
  44. }
  45. message UpdateOrganizationRequest{
  46. string organization_name = 1;
  47. int64 month = 2;
  48. int64 state = 3;
  49. string organization_code = 4;
  50. }
  51. message UpdateOrganizationReply {
  52. }
  53. message OrganizationListRequest{
  54. int64 page = 1;
  55. int64 page_size = 2;
  56. }
  57. message OrganizationListReply {
  58. int64 count = 1;
  59. int64 page=2;
  60. repeated Organization organization = 3;
  61. }
  62. message CreateOrganizationUserRequest{
  63. string organization_code = 1;
  64. string username = 2;
  65. string password = 3;
  66. string phone = 4;
  67. string email = 5;
  68. }
  69. message CreateOrganizationUserReply {
  70. int64 uid = 1;
  71. }
  72. message OrganizationKeyAuthRequest {
  73. string key = 1;
  74. }
  75. message OrganizationKeyAuthReply {
  76. string organization_code = 1;
  77. string organization_name = 2;
  78. int64 end_time = 3;
  79. bool is_disable = 4;
  80. }