Created
June 23, 2019 19:43
-
-
Save ssaumyaranjan7/7cf0fab5614a41cb28286df9b3547f18 to your computer and use it in GitHub Desktop.
This is the model files
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
const mongoose = require(`mongoose`); | |
let employeeSchema = new mongoose.Schema({ | |
firstName: { | |
type: String, | |
default: "" | |
}, | |
lastName: { | |
type: String, | |
default: "" | |
}, | |
email: { | |
type: String, | |
required: true, | |
}, | |
password: { | |
type: String, | |
default: "" | |
} | |
}) | |
let employeeModel = new mongoose.model(`employee`, employeeSchema); | |
module.exports = employeeModel; |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
let employee = require(`./employee`); | |
module.exports = { | |
employee: employee | |
}; |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment