common.proto 13 KB

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