42 lines
682 B
JavaScript
42 lines
682 B
JavaScript
const mongoose = require('mongoose') ;
|
|
|
|
const Schema = mongoose.Schema ;
|
|
|
|
const studentSchema = new Schema({
|
|
institute:{
|
|
type:String
|
|
},
|
|
yearofgrad:{
|
|
type:String
|
|
},
|
|
phoneNumber : {
|
|
type : String ,
|
|
} ,
|
|
courses:[
|
|
{
|
|
type:String
|
|
}
|
|
],
|
|
interests:[
|
|
{
|
|
type : String ,
|
|
}
|
|
],
|
|
projects:[
|
|
{
|
|
type : String ,
|
|
}
|
|
],
|
|
skills:[
|
|
{
|
|
type:String ,
|
|
}
|
|
] ,
|
|
user : {
|
|
type:mongoose.Types.ObjectId ,
|
|
ref:'User' ,
|
|
required:true
|
|
}
|
|
}) ;
|
|
|
|
module.exports = mongoose.model('Student' , studentSchema) ; |