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
            }
        }
    ],
    interests:[
        {
        type : String ,
        }
    ],
    projects:[
        {
        type : String ,
        }
    ],
    skills:[
        {
            type:String ,
        }
    ] ,
    user : {
        type:mongoose.Types.ObjectId ,
        ref:'User' , 
        required:true
    }
}) ;

module.exports = mongoose.model('Student' , studentSchema) ;