common.proto 7.3 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156157158159160161162163164165166167168169170171172173174175176177178179180181182183184185186187188189190191192193194195196197198199200201202203204205206207208209210211212213214215216217218219220221222223224225226227228229230231232233234235236237238239240241242243244245246247248249250251252253254255256257258259260261262263264265266267268269270271272273274275276277278279280281282283284285286287288289290291292293294295296297298299300301302303304305306307308309310311312313314315316317318319320321322323324325
  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 UserAndPartnerIdentifyIdParam {
  10. string partnerIdentifyId = 1;
  11. string userIdentifyId = 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. repeated int64 tagList = 14;// 标签列表
  122. }
  123. message ListPageRequest{
  124. int64 nextId = 1;
  125. int64 offset = 2;
  126. }
  127. message ListPageAndSexRequest{
  128. int64 nextId = 1;
  129. int64 offset = 2;
  130. int64 sex = 3;// 对方的性别
  131. }
  132. message ListPage2Request{
  133. string nextId = 1;
  134. int64 offset = 2;
  135. }
  136. message ListPageAndPersonRequest{
  137. string nextId = 1;
  138. int64 offset = 2;
  139. string personID = 3; // 查询目标的ID
  140. string personType = 4; // 类型
  141. }
  142. message SendPhoneCodeRequest {
  143. string phone = 1;
  144. }
  145. message CheckPhoneCodeRequest {
  146. string phone = 1;
  147. string code = 2;
  148. }
  149. message UploadMaterialResponse{
  150. string link = 1;
  151. }
  152. message Ids {
  153. repeated int64 ids = 1;// 标签ID
  154. }
  155. message TagListReply{
  156. repeated TagList list = 1;// 标签列表
  157. }
  158. message TagList{
  159. int64 id = 1; // 标签ID
  160. string name = 2;// 分组名
  161. }
  162. message SexReq{
  163. int64 sex = 1;
  164. }
  165. message RandomIntroduceReply{
  166. string introduce = 1;
  167. }
  168. message UpdateInformationRequest {
  169. string nickname = 1; // 昵称
  170. string avatarUrl = 2;// 头像
  171. int64 sex = 3; // 性别
  172. int64 birthday = 4;// 出生日期(毫秒级时间戳)
  173. repeated int64 tagList = 5;// 标签id列表
  174. string introduceVoice = 6;// 介绍语音的链接
  175. string signature = 7;// 介绍(签名)
  176. repeated string pictures = 8;// 相册(主页图片)
  177. string province = 9;// 省
  178. string city = 10;// 市
  179. string area = 11;// 区
  180. }
  181. message OnlinePersonListReply{
  182. repeated OnlinePersonInfo list = 1;
  183. string nextId = 2;
  184. }
  185. message OnlinePersonInfo{
  186. string personID = 1; // 查询目标的ID
  187. string personType = 2; // 类型
  188. string nickname = 3;// 昵称
  189. string avatarUrl =4;// 头像链接
  190. int64 sex = 5;// 性别
  191. int64 age = 6; // 年龄
  192. string constellation = 7; // 星座
  193. string signature = 8; // 签名
  194. string province = 9;// 省
  195. string city = 10;// 市
  196. string area = 11;// 区
  197. string introduceVoice = 12;// 介绍语音
  198. repeated string tagList = 13;// 标签
  199. }
  200. message ChatRecordListReply{
  201. repeated ChatRecordInfo list = 1;
  202. int64 nextId = 2;
  203. }
  204. message ChatRoomMsg{
  205. int64 roomId = 1; // 房间ID
  206. ChatPersonMsg self = 2; // 自己的信息
  207. ChatPersonMsg other = 3; // 对方的信息
  208. int64 likeability = 5; // 对对方的好感度
  209. }
  210. message ChatPersonMsg{
  211. string id = 1; // id
  212. string type = 2; // 类型
  213. string nickname = 3; // 昵称
  214. string avatar = 4; // 头像
  215. }
  216. message ChatRecordInfo{
  217. int64 messageId = 1; // 消息的ID
  218. string msgType = 2; // 消息类型
  219. Message message = 3; // 消息的结构
  220. int64 roomId = 4; // 房间ID
  221. bool isSelf = 5; // 是否是自己
  222. int64 sendTime = 6; // 发送时间
  223. string status = 7; // 消息状态
  224. string statusMsg = 8;// 状态说明
  225. bool isRead = 9;// 对方是否已读
  226. }
  227. message ChatIsReadInfo{
  228. int64 messageId = 1; // 消息的ID
  229. int64 roomId = 4; // 房间ID
  230. }
  231. message Message{
  232. string content = 1; // 文本内容
  233. string materialUrl = 2; // 素材链接
  234. }
  235. message FindChatRoomMsgRequest{
  236. int64 roomId = 1;
  237. }
  238. message FindChatRecordListRequest{
  239. int64 nextId = 1;
  240. int64 offset = 2;
  241. int64 roomId = 3;
  242. }
  243. message IsLike{
  244. bool isLike = 1;// 是否喜欢(关注)
  245. }
  246. message BalanceRequest{
  247. string personID = 1; // 查询目标的ID
  248. string personType = 2; // 类型
  249. int64 balance = 3;// 充值或者减少的金额
  250. }
  251. message RandomNum {
  252. int64 num = 1; // 随机的数量
  253. }
  254. message RandomNumAndSex {
  255. int64 num = 1; // 随机的数量
  256. int64 sex = 2; // 对方的性别
  257. }
  258. message MemeRequest{
  259. int64 nextId = 1;
  260. int64 offset = 2;
  261. string type = 3;
  262. }
  263. message CommonTextList {
  264. repeated string list = 1;// 需要的数据集合(随机表情包、随机打招呼)
  265. }
  266. message MemeList {
  267. repeated string list = 1;// 表情包列表
  268. int64 nextId = 2;
  269. }
  270. message ChatTopicList {
  271. repeated string list = 1;// 话题列表
  272. int64 nextId = 2;
  273. }