Cantilever-Labs/models/Student.js

49 lines
885 B
JavaScript
Raw Normal View History

2021-04-01 06:38:27 -07:00
const mongoose = require('mongoose') ;
const Schema = mongoose.Schema ;
const studentSchema = new Schema({
institute:{
type:String
},
yearofgrad:{
type:String
},
phoneNumber : {
type : String ,
} ,
courses:[
{
basicInfo : {
type:mongoose.Types.ObjectId ,
ref : 'CourseType' ,
required : true
} ,
details : {
type : Object
}
2021-04-01 06:38:27 -07:00
}
],
interests:[
{
type : String ,
}
],
projects:[
{
type : String ,
}
],
skills:[
{
type:String ,
}
] ,
user : {
type:mongoose.Types.ObjectId ,
ref:'User' ,
required:true
}
}) ;
module.exports = mongoose.model('Student' , studentSchema) ;