|
|
@@ -0,0 +1,115 @@
|
|
|
+syntax = "proto3"
|
|
|
+import "public.proto"
|
|
|
+/*
|
|
|
+ * Article 服务
|
|
|
+ *
|
|
|
+ *
|
|
|
+ *
|
|
|
+ */
|
|
|
+service Article{
|
|
|
+ rpc GetArticleListForStudio (ArticleListRequest) returns (ArticleListReply){}
|
|
|
+ rpc GetArticle (ArticleRequest) returns (ArticleReply){}
|
|
|
+ rpc SetArticle (ArticleRequest) returns (ArticleReply){}
|
|
|
+ rpc AddArticle (ArticleRequest) returns (ArticleReply){}
|
|
|
+ rpc DelArticle (ArticleRequest) returns (ArticleReply){}
|
|
|
+ rpc AddArticleToAnthologye (ArticleRequest) returns (ArticleReply){}
|
|
|
+ rpc RemoveArticleFromAnthologye (ArticleRequest) returns (ArticleReply){}
|
|
|
+
|
|
|
+ rpc GetAnthologyListForStudio (ArticleListRequest) returns (AnthologyeListReply){}
|
|
|
+ rpc GetAnthologye (AnthologyeRequest) returns (AnthologyeReply){}
|
|
|
+ rpc SetAnthology (AnthologyeRequest) returns (AnthologyeReply){}
|
|
|
+ rpc AddAnthology (AnthologyeRequest) returns (AnthologyeReply){}
|
|
|
+ rpc DelAnthology (AnthologyeRequest) returns (AnthologyeReply){}
|
|
|
+}
|
|
|
+
|
|
|
+message ArticleListRequest{
|
|
|
+ string Id = 1;
|
|
|
+ string Search = 3;
|
|
|
+ EnumAllowingSearch SearchCol = 4;
|
|
|
+ int32 PageNo = 5;
|
|
|
+ int32 PageSize = 6;
|
|
|
+ EnumAllowingOrderby OrderBy = 7;
|
|
|
+ bool Desc = 8;
|
|
|
+}
|
|
|
+
|
|
|
+enum EnumAllowingSearch{
|
|
|
+ EAS_TITLE = 0;
|
|
|
+}
|
|
|
+enum EnumAllowingOrderby{
|
|
|
+ EAO_UPDATED_AT = 0;
|
|
|
+ EAO_CREATED_AT = 1;
|
|
|
+ EAO_TITLE = 2;
|
|
|
+}
|
|
|
+
|
|
|
+
|
|
|
+
|
|
|
+message ArticleRequest{
|
|
|
+ string Id = 1;
|
|
|
+ string Title = 2;
|
|
|
+ string Subtitle = 3;
|
|
|
+ string Summary = 4;
|
|
|
+ string Content = 5;
|
|
|
+ EnumContentType ContentType = 6;
|
|
|
+ string Html = 7;
|
|
|
+ repeated Tag Tags = 8;
|
|
|
+ repeated Channel Channels = 9;
|
|
|
+
|
|
|
+ string Lang = 51;
|
|
|
+ string EditorId = 52;
|
|
|
+ EnumPublicity Publicity = 53;
|
|
|
+
|
|
|
+ string CreatedAt = 101;
|
|
|
+ string UpdatedAt = 102;
|
|
|
+}
|
|
|
+
|
|
|
+
|
|
|
+
|
|
|
+message ArticleReply{
|
|
|
+ bool ok = 1;
|
|
|
+ string message = 2;
|
|
|
+ ArticleRequest data = 3;
|
|
|
+}
|
|
|
+
|
|
|
+message ArticleListReply{
|
|
|
+ bool ok = 1;
|
|
|
+ string message = 2;
|
|
|
+ message data{
|
|
|
+ repeated ArticleRequest rows = 1;
|
|
|
+ int32 Count = 2;
|
|
|
+ int32 PageNo = 3;
|
|
|
+ int32 PageSize = 4;
|
|
|
+ }
|
|
|
+}
|
|
|
+
|
|
|
+message AnthologyeRequest{
|
|
|
+ string Id = 1;
|
|
|
+ string Title = 2;
|
|
|
+ string Subtitle = 3;
|
|
|
+ string Summary = 4;
|
|
|
+ string ArticleList = 5;
|
|
|
+ repeated Tag Tags = 6;
|
|
|
+
|
|
|
+ string Lang = 51;
|
|
|
+ string EditorId = 52;
|
|
|
+ EnumPublicity Publicity = 53;
|
|
|
+
|
|
|
+ string CreatedAt = 101;
|
|
|
+ string UpdatedAt = 102;
|
|
|
+}
|
|
|
+
|
|
|
+message AnthologyeReply{
|
|
|
+ bool ok = 1;
|
|
|
+ string message = 2;
|
|
|
+ AnthologyeRequest data = 3;
|
|
|
+}
|
|
|
+
|
|
|
+message AnthologyeListReply{
|
|
|
+ bool ok = 1;
|
|
|
+ string message = 2;
|
|
|
+ message data{
|
|
|
+ repeated AnthologyeRequest rows = 1;
|
|
|
+ int32 Count = 2;
|
|
|
+ int32 PageNo = 3;
|
|
|
+ int32 PageSize = 4;
|
|
|
+ }
|
|
|
+}
|