common.proto 6.2 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156157158159160161162163164165166167168169170171172173174175176177178179180181182183184185186187188189190191192193194195196197198199200201202203204205206207208209210211212213214215216217218219220221222223224225226227228229230231232233234235236237238239240241242243244245246247248249250251252253254255256257258259260261262263264265266267268269270271272
  1. syntax = "proto3";
  2. package api.common;
  3. //import "google/api/annotations.proto";
  4. //import "google/protobuf/struct.proto";
  5. //import "google/protobuf/empty.proto";
  6. option go_package = "git.ikuban.com/server/pw-protobuf/api/common;common";
  7. option java_multiple_files = true;
  8. option java_package = "api.common";
  9. message UserAndPartnerIdParam {
  10. string partnerId = 1;
  11. string userId = 2;
  12. }
  13. message UserAndPartnerParam {
  14. string partnerId = 1;
  15. string partnerIdentifyID = 2; // 身份ID
  16. string userId = 3;
  17. string userIdentifyID = 4; // 身份ID
  18. }
  19. message User1AndUser2IdParam {
  20. string user1 = 1;
  21. string user2 = 2;
  22. }
  23. message PartnerIDParam {
  24. string partnerID = 1;
  25. }
  26. message PersonIDParam {
  27. string personID = 1;
  28. }
  29. message PersonParam{
  30. string personID = 1; // 查询目标的ID
  31. string personType = 2; // 类型
  32. }
  33. message UserIDParam {
  34. string userId = 1;
  35. }
  36. message WxConfReq {
  37. string url = 1;
  38. }
  39. message WxConfResponse{
  40. string appId = 1; // 必填,公众号的唯一标识
  41. int64 timestamp = 2; // 必填,生成签名的时间戳
  42. string nonceStr = 3;// 必填,生成签名的随机串
  43. string signature = 4;// 必填,签名
  44. string url = 5;// 传入的url
  45. }
  46. // 主页信息
  47. message HomeInfo{
  48. string id = 1; // id
  49. string nickname = 2;// 昵称
  50. string avatarUrl =3;// 头像链接
  51. int64 sex = 4;// 性别
  52. repeated string pictures = 5; // 图片
  53. int64 age = 6; // 年龄
  54. string constellation = 7; // 星座
  55. repeated TagList tagList = 8; // 标签
  56. string signature = 9; // 签名
  57. string introduceVoice = 10; // 介绍语音
  58. string province = 11;// 省
  59. string city = 12;// 市
  60. string area = 13;// 区
  61. }
  62. message PersonMsg {
  63. string id = 1; // id
  64. string nickname = 2;// 昵称
  65. string avatarUrl =3;// 头像链接
  66. int64 sex = 4;// 性别
  67. repeated string pictures = 5; // 图片
  68. int64 age = 6; // 年龄
  69. string constellation = 7; // 星座
  70. repeated int64 tagList = 8; // 标签
  71. string signature = 9; // 签名
  72. string introduceVoice = 10; // 介绍语音
  73. string province = 11;// 省
  74. string city = 12;// 市
  75. string area = 13;// 区
  76. }
  77. message LookedAndLikedNum{
  78. string id = 1; // id
  79. int64 lookedNum = 2; // 看过ta的数量
  80. int64 likedNum = 3;// 喜欢ta的数量
  81. }
  82. // 添加好友页面信息
  83. message AddFriendMessageInfo{
  84. string id = 1; // id
  85. string nickname = 2;// 昵称
  86. string avatarUrl =3;// 头像链接
  87. int64 sex = 4;// 性别
  88. repeated string pictures = 5; // 图片
  89. string fromOpenId = 6;// 来源公众号对应的openID
  90. bool isRegister = 7;// 是否注册
  91. bool isChat = 8;// 是否聊天
  92. bool isFromUs = 9;// 是否是来源我们
  93. string fromAppId = 10;// 来源公众号对应的appID
  94. string fromName = 11;// 来源公众号对应的公众号名称
  95. string constellation = 12; // 星座
  96. string signature = 13;// 介绍(签名)
  97. string province = 14;// 省
  98. string city = 15;// 市
  99. string area = 16;// 区
  100. }
  101. message PersonIDList{
  102. repeated string personIds = 1;
  103. }
  104. message PersonDBReply{
  105. repeated PersonDB list = 1;
  106. }
  107. message PersonDB{
  108. string id = 1; // id
  109. string nickname = 2;// 昵称
  110. string avatarUrl =3;// 头像链接
  111. int64 sex = 4;// 性别
  112. repeated string pictures = 5; // 图片
  113. int64 age = 6; // 年龄
  114. string constellation = 7; // 星座
  115. string introduceVoice = 8; // 介绍语音
  116. string province = 9;// 省
  117. string city = 10;// 市
  118. string area = 11;// 区
  119. string signature = 12;//介绍
  120. bool isFinishInformation = 13;//是否完善消息
  121. }
  122. message ListPageRequest{
  123. int64 nextId = 1;
  124. int64 offset = 2;
  125. }
  126. message ListPage2Request{
  127. string nextId = 1;
  128. int64 offset = 2;
  129. }
  130. message ListPageAndPersonRequest{
  131. string nextId = 1;
  132. int64 offset = 2;
  133. string personID = 3; // 查询目标的ID
  134. string personType = 4; // 类型
  135. }
  136. message SendPhoneCodeRequest {
  137. string phone = 1;
  138. }
  139. message CheckPhoneCodeRequest {
  140. string phone = 1;
  141. string code = 2;
  142. }
  143. message UploadMaterialResponse{
  144. string link = 1;
  145. }
  146. message Ids {
  147. repeated int64 ids = 1;// 标签ID
  148. }
  149. message TagListReply{
  150. repeated TagList list = 1;// 标签列表
  151. }
  152. message TagList{
  153. int64 id = 1; // 标签ID
  154. string name = 2;// 分组名
  155. }
  156. message SexReq{
  157. int64 sex = 1;
  158. }
  159. message RandomIntroduceReply{
  160. string introduce = 1;
  161. }
  162. message UpdateInformationRequest {
  163. string nickname = 1; // 昵称
  164. string avatarUrl = 2;// 头像
  165. int64 sex = 3; // 性别
  166. int64 birthday = 4;// 出生日期(毫秒级时间戳)
  167. repeated int64 tagList = 5;// 标签id列表
  168. string introduceVoice = 6;// 介绍语音的链接
  169. string signature = 7;// 介绍(签名)
  170. repeated string pictures = 8;// 相册(主页图片)
  171. string province = 9;// 省
  172. string city = 10;// 市
  173. string area = 11;// 区
  174. }
  175. message OnlinePersonListReply{
  176. repeated OnlinePersonInfo list = 1;
  177. string nextId = 2;
  178. }
  179. message OnlinePersonInfo{
  180. string personID = 1; // 查询目标的ID
  181. string personType = 2; // 类型
  182. string nickname = 3;// 昵称
  183. string avatarUrl =4;// 头像链接
  184. int64 sex = 5;// 性别
  185. int64 age = 6; // 年龄
  186. string constellation = 7; // 星座
  187. string signature = 8; // 签名
  188. string province = 9;// 省
  189. string city = 10;// 市
  190. string area = 11;// 区
  191. }
  192. message ChatRecordListReply{
  193. repeated ChatRecordInfo list = 1;
  194. int64 nextId = 2;
  195. }
  196. message ChatRoomMsg{
  197. int64 roomId = 1; // 房间ID
  198. ChatPersonMsg self = 2; // 自己的信息
  199. ChatPersonMsg other = 3; // 对方的信息
  200. int64 likeability = 5; // 对对方的好感度
  201. bool isSubscribe = 6; // 是否关注
  202. }
  203. message ChatPersonMsg{
  204. string id = 1; // id
  205. string type = 2; // 类型
  206. string nickname = 3; // 昵称
  207. string avatar = 4; // 头像
  208. }
  209. message ChatRecordInfo{
  210. int64 messageId = 1; // 消息的ID
  211. string msgType = 2; // 消息类型
  212. Message message = 3; // 消息的结构
  213. int64 roomId = 4; // 房间ID
  214. bool isSelf = 5; // 是否是自己
  215. int64 sendTime = 6; // 发送时间
  216. string status = 7; // 消息状态
  217. }
  218. message Message{
  219. string content = 1; // 文本内容
  220. string materialUrl = 2; // 素材链接
  221. int64 second = 3;// 音频的秒数
  222. }
  223. message FindChatRoomMsgRequest{
  224. int64 roomId = 1;
  225. }
  226. message FindChatRecordListRequest{
  227. int64 nextId = 1;
  228. int64 offset = 2;
  229. int64 roomId = 3;
  230. }