const mongoose = require('mongoose'); const CommitSchema = require('./commit'); const PipelineSchema = require('./pipeline'); const ProjectSchema = require('./project'); const TestSchema = require('./test'); const Schema = mongoose.Schema; const StudentSchema = new Schema({ 'name' :String, // 学生名字 'userId': String, // 门户注册的唯一名称(username) 'studentId': String, // 学号 'group': Number, // 所在组号 'email': String, // 邮箱 'commit': CommitSchema, 'projects': [ProjectSchema], // 所加入的项目 'test': TestSchema, 'pipeline': PipelineSchema }); const Student = mongoose.model('Student', StudentSchema); module.exports = Student;