Jelajahi Sumber

更新学生上传作业表字段

reloaded 5 tahun lalu
induk
melakukan
c48b094b2e
1 mengubah file dengan 8 tambahan dan 0 penghapusan
  1. 8 0
      app/model/uploadtask.js

+ 8 - 0
app/model/uploadtask.js

@@ -2,6 +2,13 @@
 const Schema = require('mongoose').Schema;
 const metaPlugin = require('naf-framework-mongoose/lib/model/meta-plugin');
 
+// 答案详情
+const answerInfo = new Schema({
+  questionid: { type: String, required: false, maxLength: 200 }, // 问题id
+  answer: { type: String, required: false, maxLength: 200 }, // 答案
+  questionscore: { type: String, required: false, maxLength: 200 }, // 分数
+});
+
 // 学生上传作业表
 const UploadtaskSchema = {
   termid: { type: String, required: true, maxLength: 200 }, // 期id
@@ -12,6 +19,7 @@ const UploadtaskSchema = {
   picrul: { type: String, required: false, maxLength: 200 }, // 上传图片地址
   taskid: { type: String, required: false, maxLength: 200 }, // 作业id
   score: { type: String, required: false, maxLength: 2000 }, // 分数
+  answers: { type: [ answerInfo ], select: true }, // 回答详情
 };