common.proto 17 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156157158159160161162163164165166167168169170171172173174175176177178179180181182183184185186187188189190191192193194195196197198199200201202203204205206207208209210211212213214215216217218219220221222223224225226227228229230231232233234235236237238239240241242243244245246247248249250251252253254255256257258259260261262263264265266267268269270271272273274275276277278279280281282283284285286287288289290291292293294295296297298299300301302303304305306307308309310311312313314315316317318319320321322323324325326327328329330331332333334335336337338339340341342343344345346347348349350351352353354355356357358359360361362363364365366367368369370371372373374375376377378379380381382383384385386387388389390391392393394395396397398399400401402403404405406407408409410411412413414415416417418419420421422423424425426427428429430431432433434435436437438439440441442443444445446447448449450451452453454455456457458459460461462463464465466467468469470471472473474475476477478479480481482483484485486487488489490491492493494495496497498499500501502503504505506507508509510511512513514515516517518519520521522523524525526527528529530531532533534535536537538539540541542543544545546547548549550551552553554555556557558559560561562563564565566567568569570571572573574575576577578579580581582583584585586587588589590591592593594595596597598599600601602603604605606607608609610611612613614615616617618619620621622623624625626627628629630631632633634635636637638639640641642643644645646647648649650651652653654655656657658659660661662663664665666667668669670671672673674675676677678679680681682683684685686687688689690691692693694695696697698699700701702703704705706707708709710711712713714715716717718719720
  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 IDParam{
  30. int64 id = 1;
  31. }
  32. message PersonParam{
  33. string personID = 1; // 查询目标的ID
  34. }
  35. message CreateChatRoomParam{
  36. string personID = 1; // 查询目标的ID
  37. string source = 3;// 来源
  38. }
  39. message ChatCardInfo{
  40. string id = 1; // id
  41. string nickname = 2;// 昵称
  42. string avatarUrl =3;// 头像链接
  43. int64 sex = 4;// 性别
  44. int64 age = 6; // 年龄
  45. string constellation = 7; // 星座
  46. repeated string list = 9; // 相册列表
  47. string introduceVoice = 10; // 介绍语音
  48. string province = 11;// 省
  49. string city = 12;// 市
  50. string area = 13;// 区
  51. bool isFinishInformation = 14;//是否完善资料
  52. string signature = 15;// 签名
  53. }
  54. message UserIDParam {
  55. string userId = 1;
  56. }
  57. message WxConfReq {
  58. string url = 1;
  59. }
  60. message WxConfResponse{
  61. string appId = 1; // 必填,公众号的唯一标识
  62. int64 timestamp = 2; // 必填,生成签名的时间戳
  63. string nonceStr = 3;// 必填,生成签名的随机串
  64. string signature = 4;// 必填,签名
  65. string url = 5;// 传入的url
  66. }
  67. // 主页信息
  68. message HomeInfo{
  69. string id = 1; // id
  70. string nickname = 2;// 昵称
  71. string avatarUrl =3;// 头像链接
  72. int64 sex = 4;// 性别
  73. repeated string pictures = 5; // 图片
  74. int64 age = 6; // 年龄
  75. string constellation = 7; // 星座
  76. repeated TagList tagList = 8; // 标签
  77. string signature = 9; // 签名
  78. string introduceVoice = 10; // 介绍语音
  79. string province = 11;// 省
  80. string city = 12;// 市
  81. string area = 13;// 区
  82. bool isBlack = 14;// 是否被封号
  83. }
  84. message PersonMsg {
  85. string id = 1; // id
  86. string nickname = 2;// 昵称
  87. string avatarUrl =3;// 头像链接
  88. int64 sex = 4;// 性别
  89. repeated string pictures = 5; // 图片
  90. int64 age = 6; // 年龄
  91. string constellation = 7; // 星座
  92. repeated int64 tagList = 8; // 标签
  93. string signature = 9; // 签名
  94. string introduceVoice = 10; // 介绍语音
  95. string province = 11;// 省
  96. string city = 12;// 市
  97. string area = 13;// 区
  98. bool isFinishInformation = 14; // 是否完成注册
  99. bool isBlack = 15;// 是否被封禁
  100. int64 weight = 16;// 权重
  101. string workingStatus = 17;// 工作状态
  102. int64 lastScripID = 18;// 上次观看小纸条ID
  103. }
  104. message LookedAndLikedNum{
  105. string id = 1; // id
  106. int64 lookedNum = 2; // 看过ta的数量
  107. int64 likedNum = 3;// 喜欢ta的数量
  108. }
  109. // 添加好友页面信息
  110. message AddFriendMessageInfo{
  111. string id = 1; // id
  112. string nickname = 2;// 昵称
  113. string avatarUrl =3;// 头像链接
  114. int64 sex = 4;// 性别
  115. repeated string pictures = 5; // 图片
  116. string fromOpenId = 6;// 来源公众号对应的openID
  117. bool isRegister = 7;// 是否注册
  118. bool isChat = 8;// 是否聊天
  119. bool isFromUs = 9;// 是否是来源我们
  120. string fromAppId = 10;// 来源公众号对应的appID
  121. string fromName = 11;// 来源公众号对应的公众号名称
  122. string constellation = 12; // 星座
  123. string signature = 13;// 介绍(签名)
  124. string province = 14;// 省
  125. string city = 15;// 市
  126. string area = 16;// 区
  127. int64 roomId = 17;// 聊过天的话返回房间ID
  128. }
  129. message PersonIDList{
  130. repeated string personIds = 1;
  131. }
  132. message PersonDBReply{
  133. repeated PersonDB list = 1;
  134. }
  135. message PersonDB{
  136. string id = 1; // id
  137. string nickname = 2;// 昵称
  138. string avatarUrl =3;// 头像链接
  139. int64 sex = 4;// 性别
  140. repeated string pictures = 5; // 图片
  141. int64 age = 6; // 年龄
  142. string constellation = 7; // 星座
  143. string introduceVoice = 8; // 介绍语音
  144. string province = 9;// 省
  145. string city = 10;// 市
  146. string area = 11;// 区
  147. string signature = 12;//介绍
  148. bool isFinishInformation = 13;//是否完善消息
  149. repeated int64 tagList = 14;// 标签列表
  150. int64 personId = 16;// 用户id(number)
  151. }
  152. message ScripIdRequest {
  153. int64 scripId = 1;// 纸条id
  154. }
  155. message ListPageRequest{
  156. int64 nextId = 1;
  157. int64 offset = 2;
  158. }
  159. message ListPageAndSexRequest{
  160. int64 nextId = 1;
  161. int64 offset = 2;
  162. int64 sex = 3;// 对方的性别
  163. }
  164. message FindChatTopicRequest{
  165. string type = 1;// 话题类型
  166. int64 sex = 2;// 对方的性别
  167. }
  168. message ListPage2Request{
  169. string nextId = 1;
  170. int64 offset = 2;
  171. }
  172. message ListPageAndPersonRequest{
  173. string nextId = 1;
  174. int64 offset = 2;
  175. string personID = 3; // 查询目标的ID
  176. }
  177. message SendPhoneCodeRequest {
  178. string phone = 1;
  179. }
  180. message CheckPhoneCodeRequest {
  181. string phone = 1;
  182. string code = 2;
  183. }
  184. message ManagerLoginRequest{
  185. string account = 1;// 账号
  186. string password = 2;// 密码
  187. }
  188. message LoginToken{
  189. string token = 1;
  190. }
  191. message UploadMaterialResponse{
  192. string link = 1;
  193. }
  194. message Ids {
  195. repeated int64 ids = 1;// 标签ID
  196. }
  197. message TagListReply{
  198. repeated TagList list = 1;// 标签列表
  199. }
  200. message TagList{
  201. int64 id = 1; // 标签ID
  202. string name = 2;// 分组名
  203. }
  204. message SexReq{
  205. int64 sex = 1;
  206. }
  207. message GetMatchingPartnerInfoReply{
  208. string id = 1; // id
  209. string nickname = 2;// 昵称
  210. string avatarUrl =3;// 头像链接
  211. int64 sex = 4;// 性别
  212. }
  213. message RandomIntroduceReply{
  214. string introduce = 1;
  215. }
  216. message UpdateInformationRequest {
  217. string nickname = 1; // 昵称
  218. string avatarUrl = 2;// 头像
  219. int64 sex = 3; // 性别
  220. int64 birthday = 4;// 出生日期(毫秒级时间戳)
  221. repeated int64 tagList = 5;// 标签id列表
  222. string introduceVoice = 6;// 介绍语音的链接
  223. string signature = 7;// 介绍(签名)
  224. repeated string pictures = 8;// 相册(主页图片)
  225. string province = 9;// 省
  226. string city = 10;// 市
  227. string area = 11;// 区
  228. }
  229. message ChatRecordListReply{
  230. repeated ChatRecordInfo list = 1;
  231. int64 nextId = 2;
  232. }
  233. message ChatRoomMsg{
  234. int64 roomId = 1; // 房间ID
  235. ChatPersonMsg self = 2; // 自己的信息
  236. ChatPersonMsg other = 3; // 对方的信息
  237. int64 likeability = 5; // 对对方的好感度
  238. }
  239. message ChatPersonMsg{
  240. string id = 1; // id
  241. string nickname = 3; // 昵称
  242. string avatar = 4; // 头像
  243. int64 sex = 5;// 性别
  244. }
  245. message ChatRecordInfo{
  246. int64 messageId = 1; // 消息的ID
  247. string msgType = 2; // 消息类型
  248. Message message = 3; // 消息的结构
  249. int64 roomId = 4; // 房间ID
  250. bool isSelf = 5; // 是否是自己
  251. int64 sendTime = 6; // 发送时间
  252. string status = 7; // 消息状态
  253. string statusMsg = 8;// 状态说明
  254. bool isRead = 9;// 对方是否已读
  255. }
  256. message ChatIsReadInfo{
  257. int64 messageId = 1; // 消息的ID
  258. int64 roomId = 4; // 房间ID
  259. }
  260. message GoToRoom{
  261. int64 roomId = 1; // 房间ID
  262. }
  263. message Message{
  264. string content = 1; // 文本内容
  265. string materialUrl = 2; // 素材链接
  266. string scripContent = 3; // 小纸条的内容
  267. string scripMaterialUrl = 4;// 小纸条的素材链接
  268. string replyScripContent = 5; // 回复小纸条的内容
  269. string replyScripMaterialUrl = 6;// 回复小纸条的素材链接
  270. }
  271. message FindChatRoomMsgRequest{
  272. int64 roomId = 1;
  273. }
  274. message RoomIDRequest{
  275. int64 roomId = 1;
  276. }
  277. message FindChatRecordListRequest{
  278. int64 nextId = 1;
  279. int64 offset = 2;
  280. int64 roomId = 3;
  281. }
  282. message IsLike{
  283. bool isLike = 1;// 是否喜欢(关注)
  284. }
  285. message RandomNum {
  286. int64 num = 1; // 随机的数量
  287. }
  288. message RandomNumAndSex {
  289. int64 num = 1; // 随机的数量
  290. int64 sex = 2; // 对方的性别
  291. }
  292. message MemeRequest{
  293. int64 nextId = 1;
  294. int64 offset = 2;
  295. string type = 3;
  296. }
  297. message CommonTextList {
  298. repeated string list = 1;// 需要的数据集合(随机表情包、随机打招呼)
  299. }
  300. message MemeTitleList {
  301. repeated MemeTitle list = 1;// 需要的数据集合(随机表情包、随机打招呼)
  302. }
  303. message MemeTitle{
  304. string name = 1;// 名称
  305. string type = 2;// 类型
  306. }
  307. message MemeList {
  308. repeated string list = 1;// 表情包列表
  309. int64 nextId = 2;
  310. }
  311. message ChatTopicList {
  312. repeated string list = 1;// 话题列表
  313. }
  314. message ReportChatRequest{
  315. string reportMsg = 1;// 举报的详情
  316. string reportedPersonId = 4; // 被举报的人的ID
  317. string contactInformation = 6; // 联系方式
  318. repeated string picture = 7; // 图片
  319. repeated string category = 8; // 类别
  320. }
  321. message ReportRequest{
  322. string personId = 2; // 发起举报的人的ID
  323. string reportedPersonId = 5; // 被举报的人的ID
  324. string contactInformation = 7; // 联系方式
  325. repeated string picture = 8; // 图片
  326. repeated string category = 9; // 类别
  327. string reportMsg = 10;// 举报的详情
  328. }
  329. message RoomChatMsg{
  330. string source = 6;// 来源
  331. string type = 7;// 类型(新客:new,付费:pay)
  332. int64 benefit = 8;// 收益
  333. bool isUnlockVoice = 9;// 是否解锁语音
  334. bool isUnlockPicture = 10;// 是否解锁图片
  335. int64 unlockVoicePrice = 11;// 解锁语音奖励
  336. int64 unlockPicturePrice = 12;// 解锁图片奖励
  337. bool isGetVoicePrice = 13; // 是否领取了语音奖励
  338. bool isGetPicturePrice = 14; // 是否领取了图片奖励
  339. }
  340. message RecommendPersonListReply{
  341. repeated RecommendPersonInfo manList = 1; // 男生列表
  342. repeated RecommendPersonInfo womanList = 2;// 女生列表
  343. }
  344. message RecommendPersonInfo{
  345. string personID = 1; // 查询目标的ID
  346. string nickname = 3;// 昵称
  347. string avatarUrl =4;// 头像链接
  348. int64 sex = 5;// 性别
  349. int64 age = 6; // 年龄
  350. string constellation = 7; // 星座
  351. string signature = 8; // 签名
  352. string province = 9;// 省
  353. string city = 10;// 市
  354. string area = 11;// 区
  355. string introduceVoice = 12;// 介绍语音
  356. repeated string tagList = 13;// 标签
  357. bool isOnline = 14; // 是否在线
  358. }
  359. message FindRecommendRequest{
  360. int64 num = 1;// 数量
  361. string type = 2;
  362. int64 sex = 3;
  363. string personId = 4;// ID
  364. }
  365. message FindOverSevenDayAvatarReply{
  366. repeated string list = 1;// 头像列表
  367. }
  368. message PersonLookScripRequest{
  369. string personId = 1;
  370. int64 scripId = 3;// 纸条id
  371. }
  372. message FindScripRequest {
  373. string personId = 1;
  374. int64 nextId = 3;
  375. int64 offset = 4;
  376. }
  377. message FindOtherScripRequest {
  378. string personId = 1;
  379. string myPersonId = 3;
  380. int64 nextId = 5;
  381. int64 offset = 6;
  382. }
  383. message ScripReply {
  384. repeated ScripInfo list = 1;
  385. int64 nextId = 2;
  386. }
  387. message ScripInfo {
  388. int64 scripId = 1;// 纸条ID
  389. string personId = 2;// 创建者ID
  390. string text = 4;// 纸条内容
  391. string pictureUrl = 5;// 纸条配图
  392. string personName = 6;// 创建者名称
  393. int64 personSex = 7;// 创建者性别
  394. int64 personAge = 8;// 创建者性别
  395. string personAvatar = 9;// 创建者头像
  396. int64 replyNum = 10;// 回复数
  397. bool isCanReply = 11;// 是否可以回复
  398. ScripReplyMessage myReply = 12;// 我的回复内容
  399. int64 createTime = 13;// 创建时间
  400. string constellation = 14; // 星座
  401. }
  402. message ScripReplyMessage{
  403. string messageType = 1;// 小纸条回复的类型
  404. string scripContent = 2;// 小纸条回复的文本内容
  405. string scripPictureUrl = 3;// 小纸条回复的图片链接
  406. }
  407. message DeleteScripRequest {
  408. int64 id = 1;
  409. string personId = 2;
  410. }
  411. message CreateScripRequest {
  412. string personId = 1;
  413. string text = 4;
  414. string pictureUrl = 5;
  415. }
  416. message ScripID {
  417. int64 id = 1;
  418. }
  419. message ReplyScripRequest {
  420. string personId = 1;
  421. int64 scripId = 4; // 小纸条ID
  422. Message message = 5; // 回复内容
  423. string msgType = 6;
  424. }
  425. message UpdateLastScripIDRequest{
  426. int64 scripId = 2;// 纸条id
  427. }
  428. message UpdateLastScripIDDBRequest{
  429. string personId = 1;
  430. int64 scripId = 2;// 纸条id
  431. }
  432. message MatchingRequest{
  433. string personId = 1; // 查询目标的ID
  434. int64 sex = 4;// 性别
  435. bool isNeedCheckSex = 5;// 是否跟性别强相关
  436. }
  437. message UserIDsParam{
  438. string myUserID = 1;
  439. string otherUserID = 2;
  440. }
  441. message ManagerFindPersonListReply {
  442. repeated ManagerFindPersonInfo list = 1;
  443. string nextId = 2;
  444. }
  445. message ManagerFindPersonListRequest{
  446. string nextId = 1;
  447. int64 offset = 2;
  448. int64 id = 3;// 用户ID
  449. string name = 4;// 姓名
  450. int64 sex = 5; // 性别
  451. }
  452. message ManagerFindPersonInfo {
  453. string id = 1;
  454. string nickname = 2;// 昵称
  455. string avatarUrl =3;// 头像链接
  456. int64 sex = 4;// 性别
  457. repeated string pictures = 5; // 图片
  458. int64 age = 6; // 年龄
  459. string constellation = 7; // 星座
  460. string signature = 9; // 签名
  461. string introduceVoice = 10; // 介绍语音
  462. string province = 11;// 省
  463. string city = 12;// 市
  464. bool isBlack = 15;// 是否被封禁
  465. int64 weight = 16;// 权重
  466. int64 lastLoginTime = 17;// 上次登录时间
  467. int64 personId = 13; // 用户id(Number)
  468. }
  469. message ManagerUpdatePersonVoiceRequest {
  470. string personId = 1;// Id (string)
  471. string introduceVoice = 2;// 语音
  472. }
  473. message ManagerUpdatePersonPicturesRequest {
  474. string personId = 1;// Id (string)
  475. repeated string pictures = 2;// 相册(主页图片)
  476. }
  477. message ManagerUpdatePersonSignatureRequest {
  478. string personId = 1;// Id (string)
  479. string signature = 2;// 介绍(签名)
  480. }
  481. message ManagerUpdatePersonAvatarRequest {
  482. string personId = 1;// Id (string)
  483. string avatarUrl = 2;// 头像
  484. }
  485. message ManagerUpdatePersonNameRequest {
  486. string personId = 1;// Id (string)
  487. string nickname = 2; // 昵称
  488. }
  489. message ManagerUpdatePersonWeightRequest{
  490. string personId = 1;// Id (string)
  491. int64 weight = 2;// 权重等级
  492. }
  493. message ManagerUpdatePersonIsBlackRequest{
  494. string personId = 1;// Id (string)
  495. bool isBlack = 2;// 是否拉黑
  496. }
  497. message ManagerFindRoomListRequest{
  498. int64 roomId = 1;//房间ID
  499. int64 personId = 2;//用户ID
  500. int64 nextId = 3;
  501. int64 offset = 4;
  502. }
  503. message ManagerFindRoomListReply{
  504. repeated RoomInfo list = 1;
  505. int64 nextId = 2;
  506. }
  507. message RoomInfo{
  508. string person1Id = 1;// 用户1ID
  509. int64 person1UnreadNum = 3;// 用户1未读数
  510. int64 person1SendNum = 4;// 用户1发送数
  511. string person1AvatarUrl = 5;// 用户1头像
  512. string person1Nickname = 6;// 用户1昵称
  513. int64 person1Age = 7;// 用户1年龄
  514. int64 person1Sex = 8;// 用户1性别
  515. string person2Id = 9;// 用户2ID
  516. int64 person2UnreadNum = 11;// 用户2未读数
  517. int64 person2SendNum = 12;// 用户2发送数
  518. string person2AvatarUrl = 13;// 用户2头像
  519. string person2Nickname = 14;// 用户2昵称
  520. int64 person2Age = 15;// 用户2年龄
  521. int64 person2Sex = 16;// 用户2性别
  522. string lastContent = 17;// 上次发送内容
  523. int64 lastTime = 18;// 上次发送时间
  524. int64 likeability = 19;// 好感度
  525. int64 roomId = 20; // 房间ID
  526. }
  527. message ManagerFindChatRecordListRequest{
  528. int64 nextId = 1;
  529. int64 offset = 2;
  530. int64 roomId = 3;
  531. string personID = 5; // 查询目标的ID
  532. }
  533. message ManagerUpdateScripTextRequest{
  534. int64 scripId = 1;
  535. string text = 2;// 纸条内容
  536. }
  537. message ManagerUpdateScripPictureRequest{
  538. int64 scripId = 1;
  539. string pictureUrl = 2;// 纸条配图链接
  540. }
  541. message ManagerFindScripListRequest{
  542. int64 nextId = 1;
  543. int64 offset = 2;
  544. int64 scripId = 3;
  545. int64 personId = 4;//用户ID (number)
  546. }
  547. message ManagerScripReply {
  548. repeated ManagerScripInfo list = 1;
  549. int64 nextId = 2;
  550. }
  551. message ManagerScripInfo {
  552. int64 scripId = 1;// 纸条ID
  553. string personId = 2;// 创建者ID
  554. string text = 4;// 纸条内容
  555. string pictureUrl = 5;// 纸条配图
  556. string personName = 6;// 创建者名称
  557. int64 personSex = 7;// 创建者性别
  558. int64 personAge = 8;// 创建者性别
  559. string personAvatar = 9;// 创建者头像
  560. int64 replyNum = 10;// 回复数
  561. int64 createTime = 12;// 创建时间
  562. string constellation = 13; // 星座
  563. int64 id = 14;// id(number)
  564. }
  565. message ManagerFindReportListRequest{
  566. int64 nextId = 1;
  567. int64 offset = 2;
  568. }
  569. message ManagerFindReportListReply{
  570. repeated ManagerFindReportInfo list = 1;
  571. int64 nextId = 2;
  572. }
  573. message ManagerFindReportInfo {
  574. int64 id = 1;// 举报的ID
  575. string personId = 2;// 被举报者的ID
  576. int64 num = 4;// 被举报的次数
  577. string personName = 6;// 被举报者的名称
  578. int64 personSex = 7;// 被举报者的性别
  579. int64 personAge = 8;// 被举报者的年龄
  580. string personAvatar = 9;// 被举报者的头像
  581. }
  582. message ManagerFindReportDetailsListRequest{
  583. int64 nextId = 1;
  584. int64 offset = 2;
  585. string personId = 3;// 被举报人的ID
  586. }
  587. message ManagerFindReportDetailsListReply{
  588. repeated ManagerFindReportDetailsInfo list = 1;
  589. int64 nextId = 2;
  590. }
  591. message ManagerFindReportDetailsInfo{
  592. int64 id = 1;// 举报详情的ID
  593. string personId = 2;// 被举报者的ID
  594. int64 accountId = 3;// 被举报者的ID(number)
  595. string personName = 4;// 被举报者的昵称
  596. string personAvatar = 5;// 被举报者的头像
  597. string reportPersonId = 6;// 举报者的ID
  598. int64 reportAccountId = 7;// 举报者的ID(number)
  599. string reportPersonName = 8;// 举报者的昵称
  600. string reportPersonAvatar = 9;// 举报者的头像
  601. string reportResult = 10;// 被举报的理由
  602. repeated string reportPicture = 11;// 被举报的图片
  603. repeated string category = 12;// 举报的类型
  604. int64 createTime = 13;// 举报时间
  605. }
  606. message GetLoginConfigRequest{
  607. string appid = 1;
  608. }
  609. message GetLoginConfigReply{
  610. string appid = 1;
  611. }