statistics.proto 2.8 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687
  1. syntax = "proto3";
  2. package api.statistics;
  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/statistics;statistics";
  7. option java_multiple_files = true;
  8. option java_package = "api.statistics";
  9. service Statistics {
  10. // 观看用户主页
  11. rpc LookPerson (PersonMessage) returns (google.protobuf.Empty);
  12. // 关注用户
  13. rpc LikePerson (PersonMessage) returns (google.protobuf.Empty);
  14. // 取关用户
  15. rpc UnLikePerson (PersonMessage) returns (google.protobuf.Empty);
  16. // 获取用户端统计信息
  17. rpc GetUserServiceStatisticsMessage (GetStatisticsMessageRequest) returns (UserStatisticsMessageReply);
  18. // 获取陪聊端统计信息
  19. rpc GetPartnerServiceStatisticsMessage (GetStatisticsMessageRequest) returns (PartnerStatisticsMessageReply);
  20. // 减少"看过我的"的未读数
  21. rpc ReduceLookUnreadNum (PersonMessage) returns (google.protobuf.Empty);
  22. // 减少"喜欢我的"的未读数
  23. rpc ReduceLikeUnreadNum (PersonMessage) returns (google.protobuf.Empty);
  24. // 解锁"看过我的"的记录
  25. rpc UnlockLookRecord (PersonMessage) returns (google.protobuf.Empty);
  26. // 查看看过我的列表
  27. rpc FindLookList (GetLookAndLikeListRequest) returns (LookAndLikeListReply);
  28. // 查看我喜欢的列表
  29. rpc FindLikeList (GetLookAndLikeListRequest) returns (LookAndLikeListReply);
  30. // 查看喜欢我的列表
  31. rpc FindLikedList (GetLookAndLikeListRequest) returns (LookAndLikeListReply);
  32. }
  33. message LookAndLikeListReply{
  34. repeated LookAndLikeListInfo list = 1;
  35. int64 nextId = 2;
  36. }
  37. message LookAndLikeListInfo{
  38. string id = 1; // 被查看的列表中的人的ID
  39. string type = 2; // 类型
  40. string nickname = 3;// 昵称
  41. string avatarUrl =4;// 头像链接
  42. int64 sex = 5;// 性别
  43. int64 age = 6;// 年龄
  44. string constellation = 7; // 星座
  45. int64 lastLookTime = 8; // 上次访问时间
  46. bool isHavePicture = 10; // 是否有图片
  47. bool isHaveVoice = 11; // 是否有语音
  48. bool isLock = 12;// 是否锁住信息
  49. }
  50. message GetLookAndLikeListRequest{
  51. string personID = 1; // 查询目标的ID
  52. string personType = 2; // 类型
  53. int64 nextId = 3;
  54. int64 offset = 4;
  55. }
  56. message UserStatisticsMessageReply{
  57. int64 likeNum = 1;
  58. int64 likedNum = 2;
  59. int64 likedUnreadNum = 3;
  60. int64 lookNum = 4;
  61. int64 lookUnreadNum = 5;
  62. }
  63. message PartnerStatisticsMessageReply{
  64. int64 lookNum = 1;
  65. int64 lookUnreadNum = 2;
  66. }
  67. message GetStatisticsMessageRequest{
  68. string personID = 1; // 查询目标的ID
  69. string personType = 2; // 类型
  70. }
  71. message PersonMessage{
  72. string personID = 1; // 关注者、浏览者的ID
  73. string personType = 2; // 关注者、浏览者的类型
  74. string bePersonID = 3; // 被关注者、被浏览者的ID
  75. string bePersonType = 4; // 被关注者、被浏览者的类型
  76. }