HomeWorkService.proto 3.8 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156157158159160161162163164165166167168169170171172173174175176177178179180181182183184185186187188189190191192193194
  1. syntax = "proto3";
  2. option csharp_namespace = "TMDGrpc.HomeWorkService";
  3. option java_package = "TMDGrpc.HomeWorkService";
  4. package TMDGrpc;
  5. service HomeWorkService {
  6. //学生作业打分评论
  7. rpc StudentScoring(HomeWorkCommentDto) returns(HomeWorkStudent);
  8. //教师作业打分评论
  9. rpc TeacherScoring(HomeWorkScoringDto) returns(HomeWorkStudent);
  10. //查询教师评语罐头
  11. rpc FindTeacherComments(Dict) returns(stream TeacherComments);
  12. }
  13. message HomeWorkCommentDto {
  14. string id = 1;
  15. string homeWorkId = 2;
  16. string commentid = 3;
  17. string fromId = 4;
  18. string toId = 5;
  19. string identity = 6;
  20. string comment = 7;
  21. double score = 8;
  22. }
  23. message HomeWorkScoringDto {
  24. string id = 1;
  25. string homeWorkId = 2;
  26. double score = 3;
  27. string comments = 4;
  28. string TEAMModelId = 5;
  29. double start = 6;
  30. }
  31. //请求参数Dict
  32. message Dict {
  33. //数字Dict
  34. map<string,double> NMap = 1;
  35. //字符串Dict
  36. map<string,string> SMap = 2;
  37. //布尔Dict
  38. map<string,bool> BMap = 3;
  39. //字符串ListMap
  40. repeated LSMap LSMap = 4;
  41. //数字ListMap
  42. repeated LNMap LNMap = 5;
  43. //Byte ListMap
  44. repeated LBMap LBMap = 6;
  45. }
  46. //Byte[] Map
  47. message LBMap {
  48. //Key
  49. string Key = 1;
  50. //byte数组
  51. bytes Value = 2;
  52. }
  53. //数字ListMap
  54. message LNMap {
  55. //Key
  56. string Key = 1;
  57. //数字数组
  58. repeated double Value = 2 [packed = false];
  59. }
  60. //字符串ListMap
  61. message LSMap {
  62. //数字Dict
  63. string Key = 1;
  64. //字符串数组
  65. repeated string Value = 2;
  66. }
  67. message ClassroomItem {
  68. string name = 1;
  69. string code = 2;
  70. }
  71. //作业评论
  72. message HomeWorkComment {
  73. //评论者身份 教师 学生
  74. string identity = 1;
  75. //评语
  76. string comment = 2;
  77. //评论时间
  78. int64 createTime = 3;
  79. //醍摩豆id 或者学生id
  80. string TEAMModelId = 4;
  81. }
  82. //作业内容
  83. message HomeWorkContent {
  84. //作答记录
  85. string answers = 1;
  86. //其他模式url 及name
  87. repeated ProcessRes resource = 2;
  88. }
  89. //作业数据
  90. message HomeWorkStudent {
  91. string id = 1;
  92. string homeWorkId = 2;
  93. //姓名
  94. string name = 3;
  95. //醍摩豆id
  96. string TEAMModelId = 4;
  97. //上课班级
  98. ClassroomItem classroom = 5;
  99. //原生班级
  100. ClassroomItem nativeroom = 6;
  101. //学号
  102. string studentId = 7;
  103. //是否提交
  104. bool submissionBool = 8;
  105. //提交时间
  106. int64 submissionTime = 9;
  107. //分数
  108. double score = 10;
  109. //作业内容
  110. repeated HomeWorkContent content = 11;
  111. //作业评论 (同学互评)
  112. repeated StudentComment studentComments = 12;
  113. //教师评语
  114. HomeWorkComment teacherComments = 13;
  115. }
  116. //作业附件
  117. message ProcessRes {
  118. //文件名字
  119. string fileName = 1;
  120. string blobUrl = 2;
  121. int32 order = 3;
  122. //文件大小
  123. int64 size = 4;
  124. //缩略图链接 图片视频有 文件没有
  125. string compressUrl = 5;
  126. //文件类型
  127. string type = 6;
  128. //唯一编码
  129. string sha1Code = 7;
  130. }
  131. //评论回复
  132. message Reply {
  133. //评论者id 醍摩豆或studenId
  134. string fromId = 1;
  135. //被评论者id 醍摩豆或studenId
  136. string toId = 2;
  137. //评论者身份 教师 学生
  138. string identity = 3;
  139. //评语
  140. string comment = 4;
  141. int64 createTime = 5;
  142. }
  143. message StudentComment {
  144. //评论id
  145. string commentid = 1;
  146. //评论者id 醍摩豆或studenId
  147. string fromId = 2;
  148. //被评论者id 醍摩豆或studenId
  149. string toId = 3;
  150. //学生打分
  151. double score = 4;
  152. //评论者身份 教师 学生
  153. string identity = 5;
  154. //评语
  155. string comment = 6;
  156. //评论时间
  157. int64 createTime = 7;
  158. repeated Reply reply = 8;
  159. }
  160. message Comment {
  161. string comment = 1;
  162. int64 createTime = 2;
  163. string id = 3;
  164. int32 order = 4;
  165. }
  166. message TeacherComments {
  167. string id = 1;
  168. //评语
  169. repeated Comment comment = 2;
  170. //醍摩豆id 或者学生id
  171. string TEAMModelId = 3;
  172. }