user.proto 2.4 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687
  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 CheckUserPartnerIsRelationship (base.PartnerIDParam) returns (chat.CheckUserPartnerIsRelationshipReply){
  26. option (google.api.http) = {
  27. post: "/api/user/check/relationship",
  28. body:"*"
  29. };
  30. };
  31. rpc CreateUserPartnerIsRelationship (base.PartnerIDParam) returns (chat.CreateUserPartnerIsRelationshipReply){
  32. option (google.api.http) = {
  33. post: "/api/user/create/relationship",
  34. body:"*"
  35. };
  36. };
  37. rpc GetPartnerCircleInfo (base.PartnerIDParam) returns (partner.PartnerCircleInfo){
  38. option (google.api.http) = {
  39. post: "/api/partner/circle/info",
  40. body:"*"
  41. };
  42. };
  43. rpc GetUserHomeInfo (base.UserIDParam) returns (UserHomeInfo){
  44. option (google.api.http) = {
  45. post: "/api/user/circle/info",
  46. body:"*"
  47. };
  48. };
  49. }
  50. message UserHomeInfo{
  51. string id = 1; // id
  52. string nickname = 2;// 昵称
  53. string avatarUrl =3;// 头像链接
  54. int64 sex = 4;// 性别
  55. repeated string pictures = 5; // 图片
  56. int64 age = 6; // 年龄
  57. string constellation = 7; // 星座
  58. string area = 8; // 地区
  59. repeated string tag = 9; // 标签
  60. string signature = 10; // 签名
  61. string introduceVoice = 11; // 介绍语音
  62. int64 likedNum = 12;// 喜欢我
  63. int64 lookNum = 13;// 看过我
  64. }
  65. message UserInfo{
  66. string id = 1; // id
  67. string nickname = 2;// 昵称
  68. string avatarUrl =3;// 头像链接
  69. int64 age = 4;// 年龄
  70. int64 sex = 5;// 性别
  71. int64 credit = 6;// 积分
  72. int64 likeNum = 7;// 我喜欢
  73. int64 likedNum = 8;// 喜欢我
  74. int64 lookNum = 9;// 看过我
  75. }
  76. message UpdateUserInformationRequest {
  77. string Nickname = 1;
  78. string avatarUrl = 2;
  79. int64 sex = 3;
  80. }