statistics.proto 1.8 KB

12345678910111213141516171819202122232425262728293031323334353637383940414243444546474849505152535455
  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. message UserStatisticsMessageReply{
  28. int64 likeNum = 1;
  29. int64 likedNum = 2;
  30. int64 likedUnreadNum = 3;
  31. int64 lookNum = 4;
  32. int64 lookUnreadNum = 5;
  33. }
  34. message PartnerStatisticsMessageReply{
  35. int64 lookNum = 1;
  36. int64 lookUnreadNum = 2;
  37. }
  38. message GetStatisticsMessageRequest{
  39. string personID = 1; // 查询目标的ID
  40. string personType = 2; // 类型
  41. }
  42. message PersonMessage{
  43. string personID = 1; // 关注者、浏览者的ID
  44. string personType = 2; // 关注者、浏览者的类型
  45. string bePersonID = 3; // 被关注者、被浏览者的ID
  46. string bePersonType = 4; // 被关注者、被浏览者的类型
  47. }