hit.proto 970 B

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263
  1. syntax = "proto3";
  2. import "public.proto";
  3. package pcds.hit.v1;
  4. /*
  5. * 访问量统计
  6. *
  7. *
  8. */
  9. service Hit{
  10. rpc GetHitListForRes (HitListRequest) returns (HitListReply){}
  11. rpc GetHits (HitRequest) returns (HitReply){}
  12. }
  13. message HitListRequest{
  14. string Id = 1;
  15. string Search = 3;
  16. EnumAllowingSearch SearchCol = 4;
  17. int32 CurrentPage = 5;
  18. int32 PerPage = 6;
  19. EnumAllowingOrderby OrderBy = 7;
  20. bool Desc = 8;
  21. }
  22. enum EnumAllowingSearch{
  23. EAS_NAME = 0;
  24. }
  25. enum EnumAllowingOrderby{
  26. EAO_CREATE_AT = 0;
  27. EAO_NAME = 1;
  28. }
  29. enum EnumResType{
  30. ERT_CHAPTER = 0;
  31. ERT_ARTICLE = 1;
  32. ERT_COURSE = 2;
  33. }
  34. message HitRequest{
  35. string Id = 1;
  36. EnumResType ResType = 2;
  37. int32 count = 3;
  38. }
  39. message HitReply{
  40. bool ok = 1;
  41. string message = 2;
  42. HitRequest data = 3;
  43. }
  44. message HitListReply{
  45. bool ok = 1;
  46. string message = 2;
  47. message data{
  48. repeated HitRequest rows = 1;
  49. int32 Count = 2;
  50. int32 PageNo = 3;
  51. int32 PageSize = 4;
  52. }
  53. }