statistics.proto 3.0 KB

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