123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156157158159160161162163164165166167168169170171172173174175176177178179180181182183184185186187188189 |
- syntax = "proto3";
- option csharp_namespace = "TMDGrpc.CourseService";
- option java_package = "TMDGrpc.CourseService";
- package TMDGrpc;
- service CourseService {
- //查询课程
- rpc FindCourseByDict(Dict) returns(stream Course);
- //保存课程
- rpc SaveCourse(stream Course) returns(stream Course);
- //删除课程
- rpc DeleteCourse(ListPid) returns(ListPid);
- }
- //请求参数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;
- }
- //基础信息
- message BaseInfo {
- //课程编码
- string courseCode = 1;
- //课程名称
- string courseName = 2;
- //学段编码
- string periodCode = 3;
- //年级编码
- string gradeCode = 4;
- //学科编码
- string subjectCode = 5;
- //课程公告
- string notice = 6;
- }
- //课程
- message Course {
- //学校编码 如果是教师个人知识点 则为 personal(写死) 否则为学校编码
- string scopeCode = 1;
- //基础信息
- BaseInfo baseInfo = 2;
- //协同教师
- repeated string assistTeacher = 3;
- //上课时间表
- repeated CourseTime courseTime = 4;
- //课程“教室” Classroom
- repeated string classroom = 5;
- //关联课纲 SyllabusNode
- repeated string syllabus = 6;
- //id
- string id = 7;
- }
- //上课时间表
- message CourseTime {
- //上课频率 每日、每周、每月、临时课程
- string frequencyCode = 1;
- //课程开始时间
- string beginTime = 2;
- //课程结束时间
- string endTime = 3;
- //上课班级/教室
- string classroomCode = 4;
- //临时课程
- repeated string frequencyName = 5;
- }
- 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;
- }
|