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
-- User -- | |
//import the mongoose package | |
const mongoose = require('mongoose'); | |
//get the Schema from mongoose | |
const { Schema } = mongoose; | |
//Define the schema for user | |
const userSchema = new Schema({ | |
EmailAddress: { | |
type: String, | |
required: [true, 'EmailAddress is required'], |