common.proto 12 KB

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