|
@@ -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 }, // 回答详情
|
|
|
};
|
|
|
|
|
|
|