common.proto 14 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156157158159160161162163164165166167168169170171172173174175176177178179180181182183184185186187188189190191192193194195196197198199200201202203204205206207208209210211212213214215216217218219220221222223224225226227228229230231232233234235236237238239240241242243244245246247248249250251252253254255256257258259260261262263264265266267268269270271272273274275276277278279280281282283284285286287288289290291292293294295296297298299300301302303304305306307308309310311312313314315316317318319320321322323324325326327328329330331332333334335336337338339340341342343344345346347348349350351352353354355356357358359360361362363364365366367368369370371372373374375376377378379380381382383384385386387388389390391392393394395396397398399400401402403404405406407408409410411412413414415416417418419420421422423424425426427428429430431432433434435436437438439440441442443444445446447448449450451452453454455456457458459460461462463464465466467468469470471472473474475476477478479480481482483484485486487488489490491492493494495496497498499500501502503504505506507508509510511512513514515516517518519520521522523524525526527528529530531532533534535536537538539540541542543544545546547548549550551552553554555556557558559560561562563564565566567568
  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 CreateChatRoomParam{
  34. string personID = 1; // 查询目标的ID
  35. string personType = 2; // 类型
  36. string source = 3;// 来源
  37. }
  38. message ChatCardInfo{
  39. string id = 1; // id
  40. string nickname = 2;// 昵称
  41. string avatarUrl =3;// 头像链接
  42. int64 sex = 4;// 性别
  43. int64 age = 6; // 年龄
  44. string constellation = 7; // 星座
  45. repeated string list = 9; // 相册列表
  46. string introduceVoice = 10; // 介绍语音
  47. string province = 11;// 省
  48. string city = 12;// 市
  49. string area = 13;// 区
  50. bool isFinishInformation = 14;//是否完善资料
  51. string signature = 15;// 签名
  52. }
  53. message PartnerChatCardInfo{
  54. string id = 1; // id
  55. string nickname = 2;// 昵称
  56. string avatarUrl =3;// 头像链接
  57. int64 sex = 4;// 性别
  58. int64 age = 6; // 年龄
  59. string type = 7;// 类型(新客:new,付费:pay)
  60. int64 benefit = 8;// 收益
  61. bool isUnlockVoice = 9;// 是否解锁语音
  62. bool isUnlockPicture = 10;// 是否解锁图片
  63. int64 unlockVoicePrice = 11;// 解锁语音奖励
  64. int64 unlockPicturePrice = 12;// 解锁图片奖励
  65. bool isGetVoicePrice = 13; // 是否领取了语音奖励
  66. bool isGetPicturePrice = 14; // 是否领取了图片奖励
  67. bool isFinishInformation = 15;// 是否完善信息
  68. string source = 16;// 来源
  69. }
  70. message UserIDParam {
  71. string userId = 1;
  72. }
  73. message WxConfReq {
  74. string url = 1;
  75. }
  76. message WxConfResponse{
  77. string appId = 1; // 必填,公众号的唯一标识
  78. int64 timestamp = 2; // 必填,生成签名的时间戳
  79. string nonceStr = 3;// 必填,生成签名的随机串
  80. string signature = 4;// 必填,签名
  81. string url = 5;// 传入的url
  82. }
  83. // 主页信息
  84. message HomeInfo{
  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 TagList tagList = 8; // 标签
  93. string signature = 9; // 签名
  94. string introduceVoice = 10; // 介绍语音
  95. string province = 11;// 省
  96. string city = 12;// 市
  97. string area = 13;// 区
  98. bool isBlack = 14;// 是否被封号
  99. }
  100. message PersonMsg {
  101. string id = 1; // id
  102. string nickname = 2;// 昵称
  103. string avatarUrl =3;// 头像链接
  104. int64 sex = 4;// 性别
  105. repeated string pictures = 5; // 图片
  106. int64 age = 6; // 年龄
  107. string constellation = 7; // 星座
  108. repeated int64 tagList = 8; // 标签
  109. string signature = 9; // 签名
  110. string introduceVoice = 10; // 介绍语音
  111. string province = 11;// 省
  112. string city = 12;// 市
  113. string area = 13;// 区
  114. bool isFinishInformation = 14; // 是否完成注册
  115. bool isBlack = 15;// 是否被封禁
  116. int64 weight = 16;// 权重
  117. string workingStatus = 17;// 工作状态
  118. int64 lastScripID = 18;// 上次观看小纸条ID
  119. string identifyId = 19;// 身份ID
  120. }
  121. message LookedAndLikedNum{
  122. string id = 1; // id
  123. int64 lookedNum = 2; // 看过ta的数量
  124. int64 likedNum = 3;// 喜欢ta的数量
  125. }
  126. // 添加好友页面信息
  127. message AddFriendMessageInfo{
  128. string id = 1; // id
  129. string nickname = 2;// 昵称
  130. string avatarUrl =3;// 头像链接
  131. int64 sex = 4;// 性别
  132. repeated string pictures = 5; // 图片
  133. string fromOpenId = 6;// 来源公众号对应的openID
  134. bool isRegister = 7;// 是否注册
  135. bool isChat = 8;// 是否聊天
  136. bool isFromUs = 9;// 是否是来源我们
  137. string fromAppId = 10;// 来源公众号对应的appID
  138. string fromName = 11;// 来源公众号对应的公众号名称
  139. string constellation = 12; // 星座
  140. string signature = 13;// 介绍(签名)
  141. string province = 14;// 省
  142. string city = 15;// 市
  143. string area = 16;// 区
  144. int64 roomId = 17;// 聊过天的话返回房间ID
  145. }
  146. message PersonIDList{
  147. repeated string personIds = 1;
  148. }
  149. message PersonDBReply{
  150. repeated PersonDB list = 1;
  151. }
  152. message PersonDB{
  153. string id = 1; // id
  154. string nickname = 2;// 昵称
  155. string avatarUrl =3;// 头像链接
  156. int64 sex = 4;// 性别
  157. repeated string pictures = 5; // 图片
  158. int64 age = 6; // 年龄
  159. string constellation = 7; // 星座
  160. string introduceVoice = 8; // 介绍语音
  161. string province = 9;// 省
  162. string city = 10;// 市
  163. string area = 11;// 区
  164. string signature = 12;//介绍
  165. bool isFinishInformation = 13;//是否完善消息
  166. repeated int64 tagList = 14;// 标签列表
  167. string identifyId = 15;// 身份ID
  168. }
  169. message ScripIdRequest {
  170. int64 scripId = 1;// 纸条id
  171. }
  172. message ListPageRequest{
  173. int64 nextId = 1;
  174. int64 offset = 2;
  175. }
  176. message ListPageAndSexRequest{
  177. int64 nextId = 1;
  178. int64 offset = 2;
  179. int64 sex = 3;// 对方的性别
  180. }
  181. message FindChatTopicRequest{
  182. string type = 1;// 话题类型
  183. int64 sex = 2;// 对方的性别
  184. }
  185. message ListPage2Request{
  186. string nextId = 1;
  187. int64 offset = 2;
  188. }
  189. message ListPageAndPersonRequest{
  190. string nextId = 1;
  191. int64 offset = 2;
  192. string personID = 3; // 查询目标的ID
  193. string personType = 4; // 类型
  194. }
  195. message SendPhoneCodeRequest {
  196. string phone = 1;
  197. }
  198. message CheckPhoneCodeRequest {
  199. string phone = 1;
  200. string code = 2;
  201. }
  202. message ManagerLoginRequest{
  203. string account = 1;// 账号
  204. string password = 2;// 密码
  205. }
  206. message LoginToken{
  207. string token = 1;
  208. }
  209. message UploadMaterialResponse{
  210. string link = 1;
  211. }
  212. message Ids {
  213. repeated int64 ids = 1;// 标签ID
  214. }
  215. message TagListReply{
  216. repeated TagList list = 1;// 标签列表
  217. }
  218. message TagList{
  219. int64 id = 1; // 标签ID
  220. string name = 2;// 分组名
  221. }
  222. message SexReq{
  223. int64 sex = 1;
  224. }
  225. message GetMatchingPartnerInfoReply{
  226. string id = 1; // id
  227. string nickname = 2;// 昵称
  228. string avatarUrl =3;// 头像链接
  229. int64 sex = 4;// 性别
  230. string identifyId = 5;// 身份ID
  231. }
  232. message RandomIntroduceReply{
  233. string introduce = 1;
  234. }
  235. message UpdateInformationRequest {
  236. string nickname = 1; // 昵称
  237. string avatarUrl = 2;// 头像
  238. int64 sex = 3; // 性别
  239. int64 birthday = 4;// 出生日期(毫秒级时间戳)
  240. repeated int64 tagList = 5;// 标签id列表
  241. string introduceVoice = 6;// 介绍语音的链接
  242. string signature = 7;// 介绍(签名)
  243. repeated string pictures = 8;// 相册(主页图片)
  244. string province = 9;// 省
  245. string city = 10;// 市
  246. string area = 11;// 区
  247. }
  248. message ChatRecordListReply{
  249. repeated ChatRecordInfo list = 1;
  250. int64 nextId = 2;
  251. }
  252. message ChatRoomMsg{
  253. int64 roomId = 1; // 房间ID
  254. ChatPersonMsg self = 2; // 自己的信息
  255. ChatPersonMsg other = 3; // 对方的信息
  256. int64 likeability = 5; // 对对方的好感度
  257. }
  258. message ChatPersonMsg{
  259. string id = 1; // id
  260. string type = 2; // 类型
  261. string nickname = 3; // 昵称
  262. string avatar = 4; // 头像
  263. int64 sex = 5;// 性别
  264. }
  265. message ChatRecordInfo{
  266. int64 messageId = 1; // 消息的ID
  267. string msgType = 2; // 消息类型
  268. Message message = 3; // 消息的结构
  269. int64 roomId = 4; // 房间ID
  270. bool isSelf = 5; // 是否是自己
  271. int64 sendTime = 6; // 发送时间
  272. string status = 7; // 消息状态
  273. string statusMsg = 8;// 状态说明
  274. bool isRead = 9;// 对方是否已读
  275. }
  276. message ChatIsReadInfo{
  277. int64 messageId = 1; // 消息的ID
  278. int64 roomId = 4; // 房间ID
  279. }
  280. message GoToRoom{
  281. int64 roomId = 1; // 房间ID
  282. }
  283. message Message{
  284. string content = 1; // 文本内容
  285. string materialUrl = 2; // 素材链接
  286. string scripContent = 3; // 小纸条的内容
  287. string scripMaterialUrl = 4;// 小纸条的素材链接
  288. string replyScripContent = 5; // 回复小纸条的内容
  289. string replyScripMaterialUrl = 6;// 回复小纸条的素材链接
  290. }
  291. message FindChatRoomMsgRequest{
  292. int64 roomId = 1;
  293. }
  294. message RoomIDRequest{
  295. int64 roomId = 1;
  296. }
  297. message FindChatRecordListRequest{
  298. int64 nextId = 1;
  299. int64 offset = 2;
  300. int64 roomId = 3;
  301. }
  302. message IsLike{
  303. bool isLike = 1;// 是否喜欢(关注)
  304. }
  305. message BalanceRequest{
  306. string personID = 1; // 查询目标的ID
  307. string personType = 2; // 类型
  308. int64 balance = 3;// 充值或者减少的金额
  309. }
  310. message RandomNum {
  311. int64 num = 1; // 随机的数量
  312. }
  313. message RandomNumAndSex {
  314. int64 num = 1; // 随机的数量
  315. int64 sex = 2; // 对方的性别
  316. }
  317. message MemeRequest{
  318. int64 nextId = 1;
  319. int64 offset = 2;
  320. string type = 3;
  321. }
  322. message CommonTextList {
  323. repeated string list = 1;// 需要的数据集合(随机表情包、随机打招呼)
  324. }
  325. message MemeTitleList {
  326. repeated MemeTitle list = 1;// 需要的数据集合(随机表情包、随机打招呼)
  327. }
  328. message MemeTitle{
  329. string name = 1;// 名称
  330. string type = 2;// 类型
  331. }
  332. message MemeList {
  333. repeated string list = 1;// 表情包列表
  334. int64 nextId = 2;
  335. }
  336. message ChatTopicList {
  337. repeated string list = 1;// 话题列表
  338. }
  339. message ReportChatRequest{
  340. string reportMsg = 1;// 举报的详情
  341. string reportedPersonId = 4; // 被举报的人的ID
  342. string reportedPersonType = 5; // 被举报的人的类型
  343. string contactInformation = 6; // 联系方式
  344. repeated string picture = 7; // 图片
  345. repeated string category = 8; // 类别
  346. }
  347. message ReportRequest{
  348. string identifyId = 1;// 发起举报的人的身份ID
  349. string personId = 2; // 发起举报的人的ID
  350. string personType = 3; // 发起举报的人的类型
  351. string reportedIdentifyId = 4; // 被举报的人的身份ID
  352. string reportedPersonId = 5; // 被举报的人的ID
  353. string reportedPersonType = 6; // 被举报的人的类型
  354. string contactInformation = 7; // 联系方式
  355. repeated string picture = 8; // 图片
  356. repeated string category = 9; // 类别
  357. string reportMsg = 10;// 举报的详情
  358. }
  359. message RoomChatMsg{
  360. string source = 6;// 来源
  361. string type = 7;// 类型(新客:new,付费:pay)
  362. int64 benefit = 8;// 收益
  363. bool isUnlockVoice = 9;// 是否解锁语音
  364. bool isUnlockPicture = 10;// 是否解锁图片
  365. int64 unlockVoicePrice = 11;// 解锁语音奖励
  366. int64 unlockPicturePrice = 12;// 解锁图片奖励
  367. bool isGetVoicePrice = 13; // 是否领取了语音奖励
  368. bool isGetPicturePrice = 14; // 是否领取了图片奖励
  369. }
  370. message RecommendPersonListReply{
  371. repeated RecommendPersonInfo manList = 1; // 男生列表
  372. repeated RecommendPersonInfo womanList = 2;// 女生列表
  373. }
  374. message RecommendPersonInfo{
  375. string personID = 1; // 查询目标的ID
  376. string personType = 2; // 类型
  377. string nickname = 3;// 昵称
  378. string avatarUrl =4;// 头像链接
  379. int64 sex = 5;// 性别
  380. int64 age = 6; // 年龄
  381. string constellation = 7; // 星座
  382. string signature = 8; // 签名
  383. string province = 9;// 省
  384. string city = 10;// 市
  385. string area = 11;// 区
  386. string introduceVoice = 12;// 介绍语音
  387. repeated string tagList = 13;// 标签
  388. bool isOnline = 14; // 是否在线
  389. }
  390. message FindRecommendRequest{
  391. int64 num = 1;// 数量
  392. string type = 2;// 类型
  393. int64 sex = 3;
  394. string identifyId = 4;// 发起举报的人的身份ID
  395. }
  396. message FindOverSevenDayAvatarReply{
  397. repeated string list = 1;// 头像列表
  398. }
  399. message IdentifyIdRequest{
  400. string identifyId = 1;// 发起举报的人的身份ID
  401. }
  402. message PersonLookScripRequest{
  403. string personId = 1;
  404. string personType = 2;
  405. int64 scripId = 3;// 纸条id
  406. }
  407. message FindScripRequest {
  408. string personId = 1;
  409. string personType = 2;
  410. int64 nextId = 3;
  411. int64 offset = 4;
  412. }
  413. message FindOtherScripRequest {
  414. string personId = 1;
  415. string personType = 2;
  416. string myPersonId = 3;
  417. string myPersonType = 4;
  418. int64 nextId = 5;
  419. int64 offset = 6;
  420. }
  421. message ScripReply {
  422. repeated ScripInfo list = 1;
  423. int64 nextId = 2;
  424. }
  425. message ScripInfo {
  426. int64 scripId = 1;// 纸条ID
  427. string personId = 2;// 创建者ID
  428. string personType = 3;// 创建者类型
  429. string text = 4;// 纸条内容
  430. string pictureUrl = 5;// 纸条配图
  431. string personName = 6;// 创建者名称
  432. int64 personSex = 7;// 创建者性别
  433. int64 personAge = 8;// 创建者性别
  434. string personAvatar = 9;// 创建者头像
  435. int64 replyNum = 10;// 回复数
  436. bool isCanReply = 11;// 是否可以回复
  437. ScripReplyMessage myReply = 12;// 我的回复内容
  438. int64 createTime = 13;// 创建时间
  439. }
  440. message ScripReplyMessage{
  441. string messageType = 1;// 小纸条回复的类型
  442. string scripContent = 2;// 小纸条回复的文本内容
  443. string scripPictureUrl = 3;// 小纸条回复的图片链接
  444. }
  445. message DeleteScripRequest {
  446. int64 id = 1;
  447. string personId = 2;
  448. string personType = 3;
  449. }
  450. message CreateScripRequest {
  451. string personId = 1;
  452. string personType = 2;
  453. string PersonIdentifyId = 3;
  454. string text = 4;
  455. string pictureUrl = 5;
  456. }
  457. message ScripID {
  458. int64 id = 1;
  459. }
  460. message ReplyScripRequest {
  461. string personId = 1;
  462. string personType = 2;
  463. string PersonIdentifyId = 3;
  464. int64 scripId = 4; // 小纸条ID
  465. Message message = 5; // 回复内容
  466. string msgType = 6;
  467. }
  468. message UpdateLastScripIDRequest{
  469. int64 scripId = 2;// 纸条id
  470. }
  471. message UpdateLastScripIDDBRequest{
  472. string personId = 1;
  473. int64 scripId = 2;// 纸条id
  474. }
  475. message MatchingRequest{
  476. string personId = 1; // 查询目标的ID
  477. string personType = 2; // 类型
  478. string identifyId = 3; // 身份ID
  479. int64 sex = 4;// 性别
  480. bool isNeedCheckSex = 5;// 是否跟性别强相关
  481. }
  482. message IdentifyIDsParam{
  483. string myIdentifyID = 1;
  484. string otherIdentifyID = 2;
  485. }