Skip to content

Instantly share code, notes, and snippets.

@ssaumyaranjan7
Created June 23, 2019 19:43
Show Gist options
  • Save ssaumyaranjan7/7cf0fab5614a41cb28286df9b3547f18 to your computer and use it in GitHub Desktop.
Save ssaumyaranjan7/7cf0fab5614a41cb28286df9b3547f18 to your computer and use it in GitHub Desktop.
This is the model files
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;
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