visuddhinanda 3 سال پیش
والد
کامیت
476fdcf621
3فایلهای تغییر یافته به همراه199 افزوده شده و 0 حذف شده
  1. 82 0
      documents/proto/tag.proto
  2. 55 0
      documents/proto/translation.proto
  3. 62 0
      documents/proto/wbw.proto

+ 82 - 0
documents/proto/tag.proto

@@ -0,0 +1,82 @@
+syntax = "proto3";
+import "public.proto";
+
+package pcds.tag.v1;
+
+
+/*
+ * Tag 服务
+ * 
+ *  
+ * 
+ */
+service Tag{
+	rpc GetResListByTag (ResListRequest) returns (TagListReply){}
+	rpc GetTagListByRes (TagListResRequest) returns (TagListReply){}
+
+	rpc GetTagListForStudio (TagListRequest) returns (TagListReply){}
+	rpc GetTag (TagRequest) returns (TagReply){}
+	rpc SetTag (TagRequest) returns (TagReply){}
+	rpc AddTag (TagRequest) returns (TagReply){}
+	rpc DelTag (TagRequest) returns (TagReply){}
+}
+
+message TagListRequest{
+	string Id = 1;
+	string Search = 3;
+	EnumAllowingSearch SearchCol = 4;
+	int32  CurrentPage = 5;
+	int32  PerPage = 6;
+	EnumAllowingOrderby OrderBy = 7;
+	bool   Desc = 8;
+}
+
+message ResListRequest{
+	repeated string TagId = 1;
+	EnumResType ResType = 2;
+}
+message TagListResRequest{
+	repeated string ResId = 1;
+}
+
+enum EnumAllowingSearch{
+	EAS_Name = 0;
+}
+enum EnumAllowingOrderby{
+	EAO_UPDATED_AT = 0;
+	EAO_CREATED_AT = 1;
+	EAO_Name       = 2;
+}
+
+message TagRequest{
+	string Id          = 1;
+	string Name        = 2;
+	string Description = 3;	
+	int32  Color       = 4;
+	Studio Studio      = 5;
+
+	string Lang             = 51;
+	User   Editor           = 52;
+	EnumPublicity Publicity = 53;
+
+	string CreatedAt = 101; 
+	string UpdatedAt = 102; 
+}
+
+
+message TagReply{
+	bool ok          = 1;
+	string message   = 2;
+	TagRequest data = 3;
+}
+
+message TagListReply{
+	bool ok = 1;
+	string message = 2;
+	message data{
+		repeated TagRequest rows = 1;
+		int32    Count = 2;
+		int32    CurrentPage = 3;
+		int32    PerPage = 4;
+	}
+}

+ 55 - 0
documents/proto/translation.proto

@@ -0,0 +1,55 @@
+syntax = "proto3";
+import "public.proto";
+
+package pcds.translation.v1;
+
+
+/*
+ * 译文
+ * 
+ *  
+ * 
+ */
+service Translation{
+	rpc GetTranslation (TranslationListRequest) returns (TranslationReply){}
+	rpc SetTranslation (TranslationListRequest) returns (TranslationReply){}
+	rpc AddTranslation (TranslationListRequest) returns (TranslationReply){}
+	rpc DelTranslation (TranslationListRequest) returns (TranslationReply){}
+
+	rpc GetPr (TranslationListRequest) returns (TranslationReply){}
+	rpc SetPr (TranslationListRequest) returns (TranslationReply){}
+	rpc AddPr (TranslationListRequest) returns (TranslationReply){}
+	rpc DelPr (TranslationListRequest) returns (TranslationReply){}
+}
+
+message TranslationRequest{
+	string Id                   = 1;
+	string Book                 = 2;
+	string Paragraph            = 3;
+	string Start                = 4;
+	string End                  = 5;
+	string Channel              = 7;
+	string Content              = 8;
+	EnumContentType ContentType = 9;
+	string Html                 = 10;
+
+	string Lang             = 51;
+	User   Editor           = 52;
+	EnumPublicity Publicity = 53;
+	int32 Version           = 54;
+
+	string CreatedAt = 101; 
+	string UpdatedAt = 102; 
+}
+
+message TranslationListRequest{
+	repeated TranslationRequest data = 1;
+}
+
+message TranslationReply{
+	bool Ok = 1;
+	string Message = 2;
+	message Data{
+		repeated TranslationRequest Rows = 1;
+	}
+}

+ 62 - 0
documents/proto/wbw.proto

@@ -0,0 +1,62 @@
+syntax = "proto3";
+import "public.proto";
+
+package pcds.wbw.v1;
+
+/*
+ * 逐词解析 服务
+ * 
+ *  
+ * 
+ */
+service Wbw{
+	rpc GetWbwForPara (WbwListRequest) returns (WbwReply){}     //获取一个段落的逐词译信息
+	rpc AddWbwForPara (WbwParaSaveRequest) returns (WbwReply){}	
+	rpc SetWbwForPara (WbwParaSaveRequest) returns (WbwReply){} //批量保存。用于调整词序的保存。
+
+	rpc GetWbw (WbwRequest) returns (WbwReply){}
+	rpc SetWbw (WbwRequest) returns (WbwReply){}
+	rpc DelWbw (WbwRequest) returns (WbwReply){}
+}
+
+message WbwListRequest{
+	int32 Book        = 2;
+	int32 Paragraph   = 3;	
+	string Channel     = 4;
+}
+
+message WbwRequest{
+	string Id         = 1;
+	int32 Book        = 2;
+	int32 Paragraph   = 3;	
+	int32 Sn          = 4;	
+	string Data       = 5;	
+	string Channel    = 6;
+	string Studio     = 7;
+
+	string Lang             = 51;
+	User   Editor           = 52;
+	EnumPublicity Publicity = 53;
+
+
+	string CreatedAt = 101; 
+	string UpdatedAt = 102; 
+}
+message WbwParaSaveRequest{
+	WbwListRequest info = 1;
+	repeated WbwRequest data = 2;
+}
+
+message WbwReply{
+	bool ok          = 1;
+	string message   = 2;
+	WbwRequest data = 3;
+}
+
+message WbwParaReply{
+	bool ok = 1;
+	string message = 2;
+	message data{
+		repeated WbwRequest rows = 1;
+	}
+}