user.proto 2.7 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103
  1. syntax = "proto3";
  2. package api.user;
  3. import "google/api/annotations.proto";
  4. //import "google/protobuf/struct.proto";
  5. import "google/protobuf/empty.proto";
  6. import "api/chat/chat.proto";
  7. import "api/partner/partner.proto";
  8. import "api/base/base.proto";
  9. option go_package = "git.ikuban.com/server/pw-protobuf/api/user;user";
  10. option java_multiple_files = true;
  11. option java_package = "api.user";
  12. service User {
  13. rpc UpdateUserInformation (UpdateUserInformationRequest) returns (google.protobuf.Empty){
  14. option (google.api.http) = {
  15. post: "/api/user/update/information",
  16. body:"*"
  17. };
  18. };
  19. rpc GetUserInfo (google.protobuf.Empty) returns (UserInfo){
  20. option (google.api.http) = {
  21. post: "/api/user/info",
  22. body:"*"
  23. };
  24. };
  25. rpc SendPhoneCode (SendPhoneCodeRequest) returns (google.protobuf.Empty){
  26. option (google.api.http) = {
  27. post: "/api/user/code/send",
  28. body:"*"
  29. };
  30. };
  31. rpc CheckPhoneCode (CheckPhoneCodeRequest) returns (google.protobuf.Empty){
  32. option (google.api.http) = {
  33. post: "/api/user/code/check",
  34. body:"*"
  35. };
  36. };
  37. rpc CheckUserPartnerIsRelationship (base.PartnerIDParam) returns (chat.CheckUserPartnerIsRelationshipReply){
  38. option (google.api.http) = {
  39. post: "/api/user/check/relationship",
  40. body:"*"
  41. };
  42. };
  43. rpc CreateUserPartnerIsRelationship (base.PartnerIDParam) returns (chat.CreateUserPartnerIsRelationshipReply){
  44. option (google.api.http) = {
  45. post: "/api/user/create/relationship",
  46. body:"*"
  47. };
  48. };
  49. rpc GetPartnerCircleInfo (base.PartnerIDParam) returns (partner.PartnerCircleInfo){
  50. option (google.api.http) = {
  51. post: "/api/partner/circle/info",
  52. body:"*"
  53. };
  54. };
  55. rpc GetUserHomeInfo (base.UserIDParam) returns (UserHomeInfo){
  56. option (google.api.http) = {
  57. post: "/api/user/circle/info",
  58. body:"*"
  59. };
  60. };
  61. }
  62. message UserHomeInfo{
  63. string id = 1; // id
  64. string nickname = 2;// 昵称
  65. string avatarUrl =3;// 头像链接
  66. int64 sex = 4;// 性别
  67. repeated string picture = 5; // 图片
  68. int64 age = 6; // 年龄
  69. string constellation = 7; // 星座
  70. string area = 8; // 地区
  71. repeated string tag = 9; // 标签
  72. string signature = 10; // 签名
  73. int64 followedNum = 11; // 被喜欢的次数
  74. string introduceVoice = 12; // 介绍语音
  75. }
  76. message UserInfo{
  77. string id = 1; // id
  78. string nickname = 2;// 昵称
  79. string avatarUrl =3;// 头像链接
  80. string phone = 4;// 手机号
  81. int64 sex = 5;// 性别
  82. int64 credit = 6;// 积分
  83. }
  84. message UpdateUserInformationRequest {
  85. string Nickname = 1;
  86. string avatarUrl = 2;
  87. int64 sex = 3;
  88. }
  89. message SendPhoneCodeRequest {
  90. string phone = 1;
  91. }
  92. message CheckPhoneCodeRequest {
  93. string phone = 1;
  94. string code = 2;
  95. }