common.proto 8.1 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156157158159160161162163164165166167168169170171172173174175176177178179180181182183184185186187188189190191192193194195196197198199200201202203204205206207208209210211212213214215216217218219220221222223224225226227228229230231232233234235236237238239240241242243244245246247248249250251252253254255256257258259260261262263264265266267268269270271272273274275276277278279280281282283284285286287288289290291292293294295296297298299300301302303304305306307308309310311312313314315316317318319320321322323324325326327328329330331332333334335336337338339340341342343344345346347348349350351352353354355356357358359360361362
  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 ChatCardInfo{
  34. string id = 1; // id
  35. string nickname = 2;// 昵称
  36. string avatarUrl =3;// 头像链接
  37. int64 sex = 4;// 性别
  38. int64 age = 6; // 年龄
  39. string constellation = 7; // 星座
  40. repeated common.TagList tagList = 9; // 标签列表
  41. string introduceVoice = 10; // 介绍语音
  42. string province = 11;// 省
  43. string city = 12;// 市
  44. string area = 13;// 区
  45. bool isFinishInformation = 14;//是否完善资料
  46. }
  47. message UserIDParam {
  48. string userId = 1;
  49. }
  50. message WxConfReq {
  51. string url = 1;
  52. }
  53. message WxConfResponse{
  54. string appId = 1; // 必填,公众号的唯一标识
  55. int64 timestamp = 2; // 必填,生成签名的时间戳
  56. string nonceStr = 3;// 必填,生成签名的随机串
  57. string signature = 4;// 必填,签名
  58. string url = 5;// 传入的url
  59. }
  60. // 主页信息
  61. message HomeInfo{
  62. string id = 1; // id
  63. string nickname = 2;// 昵称
  64. string avatarUrl =3;// 头像链接
  65. int64 sex = 4;// 性别
  66. repeated string pictures = 5; // 图片
  67. int64 age = 6; // 年龄
  68. string constellation = 7; // 星座
  69. repeated TagList tagList = 8; // 标签
  70. string signature = 9; // 签名
  71. string introduceVoice = 10; // 介绍语音
  72. string province = 11;// 省
  73. string city = 12;// 市
  74. string area = 13;// 区
  75. }
  76. message PersonMsg {
  77. string id = 1; // id
  78. string nickname = 2;// 昵称
  79. string avatarUrl =3;// 头像链接
  80. int64 sex = 4;// 性别
  81. repeated string pictures = 5; // 图片
  82. int64 age = 6; // 年龄
  83. string constellation = 7; // 星座
  84. repeated int64 tagList = 8; // 标签
  85. string signature = 9; // 签名
  86. string introduceVoice = 10; // 介绍语音
  87. string province = 11;// 省
  88. string city = 12;// 市
  89. string area = 13;// 区
  90. bool isFinishInformation = 14; // 是否完成注册
  91. }
  92. message LookedAndLikedNum{
  93. string id = 1; // id
  94. int64 lookedNum = 2; // 看过ta的数量
  95. int64 likedNum = 3;// 喜欢ta的数量
  96. }
  97. // 添加好友页面信息
  98. message AddFriendMessageInfo{
  99. string id = 1; // id
  100. string nickname = 2;// 昵称
  101. string avatarUrl =3;// 头像链接
  102. int64 sex = 4;// 性别
  103. repeated string pictures = 5; // 图片
  104. string fromOpenId = 6;// 来源公众号对应的openID
  105. bool isRegister = 7;// 是否注册
  106. bool isChat = 8;// 是否聊天
  107. bool isFromUs = 9;// 是否是来源我们
  108. string fromAppId = 10;// 来源公众号对应的appID
  109. string fromName = 11;// 来源公众号对应的公众号名称
  110. string constellation = 12; // 星座
  111. string signature = 13;// 介绍(签名)
  112. string province = 14;// 省
  113. string city = 15;// 市
  114. string area = 16;// 区
  115. }
  116. message PersonIDList{
  117. repeated string personIds = 1;
  118. }
  119. message PersonDBReply{
  120. repeated PersonDB list = 1;
  121. }
  122. message PersonDB{
  123. string id = 1; // id
  124. string nickname = 2;// 昵称
  125. string avatarUrl =3;// 头像链接
  126. int64 sex = 4;// 性别
  127. repeated string pictures = 5; // 图片
  128. int64 age = 6; // 年龄
  129. string constellation = 7; // 星座
  130. string introduceVoice = 8; // 介绍语音
  131. string province = 9;// 省
  132. string city = 10;// 市
  133. string area = 11;// 区
  134. string signature = 12;//介绍
  135. bool isFinishInformation = 13;//是否完善消息
  136. repeated int64 tagList = 14;// 标签列表
  137. }
  138. message ListPageRequest{
  139. int64 nextId = 1;
  140. int64 offset = 2;
  141. }
  142. message ListPageAndSexRequest{
  143. int64 nextId = 1;
  144. int64 offset = 2;
  145. int64 sex = 3;// 对方的性别
  146. }
  147. message FindChatTopicRequest{
  148. string type = 1;// 话题类型
  149. int64 sex = 2;// 对方的性别
  150. }
  151. message ListPage2Request{
  152. string nextId = 1;
  153. int64 offset = 2;
  154. }
  155. message ListPageAndPersonRequest{
  156. string nextId = 1;
  157. int64 offset = 2;
  158. string personID = 3; // 查询目标的ID
  159. string personType = 4; // 类型
  160. }
  161. message SendPhoneCodeRequest {
  162. string phone = 1;
  163. }
  164. message CheckPhoneCodeRequest {
  165. string phone = 1;
  166. string code = 2;
  167. }
  168. message UploadMaterialResponse{
  169. string link = 1;
  170. }
  171. message Ids {
  172. repeated int64 ids = 1;// 标签ID
  173. }
  174. message TagListReply{
  175. repeated TagList list = 1;// 标签列表
  176. }
  177. message TagList{
  178. int64 id = 1; // 标签ID
  179. string name = 2;// 分组名
  180. }
  181. message SexReq{
  182. int64 sex = 1;
  183. }
  184. message RandomIntroduceReply{
  185. string introduce = 1;
  186. }
  187. message UpdateInformationRequest {
  188. string nickname = 1; // 昵称
  189. string avatarUrl = 2;// 头像
  190. int64 sex = 3; // 性别
  191. int64 birthday = 4;// 出生日期(毫秒级时间戳)
  192. repeated int64 tagList = 5;// 标签id列表
  193. string introduceVoice = 6;// 介绍语音的链接
  194. string signature = 7;// 介绍(签名)
  195. repeated string pictures = 8;// 相册(主页图片)
  196. string province = 9;// 省
  197. string city = 10;// 市
  198. string area = 11;// 区
  199. }
  200. message OnlinePersonListReply{
  201. repeated OnlinePersonInfo list = 1;
  202. string nextId = 2;
  203. }
  204. message OnlinePersonInfo{
  205. string personID = 1; // 查询目标的ID
  206. string personType = 2; // 类型
  207. string nickname = 3;// 昵称
  208. string avatarUrl =4;// 头像链接
  209. int64 sex = 5;// 性别
  210. int64 age = 6; // 年龄
  211. string constellation = 7; // 星座
  212. string signature = 8; // 签名
  213. string province = 9;// 省
  214. string city = 10;// 市
  215. string area = 11;// 区
  216. string introduceVoice = 12;// 介绍语音
  217. repeated string tagList = 13;// 标签
  218. }
  219. message ChatRecordListReply{
  220. repeated ChatRecordInfo list = 1;
  221. int64 nextId = 2;
  222. }
  223. message ChatRoomMsg{
  224. int64 roomId = 1; // 房间ID
  225. ChatPersonMsg self = 2; // 自己的信息
  226. ChatPersonMsg other = 3; // 对方的信息
  227. int64 likeability = 5; // 对对方的好感度
  228. }
  229. message ChatPersonMsg{
  230. string id = 1; // id
  231. string type = 2; // 类型
  232. string nickname = 3; // 昵称
  233. string avatar = 4; // 头像
  234. int64 sex = 5;// 性别
  235. }
  236. message ChatRecordInfo{
  237. int64 messageId = 1; // 消息的ID
  238. string msgType = 2; // 消息类型
  239. Message message = 3; // 消息的结构
  240. int64 roomId = 4; // 房间ID
  241. bool isSelf = 5; // 是否是自己
  242. int64 sendTime = 6; // 发送时间
  243. string status = 7; // 消息状态
  244. string statusMsg = 8;// 状态说明
  245. bool isRead = 9;// 对方是否已读
  246. }
  247. message ChatIsReadInfo{
  248. int64 messageId = 1; // 消息的ID
  249. int64 roomId = 4; // 房间ID
  250. }
  251. message GoToRoom{
  252. int64 roomId = 1; // 房间ID
  253. }
  254. message Message{
  255. string content = 1; // 文本内容
  256. string materialUrl = 2; // 素材链接
  257. }
  258. message FindChatRoomMsgRequest{
  259. int64 roomId = 1;
  260. }
  261. message RoomIDRequest{
  262. int64 roomId = 1;
  263. }
  264. message FindChatRecordListRequest{
  265. int64 nextId = 1;
  266. int64 offset = 2;
  267. int64 roomId = 3;
  268. }
  269. message IsLike{
  270. bool isLike = 1;// 是否喜欢(关注)
  271. }
  272. message BalanceRequest{
  273. string personID = 1; // 查询目标的ID
  274. string personType = 2; // 类型
  275. int64 balance = 3;// 充值或者减少的金额
  276. }
  277. message RandomNum {
  278. int64 num = 1; // 随机的数量
  279. }
  280. message RandomNumAndSex {
  281. int64 num = 1; // 随机的数量
  282. int64 sex = 2; // 对方的性别
  283. }
  284. message MemeRequest{
  285. int64 nextId = 1;
  286. int64 offset = 2;
  287. string type = 3;
  288. }
  289. message CommonTextList {
  290. repeated string list = 1;// 需要的数据集合(随机表情包、随机打招呼)
  291. }
  292. message MemeTitleList {
  293. repeated MemeTitle list = 1;// 需要的数据集合(随机表情包、随机打招呼)
  294. }
  295. message MemeTitle{
  296. string name = 1;// 名称
  297. string type = 2;// 类型
  298. }
  299. message MemeList {
  300. repeated string list = 1;// 表情包列表
  301. int64 nextId = 2;
  302. }
  303. message ChatTopicList {
  304. repeated string list = 1;// 话题列表
  305. }