article.proto 2.5 KB

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