common.proto 13 KB

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