article.proto 2.5 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119
  1. syntax = "proto3";
  2. import "public.proto";
  3. package pcds.article.v1;
  4. /*
  5. * Article 服务
  6. *
  7. *
  8. *
  9. */
  10. service Article{
  11. rpc GetArticleListForStudio (ArticleListRequest) returns (ArticleListReply){}
  12. rpc GetArticle (ArticleRequest) returns (ArticleReply){}
  13. rpc SetArticle (ArticleRequest) returns (ArticleReply){}
  14. rpc AddArticle (ArticleRequest) returns (ArticleReply){}
  15. rpc DelArticle (ArticleRequest) returns (ArticleReply){}
  16. rpc AddArticleToAnthologye (ArticleRequest) returns (ArticleReply){}
  17. rpc RemoveArticleFromAnthologye (ArticleRequest) returns (ArticleReply){}
  18. rpc GetAnthologyListForStudio (ArticleListRequest) returns (AnthologyeListReply){}
  19. rpc GetAnthologyListForArticle (ArticleListRequest) returns (AnthologyeListReply){}
  20. rpc GetAnthologye (AnthologyeRequest) returns (AnthologyeReply){}
  21. rpc SetAnthology (AnthologyeRequest) returns (AnthologyeReply){}
  22. rpc AddAnthology (AnthologyeRequest) returns (AnthologyeReply){}
  23. rpc DelAnthology (AnthologyeRequest) returns (AnthologyeReply){}
  24. }
  25. message ArticleListRequest{
  26. string Id = 1;
  27. string Search = 3;
  28. EnumAllowingSearch SearchCol = 4;
  29. int32 CurrentPage = 5;
  30. int32 PerPage = 6;
  31. EnumAllowingOrderby OrderBy = 7;
  32. bool Desc = 8;
  33. }
  34. enum EnumAllowingSearch{
  35. EAS_TITLE = 0;
  36. }
  37. enum EnumAllowingOrderby{
  38. EAO_UPDATED_AT = 0;
  39. EAO_CREATED_AT = 1;
  40. EAO_TITLE = 2;
  41. }
  42. message ArticleRequest{
  43. string Id = 1;
  44. string Title = 2;
  45. string Subtitle = 3;
  46. string Summary = 4;
  47. string Content = 5;
  48. EnumContentType ContentType = 6;
  49. string Html = 7;
  50. repeated Tag Tags = 8;
  51. repeated Channel Channels = 9;
  52. string Lang = 51;
  53. string EditorId = 52;
  54. EnumPublicity Publicity = 53;
  55. string CreatedAt = 101;
  56. string UpdatedAt = 102;
  57. }
  58. message ArticleReply{
  59. bool ok = 1;
  60. string message = 2;
  61. ArticleRequest data = 3;
  62. }
  63. message ArticleListReply{
  64. bool ok = 1;
  65. string message = 2;
  66. message data{
  67. repeated ArticleRequest rows = 1;
  68. int32 Count = 2;
  69. int32 PageNo = 3;
  70. int32 PageSize = 4;
  71. }
  72. }
  73. message AnthologyeRequest{
  74. string Id = 1;
  75. string Title = 2;
  76. string Subtitle = 3;
  77. string Summary = 4;
  78. string ArticleList = 5;
  79. repeated Tag Tags = 6;
  80. string Lang = 51;
  81. string EditorId = 52;
  82. EnumPublicity Publicity = 53;
  83. string CreatedAt = 101;
  84. string UpdatedAt = 102;
  85. }
  86. message AnthologyeReply{
  87. bool ok = 1;
  88. string message = 2;
  89. AnthologyeRequest data = 3;
  90. }
  91. message AnthologyeListReply{
  92. bool ok = 1;
  93. string message = 2;
  94. message data{
  95. repeated AnthologyeRequest rows = 1;
  96. int32 Count = 2;
  97. int32 PageNo = 3;
  98. int32 PageSize = 4;
  99. }
  100. }