|
@@ -2,13 +2,19 @@
|
|
const Schema = require('mongoose').Schema;
|
|
const Schema = require('mongoose').Schema;
|
|
const metaPlugin = require('naf-framework-mongoose/lib/model/meta-plugin');
|
|
const metaPlugin = require('naf-framework-mongoose/lib/model/meta-plugin');
|
|
|
|
|
|
|
|
+// 学生信息表
|
|
|
|
+const stuInfo = new Schema({
|
|
|
|
+ stuid: { type: String, required: false, maxLength: 500 }, // 学生id
|
|
|
|
+ stuname: { type: String, required: false, maxLength: 500 }, // 学生姓名
|
|
|
|
+});
|
|
|
|
+
|
|
// 分组表
|
|
// 分组表
|
|
const GroupSchema = {
|
|
const GroupSchema = {
|
|
name: { type: String, required: true, maxLength: 500 }, // 名称
|
|
name: { type: String, required: true, maxLength: 500 }, // 名称
|
|
termid: { type: String, required: false, maxLength: 500 }, // 期id
|
|
termid: { type: String, required: false, maxLength: 500 }, // 期id
|
|
batchid: { type: String, required: false, maxLength: 500 }, // 批次id
|
|
batchid: { type: String, required: false, maxLength: 500 }, // 批次id
|
|
classid: { type: String, required: false, maxLength: 500 }, // 班级id
|
|
classid: { type: String, required: false, maxLength: 500 }, // 班级id
|
|
- studentid: [ String ], // 学生id
|
|
|
|
|
|
+ students: { type: [ stuInfo ], select: true }, // 学生信息
|
|
score: { type: String, required: false, maxLength: 500 }, // 分数
|
|
score: { type: String, required: false, maxLength: 500 }, // 分数
|
|
};
|
|
};
|
|
|
|
|