Created
December 27, 2021 16:00
-
-
Save neerajkumar161/30de7238e96f497a9cedd0793d040043 to your computer and use it in GitHub Desktop.
src/models/user.ts
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
import {model, Schema} from 'mongoose' | |
const user = new Schema( | |
{ | |
firstname: {type: String}, | |
lastname: {type: String}, | |
age: {type: Number}, | |
email: {type: String}, | |
password: {type: String} | |
}, | |
{timestamps: true} | |
) | |
export const userModel = model('user', user) |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment