account.proto 1.8 KB

1234567891011121314151617181920212223242526272829303132333435363738394041424344454647484950515253545556575859606162636465666768697071727374757677787980818283848586
  1. syntax = "proto3";
  2. package api.account;
  3. import "google/api/annotations.proto";
  4. //import "api/base/base.proto";
  5. //import "google/protobuf/struct.proto";
  6. import "google/protobuf/empty.proto";
  7. option go_package = "git.ikuban.com/server/pw-protobuf/api/account;account";
  8. option java_multiple_files = true;
  9. option java_package = "api.account";
  10. service Account {
  11. rpc DebugLogin (DebugLoginRequest) returns (TokenReply){
  12. option (google.api.http) = {
  13. post: "/api/login/debug",
  14. body:"*"
  15. };
  16. };
  17. rpc Authorization (AuthorizationRequest) returns (TokenReply){
  18. option (google.api.http) = {
  19. post: "/api/authorization",
  20. body:"*"
  21. };
  22. };
  23. rpc SendPhoneCode (SendPhoneCodeRequest) returns (google.protobuf.Empty){
  24. option (google.api.http) = {
  25. post: "/api/user/code/send",
  26. body:"*"
  27. };
  28. };
  29. rpc CheckPhoneCode (CheckPhoneCodeRequest) returns (google.protobuf.Empty){
  30. option (google.api.http) = {
  31. post: "/api/user/code/check",
  32. body:"*"
  33. };
  34. };
  35. }
  36. message SendPhoneCodeRequest {
  37. string phone = 1;
  38. }
  39. message CheckPhoneCodeRequest {
  40. string phone = 1;
  41. string code = 2;
  42. }
  43. message UserInfoDB{
  44. string id = 1; // id
  45. string nickname = 2;// 昵称
  46. string avatarUrl =3;// 头像链接
  47. string phone = 4;// 手机号
  48. int64 sex = 5;// 性别
  49. int64 credit = 6;// 积分
  50. }
  51. message PartnerInfoDB{
  52. string id = 1; // id
  53. string nickname = 2;// 昵称
  54. string avatarUrl =3;// 头像链接
  55. string phone = 4;// 手机号
  56. int64 sex = 5;// 性别
  57. int64 credit = 6;// 积分
  58. }
  59. message AuthorizationRequest {
  60. string jsCode = 1;
  61. string appId = 2;
  62. string type = 3;
  63. }
  64. message TokenReply {
  65. string token = 1;
  66. }
  67. message DebugLoginRequest {
  68. int64 id = 1;
  69. string code = 2;
  70. }
  71. message LoginToken {
  72. string pid = 1;
  73. string type = 2;
  74. }