statistics.proto 2.6 KB

1234567891011121314151617181920212223242526272829303132333435363738394041424344454647484950515253545556575859606162636465666768697071727374757677787980818283
  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. message LookAndLikeListReply{
  30. repeated LookAndLikeListInfo list = 1;
  31. int64 nextId = 2;
  32. }
  33. message LookAndLikeListInfo{
  34. string id = 1; // 被查看的列表中的人的ID
  35. string type = 2; // 类型
  36. string nickname = 3;// 昵称
  37. string avatarUrl =4;// 头像链接
  38. int64 sex = 5;// 性别
  39. int64 age = 6;// 年龄
  40. string constellation = 7; // 星座
  41. int64 lastLookTime = 8; // 上次访问时间
  42. bool isHavePicture = 10; // 是否有图片
  43. bool isHaveVoice = 11; // 是否有语音
  44. bool isLock = 12;// 是否锁住信息
  45. }
  46. message GetLookAndLikeListRequest{
  47. string personID = 1; // 查询目标的ID
  48. string personType = 2; // 类型
  49. int64 nextId = 3;
  50. int64 offset = 4;
  51. }
  52. message UserStatisticsMessageReply{
  53. int64 likeNum = 1;
  54. int64 likedNum = 2;
  55. int64 likedUnreadNum = 3;
  56. int64 lookNum = 4;
  57. int64 lookUnreadNum = 5;
  58. }
  59. message PartnerStatisticsMessageReply{
  60. int64 lookNum = 1;
  61. int64 lookUnreadNum = 2;
  62. }
  63. message GetStatisticsMessageRequest{
  64. string personID = 1; // 查询目标的ID
  65. string personType = 2; // 类型
  66. }
  67. message PersonMessage{
  68. string personID = 1; // 关注者、浏览者的ID
  69. string personType = 2; // 关注者、浏览者的类型
  70. string bePersonID = 3; // 被关注者、被浏览者的ID
  71. string bePersonType = 4; // 被关注者、被浏览者的类型
  72. }