common.proto 11 KB

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