article.proto 2.4 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115
  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 GetAnthologye (AnthologyeRequest) returns (AnthologyeReply){}
  19. rpc SetAnthology (AnthologyeRequest) returns (AnthologyeReply){}
  20. rpc AddAnthology (AnthologyeRequest) returns (AnthologyeReply){}
  21. rpc DelAnthology (AnthologyeRequest) returns (AnthologyeReply){}
  22. }
  23. message ArticleListRequest{
  24. string Id = 1;
  25. string Search = 3;
  26. EnumAllowingSearch SearchCol = 4;
  27. int32 PageNo = 5;
  28. int32 PageSize = 6;
  29. EnumAllowingOrderby OrderBy = 7;
  30. bool Desc = 8;
  31. }
  32. enum EnumAllowingSearch{
  33. EAS_TITLE = 0;
  34. }
  35. enum EnumAllowingOrderby{
  36. EAO_UPDATED_AT = 0;
  37. EAO_CREATED_AT = 1;
  38. EAO_TITLE = 2;
  39. }
  40. message ArticleRequest{
  41. string Id = 1;
  42. string Title = 2;
  43. string Subtitle = 3;
  44. string Summary = 4;
  45. string Content = 5;
  46. EnumContentType ContentType = 6;
  47. string Html = 7;
  48. repeated Tag Tags = 8;
  49. repeated Channel Channels = 9;
  50. string Lang = 51;
  51. string EditorId = 52;
  52. EnumPublicity Publicity = 53;
  53. string CreatedAt = 101;
  54. string UpdatedAt = 102;
  55. }
  56. message ArticleReply{
  57. bool ok = 1;
  58. string message = 2;
  59. ArticleRequest data = 3;
  60. }
  61. message ArticleListReply{
  62. bool ok = 1;
  63. string message = 2;
  64. message data{
  65. repeated ArticleRequest rows = 1;
  66. int32 Count = 2;
  67. int32 PageNo = 3;
  68. int32 PageSize = 4;
  69. }
  70. }
  71. message AnthologyeRequest{
  72. string Id = 1;
  73. string Title = 2;
  74. string Subtitle = 3;
  75. string Summary = 4;
  76. string ArticleList = 5;
  77. repeated Tag Tags = 6;
  78. string Lang = 51;
  79. string EditorId = 52;
  80. EnumPublicity Publicity = 53;
  81. string CreatedAt = 101;
  82. string UpdatedAt = 102;
  83. }
  84. message AnthologyeReply{
  85. bool ok = 1;
  86. string message = 2;
  87. AnthologyeRequest data = 3;
  88. }
  89. message AnthologyeListReply{
  90. bool ok = 1;
  91. string message = 2;
  92. message data{
  93. repeated AnthologyeRequest rows = 1;
  94. int32 Count = 2;
  95. int32 PageNo = 3;
  96. int32 PageSize = 4;
  97. }
  98. }