123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156157158159160161162163164165166167168169170171172173174175176177178179180181182183184185186187188189190191192193194 |
- syntax = "proto3";
- option csharp_namespace = "TMDGrpc.HomeWorkService";
- option java_package = "TMDGrpc.HomeWorkService";
- package TMDGrpc;
- service HomeWorkService {
- //学生作业打分评论
- rpc StudentScoring(HomeWorkCommentDto) returns(HomeWorkStudent);
- //教师作业打分评论
- rpc TeacherScoring(HomeWorkScoringDto) returns(HomeWorkStudent);
- //查询教师评语罐头
- rpc FindTeacherComments(Dict) returns(stream TeacherComments);
- }
- message HomeWorkCommentDto {
- string id = 1;
- string homeWorkId = 2;
- string commentid = 3;
- string fromId = 4;
- string toId = 5;
- string identity = 6;
- string comment = 7;
- double score = 8;
- }
- message HomeWorkScoringDto {
- string id = 1;
- string homeWorkId = 2;
- double score = 3;
- string comments = 4;
- string TEAMModelId = 5;
- double start = 6;
- }
- //请求参数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 ClassroomItem {
- string name = 1;
- string code = 2;
- }
- //作业评论
- message HomeWorkComment {
- //评论者身份 教师 学生
- string identity = 1;
- //评语
- string comment = 2;
- //评论时间
- int64 createTime = 3;
- //醍摩豆id 或者学生id
- string TEAMModelId = 4;
- }
- //作业内容
- message HomeWorkContent {
- //作答记录
- string answers = 1;
- //其他模式url 及name
- repeated ProcessRes resource = 2;
- }
- //作业数据
- message HomeWorkStudent {
- string id = 1;
- string homeWorkId = 2;
- //姓名
- string name = 3;
- //醍摩豆id
- string TEAMModelId = 4;
- //上课班级
- ClassroomItem classroom = 5;
- //原生班级
- ClassroomItem nativeroom = 6;
- //学号
- string studentId = 7;
- //是否提交
- bool submissionBool = 8;
- //提交时间
- int64 submissionTime = 9;
- //分数
- double score = 10;
- //作业内容
- repeated HomeWorkContent content = 11;
- //作业评论 (同学互评)
- repeated StudentComment studentComments = 12;
- //教师评语
- HomeWorkComment teacherComments = 13;
- }
- //作业附件
- message ProcessRes {
- //文件名字
- string fileName = 1;
- string blobUrl = 2;
- int32 order = 3;
- //文件大小
- int64 size = 4;
- //缩略图链接 图片视频有 文件没有
- string compressUrl = 5;
- //文件类型
- string type = 6;
- //唯一编码
- string sha1Code = 7;
- }
- //评论回复
- message Reply {
- //评论者id 醍摩豆或studenId
- string fromId = 1;
- //被评论者id 醍摩豆或studenId
- string toId = 2;
- //评论者身份 教师 学生
- string identity = 3;
- //评语
- string comment = 4;
- int64 createTime = 5;
- }
- message StudentComment {
- //评论id
- string commentid = 1;
- //评论者id 醍摩豆或studenId
- string fromId = 2;
- //被评论者id 醍摩豆或studenId
- string toId = 3;
- //学生打分
- double score = 4;
- //评论者身份 教师 学生
- string identity = 5;
- //评语
- string comment = 6;
- //评论时间
- int64 createTime = 7;
- repeated Reply reply = 8;
- }
- message Comment {
- string comment = 1;
- int64 createTime = 2;
- string id = 3;
- int32 order = 4;
- }
- message TeacherComments {
- string id = 1;
- //评语
- repeated Comment comment = 2;
- //醍摩豆id 或者学生id
- string TEAMModelId = 3;
- }
|