syntax = "proto3";
option csharp_namespace = "TMDGrpc.VolumeService";
option java_package = "TMDGrpc.VolumeService";
package TMDGrpc;


service VolumeService {
   //保存册别
   rpc SaveOrUpdateVolume(stream SyllabusVolume) returns(stream SyllabusVolume);

   //查询册别
   rpc FindVolume(Dict) returns(stream SyllabusVolume);

   //删除册别
   rpc Delete(ListPid) returns(ListPid);

}



message SyllabusVolume {
   //id生成规则
   string id = 1;
   //0默认教学课纲的册别 1个人或单独的专题课纲册别 2，系统课纲
   int32 type = 2;
   //Type 如果为0 则是学校编码  如果为1 则是seminar 专题/研讨/培训
   string scopeCode = 3;
   //学段
   string periodCode = 4;
   //学科
   string subjectCode = 5;
   //年级
   string gradeCode = 6;
   //学期code
   string semesterCode = 7;
   //状态
   int32 status = 8;
   //册别name
   string volumeName = 9;
   //册别code
   string volumeCode = 10;
   //创建者醍摩豆id
   string TEAMModelId = 11;
   //共编使用者 的醍摩豆id
   repeated string editors = 12;
}

//请求参数Dict
message Dict {
   //数字Dict
   map<string,double> NMap = 1;
   //字符串Dict
   map<string,string> SMap = 2;
   //布尔Dict
   map<string,bool> BMap = 3;
   //字符串ListMap
   repeated LSMap LSMap = 4;
   //数字ListMap
   repeated LNMap LNMap = 5;
   //Byte ListMap
   repeated LBMap LBMap = 6;
}

//Byte[] Map
message LBMap {
   //Key
   string Key = 1;
   //byte数组
   bytes Value = 2;
}

//数字ListMap
message LNMap {
   //Key
   string Key = 1;
   //数字数组
   repeated double Value = 2 [packed = false];
}

//字符串ListMap
message LSMap {
   //数字Dict
   string Key = 1;
   //字符串数组
   repeated string Value = 2;
}

enum HttpStatusCode {
   option allow_alias = true;
   ZERO = 0; // proto3 requires a zero value as the first item (it can be named anything)
   Continue = 100;
   SwitchingProtocols = 101;
   Processing = 102;
   EarlyHints = 103;
   OK = 200;
   Created = 201;
   Accepted = 202;
   NonAuthoritativeInformation = 203;
   NoContent = 204;
   ResetContent = 205;
   PartialContent = 206;
   MultiStatus = 207;
   AlreadyReported = 208;
   IMUsed = 226;
   Ambiguous = 300;
   MultipleChoices = 300;
   MovedPermanently = 301;
   Moved = 301;
   Found = 302;
   Redirect = 302;
   SeeOther = 303;
   RedirectMethod = 303;
   NotModified = 304;
   UseProxy = 305;
   Unused = 306;
   TemporaryRedirect = 307;
   RedirectKeepVerb = 307;
   PermanentRedirect = 308;
   BadRequest = 400;
   Unauthorized = 401;
   PaymentRequired = 402;
   Forbidden = 403;
   NotFound = 404;
   MethodNotAllowed = 405;
   NotAcceptable = 406;
   ProxyAuthenticationRequired = 407;
   RequestTimeout = 408;
   Conflict = 409;
   Gone = 410;
   LengthRequired = 411;
   PreconditionFailed = 412;
   RequestEntityTooLarge = 413;
   RequestUriTooLong = 414;
   UnsupportedMediaType = 415;
   RequestedRangeNotSatisfiable = 416;
   ExpectationFailed = 417;
   MisdirectedRequest = 421;
   UnprocessableEntity = 422;
   Locked = 423;
   FailedDependency = 424;
   UpgradeRequired = 426;
   PreconditionRequired = 428;
   TooManyRequests = 429;
   RequestHeaderFieldsTooLarge = 431;
   UnavailableForLegalReasons = 451;
   InternalServerError = 500;
   NotImplemented = 501;
   BadGateway = 502;
   ServiceUnavailable = 503;
   GatewayTimeout = 504;
   HttpVersionNotSupported = 505;
   VariantAlsoNegotiates = 506;
   InsufficientStorage = 507;
   LoopDetected = 508;
   NotExtended = 510;
   NetworkAuthenticationRequired = 511;
}

message IdPk {
   string id = 1;
   string pk = 2;
   HttpStatusCode StatusCode = 3;
}

message ListPid {
   //list IdPk
   repeated IdPk idPks = 1;
}