common.proto 12 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156157158159160161162163164165166167168169170171172173174175176177178179180181182183184185186187188189190191192193194195196197198199200201202203204205206207208209210211212213214215216217218219220221222223224225226227228229230231232233234235236237238239240241242243244245246247248249250251252253254255256257258259260261262263264265266267268269270271272273274275276277278279280281282283284285286287288289290291292293294295296297298299300301302303304305306307308309310311312313314315316317318319320321322323324325326327328329330331332333334335336337338339340341342343344345346347348349350351352353354355356357358359360361362363364365366367368369370371372373374375376377378379380381382383384385386387388389390391392393394395396397398399400401402403404405406407408409410411412413414415416417418419420421422423424425426427428429430431432433434435436437438439440441442443444445446447448449450451452453454455456457458459460461462463464465466467468469470471472473474475476477478479480481482483484485486487488489490491492493494495496497498499500501502503504505506507
  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 RandomIntroduceReply{
  212. string introduce = 1;
  213. }
  214. message UpdateInformationRequest {
  215. string nickname = 1; // 昵称
  216. string avatarUrl = 2;// 头像
  217. int64 sex = 3; // 性别
  218. int64 birthday = 4;// 出生日期(毫秒级时间戳)
  219. repeated int64 tagList = 5;// 标签id列表
  220. string introduceVoice = 6;// 介绍语音的链接
  221. string signature = 7;// 介绍(签名)
  222. repeated string pictures = 8;// 相册(主页图片)
  223. string province = 9;// 省
  224. string city = 10;// 市
  225. string area = 11;// 区
  226. }
  227. message ChatRecordListReply{
  228. repeated ChatRecordInfo list = 1;
  229. int64 nextId = 2;
  230. }
  231. message ChatRoomMsg{
  232. int64 roomId = 1; // 房间ID
  233. ChatPersonMsg self = 2; // 自己的信息
  234. ChatPersonMsg other = 3; // 对方的信息
  235. int64 likeability = 5; // 对对方的好感度
  236. }
  237. message ChatPersonMsg{
  238. string id = 1; // id
  239. string type = 2; // 类型
  240. string nickname = 3; // 昵称
  241. string avatar = 4; // 头像
  242. int64 sex = 5;// 性别
  243. }
  244. message ChatRecordInfo{
  245. int64 messageId = 1; // 消息的ID
  246. string msgType = 2; // 消息类型
  247. Message message = 3; // 消息的结构
  248. int64 roomId = 4; // 房间ID
  249. bool isSelf = 5; // 是否是自己
  250. int64 sendTime = 6; // 发送时间
  251. string status = 7; // 消息状态
  252. string statusMsg = 8;// 状态说明
  253. bool isRead = 9;// 对方是否已读
  254. }
  255. message ChatIsReadInfo{
  256. int64 messageId = 1; // 消息的ID
  257. int64 roomId = 4; // 房间ID
  258. }
  259. message GoToRoom{
  260. int64 roomId = 1; // 房间ID
  261. }
  262. message Message{
  263. string content = 1; // 文本内容
  264. string materialUrl = 2; // 素材链接
  265. string scripContent = 3; // 小纸条的内容
  266. string scripMaterialUrl = 4;// 小纸条的素材链接
  267. string replyScripContent = 5; // 回复小纸条的内容
  268. string replyScripMaterialUrl = 6;// 回复小纸条的素材链接
  269. }
  270. message FindChatRoomMsgRequest{
  271. int64 roomId = 1;
  272. }
  273. message RoomIDRequest{
  274. int64 roomId = 1;
  275. }
  276. message FindChatRecordListRequest{
  277. int64 nextId = 1;
  278. int64 offset = 2;
  279. int64 roomId = 3;
  280. }
  281. message IsLike{
  282. bool isLike = 1;// 是否喜欢(关注)
  283. }
  284. message BalanceRequest{
  285. string personID = 1; // 查询目标的ID
  286. string personType = 2; // 类型
  287. int64 balance = 3;// 充值或者减少的金额
  288. }
  289. message RandomNum {
  290. int64 num = 1; // 随机的数量
  291. }
  292. message RandomNumAndSex {
  293. int64 num = 1; // 随机的数量
  294. int64 sex = 2; // 对方的性别
  295. }
  296. message MemeRequest{
  297. int64 nextId = 1;
  298. int64 offset = 2;
  299. string type = 3;
  300. }
  301. message CommonTextList {
  302. repeated string list = 1;// 需要的数据集合(随机表情包、随机打招呼)
  303. }
  304. message MemeTitleList {
  305. repeated MemeTitle list = 1;// 需要的数据集合(随机表情包、随机打招呼)
  306. }
  307. message MemeTitle{
  308. string name = 1;// 名称
  309. string type = 2;// 类型
  310. }
  311. message MemeList {
  312. repeated string list = 1;// 表情包列表
  313. int64 nextId = 2;
  314. }
  315. message ChatTopicList {
  316. repeated string list = 1;// 话题列表
  317. }
  318. message ReportChatRequest{
  319. string reportMsg = 1;// 举报的详情
  320. string reportedPersonId = 4; // 被举报的人的ID
  321. string reportedPersonType = 5; // 被举报的人的类型
  322. string contactInformation = 6; // 联系方式
  323. repeated string picture = 7; // 图片
  324. repeated string category = 8; // 类别
  325. }
  326. message ReportRequest{
  327. string identifyId = 1;// 发起举报的人的身份ID
  328. string personId = 2; // 发起举报的人的ID
  329. string personType = 3; // 发起举报的人的类型
  330. string reportedIdentifyId = 4; // 被举报的人的身份ID
  331. string reportedPersonId = 5; // 被举报的人的ID
  332. string reportedPersonType = 6; // 被举报的人的类型
  333. string contactInformation = 7; // 联系方式
  334. repeated string picture = 8; // 图片
  335. repeated string category = 9; // 类别
  336. string reportMsg = 10;// 举报的详情
  337. }
  338. message RoomChatMsg{
  339. string source = 6;// 来源
  340. string type = 7;// 类型(新客:new,付费:pay)
  341. int64 benefit = 8;// 收益
  342. bool isUnlockVoice = 9;// 是否解锁语音
  343. bool isUnlockPicture = 10;// 是否解锁图片
  344. int64 unlockVoicePrice = 11;// 解锁语音奖励
  345. int64 unlockPicturePrice = 12;// 解锁图片奖励
  346. bool isGetVoicePrice = 13; // 是否领取了语音奖励
  347. bool isGetPicturePrice = 14; // 是否领取了图片奖励
  348. }
  349. message RecommendPersonListReply{
  350. repeated RecommendPersonInfo list = 1;
  351. string nextId = 2;
  352. }
  353. message RecommendPersonInfo{
  354. string personID = 1; // 查询目标的ID
  355. string personType = 2; // 类型
  356. string nickname = 3;// 昵称
  357. string avatarUrl =4;// 头像链接
  358. int64 sex = 5;// 性别
  359. int64 age = 6; // 年龄
  360. string constellation = 7; // 星座
  361. string signature = 8; // 签名
  362. string province = 9;// 省
  363. string city = 10;// 市
  364. string area = 11;// 区
  365. string introduceVoice = 12;// 介绍语音
  366. repeated string tagList = 13;// 标签
  367. bool isOnline = 14; // 是否在线
  368. }
  369. message FindRecommendRequest{
  370. int64 num = 1;// 数量
  371. string type = 2;// 类型
  372. int64 sex = 3;
  373. }
  374. message FindOverSevenDayAvatarReply{
  375. repeated string list = 1;// 头像列表
  376. }
  377. message IdentifyIdRequest{
  378. string identifyId = 1;// 发起举报的人的身份ID
  379. }
  380. message PersonLookScripRequest{
  381. string personId = 1;
  382. string personType = 2;
  383. int64 scripId = 3;// 纸条id
  384. }
  385. message FindScripRequest {
  386. string personId = 1;
  387. string personType = 2;
  388. int64 nextId = 3;
  389. int64 offset = 4;
  390. }
  391. message ScripReply {
  392. repeated ScripInfo list = 1;
  393. int64 nextId = 2;
  394. }
  395. message ScripInfo {
  396. string personId = 1;// 创建者ID
  397. string personType = 2;// 创建者类型
  398. string text = 3;// 纸条内容
  399. string pictureUrl = 4;// 纸条配图
  400. string personName = 5;// 创建者名称
  401. int64 personSex = 6;// 创建者性别
  402. string personAvatar = 7;// 创建者头像
  403. int64 createTime = 8;// 创建时间
  404. int64 scripId = 9;// 纸条ID
  405. int64 replyNum = 10;// 回复数
  406. }
  407. message DeleteScripRequest {
  408. int64 id = 1;
  409. string personId = 2;
  410. string personType = 3;
  411. }
  412. message CreateScripRequest {
  413. string personId = 1;
  414. string personType = 2;
  415. string PersonIdentifyId = 3;
  416. string text = 4;
  417. string pictureUrl = 5;
  418. }
  419. message ScripID {
  420. int64 id = 1;
  421. }
  422. message ReplyScripRequest {
  423. string personId = 1;
  424. string personType = 2;
  425. string PersonIdentifyId = 3;
  426. int64 scripId = 4;
  427. Message message = 5;
  428. string msgType = 6;
  429. }
  430. message UpdateLastScripIDRequest{
  431. string personId = 1;
  432. int64 scripId = 2;// 纸条id
  433. }