user.proto 4.4 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153
  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/common/common.proto";
  8. import "api/statistics/statistics.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. // 更新用户信息
  14. rpc UpdateUserInformation (common.UpdateInformationRequest) returns (google.protobuf.Empty){
  15. option (google.api.http) = {
  16. post: "/api/user/update/information",
  17. body:"*"
  18. };
  19. };
  20. // 获取用户详情
  21. rpc GetUserInfo (google.protobuf.Empty) returns (UserInfo){
  22. option (google.api.http) = {
  23. post: "/api/user/info",
  24. body:"*"
  25. };
  26. };
  27. // 获取用户详情
  28. rpc GetUserDBMsg (common.PersonIDParam) returns (common.PersonMsg);
  29. // 获取用户访问数详情
  30. rpc GetUserLookNum (google.protobuf.Empty) returns (statistics.LookMessageReply){
  31. option (google.api.http) = {
  32. post: "/api/user/look/num",
  33. body:"*"
  34. };
  35. };
  36. // 用户发送验证码
  37. rpc SendPhoneCode (common.SendPhoneCodeRequest) returns (google.protobuf.Empty){
  38. option (google.api.http) = {
  39. post: "/api/user/code/send",
  40. body:"*"
  41. };
  42. };
  43. // 用户验证验证码
  44. rpc CheckPhoneCode (common.CheckPhoneCodeRequest) returns (google.protobuf.Empty){
  45. option (google.api.http) = {
  46. post: "/api/user/code/check",
  47. body:"*"
  48. };
  49. };
  50. // 检查用户是否与接待员关联
  51. rpc CheckUserPartnerIsRelationship (common.PartnerIDParam) returns (chat.CheckUserPartnerIsRelationshipReply){
  52. option (google.api.http) = {
  53. post: "/api/user/check/relationship",
  54. body:"*"
  55. };
  56. };
  57. // 创建用户与接待员的关联
  58. rpc CreateUserPartnerRoom (common.PartnerIDParam) returns (chat.RoomReply){
  59. option (google.api.http) = {
  60. post: "/api/user/create/room",
  61. body:"*"
  62. };
  63. };
  64. // 获取接待员的确认通过页面信息
  65. rpc GetPartnerCircleInfo (KeyRequest) returns (common.AddFriendMessageInfo){
  66. option (google.api.http) = {
  67. post: "/api/user/circle/info",
  68. body:"*"
  69. };
  70. };
  71. // 用户获取主页信息
  72. rpc UserGetHomeInfo (common.PersonParam) returns (common.HomeInfo){
  73. option (google.api.http) = {
  74. post: "/api/user/home",
  75. body:"*"
  76. };
  77. };
  78. // 通过用户IDs查看用户信息列表
  79. rpc FindUserDBList (common.PersonIDList) returns (common.PersonDBReply);
  80. // 查看看过我的列表
  81. rpc FindLookList (common.ListPageRequest) returns (statistics.LookAndLikeListReply){
  82. option (google.api.http) = {
  83. post: "/api/user/list/look",
  84. body:"*"
  85. };
  86. };
  87. // 查看我喜欢的列表
  88. rpc FindLikeList (common.ListPageRequest) returns (statistics.LookAndLikeListReply){
  89. option (google.api.http) = {
  90. post: "/api/user/list/like",
  91. body:"*"
  92. };
  93. };
  94. // 查看喜欢我的列表
  95. rpc FindLikedList (common.ListPageRequest) returns (statistics.LookAndLikeListReply){
  96. option (google.api.http) = {
  97. post: "/api/user/list/liked",
  98. body:"*"
  99. };
  100. };
  101. // 获取用户的访客数以及关注数
  102. rpc GetLookAndLikeStatisticsMessage (common.PersonParam) returns (statistics.LookAndLikeMessageReply){
  103. option (google.api.http) = {
  104. post: "/api/user/num/like_look",
  105. body:"*"
  106. };
  107. };
  108. // 微信SDK初始化
  109. rpc WxConf (common.WxConfReq) returns (common.WxConfResponse){
  110. option (google.api.http) = {
  111. post: "/api/wx/jssdk/config",
  112. body:"*"
  113. };
  114. };
  115. // 获取标签列表
  116. rpc FindTagListBySex (common.SexReq) returns (common.TagListReply){
  117. option (google.api.http) = {
  118. post: "/api/user/list/tag",
  119. body:"*"
  120. };
  121. };
  122. // 获取标签列表
  123. rpc FindOnlineList (common.ListPage2Request) returns (common.OnlinePersonListReply){
  124. option (google.api.http) = {
  125. post: "/api/user/list/online",
  126. body:"*"
  127. };
  128. };
  129. }
  130. message UserInfo{
  131. string id = 1; // id
  132. string nickname = 2;// 昵称
  133. string avatarUrl =3;// 头像链接
  134. int64 age = 4;// 年龄
  135. int64 sex = 5;// 性别
  136. string constellation = 6; // 星座
  137. int64 credit = 7;// 积分
  138. repeated int64 tagList = 8; // 标签
  139. string signature = 9; // 签名
  140. string introduceVoice = 10; // 介绍语音
  141. string province = 11;// 省
  142. string city = 12;// 市
  143. string area = 13;// 区
  144. }
  145. message KeyRequest{
  146. string key = 1;
  147. }