Cantilever-Labs/models/User.js

31 lines
587 B
JavaScript
Raw Normal View History

2021-03-26 06:29:27 -07:00
const mongoose = require('mongoose') ;
const Schema = mongoose.Schema ;
const userSchema = new Schema({
firstName : {
type :String ,
required : true
} ,
lastName : {
type:String ,
required: true
} ,
email : {
type:String ,
required: true
} ,
password : {
2021-04-01 06:38:27 -07:00
type : String
} ,
googleId : {
type : String
} ,
student : {
type : mongoose.Types.ObjectId ,
ref: 'Student'
2021-03-26 06:29:27 -07:00
}
//need to add isAdmin
2021-03-26 06:29:27 -07:00
}) ;
module.exports = mongoose.model("User" , userSchema) ;