student.js 687 B

123456789101112131415161718192021
  1. const mongoose = require('mongoose');
  2. const CommitSchema = require('./commit');
  3. const PipelineSchema = require('./pipeline');
  4. const ProjectSchema = require('./project');
  5. const TestSchema = require('./test');
  6. const Schema = mongoose.Schema;
  7. const StudentSchema = new Schema({
  8. 'name' :String, // 学生名字
  9. 'userId': String, // 门户注册的唯一名称(username)
  10. 'studentId': String, // 学号
  11. 'group': Number, // 所在组号
  12. 'email': String, // 邮箱
  13. 'commit': CommitSchema,
  14. 'projects': [ProjectSchema], // 所加入的项目
  15. 'test': TestSchema,
  16. 'pipeline': PipelineSchema
  17. });
  18. const Student = mongoose.model('Student', StudentSchema);
  19. module.exports = Student;