You cannot select more than 25 topics Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.

26 lines
476 B
JavaScript

import mongoose from "mongoose";
const userSchema = mongoose.Schema({
username: {
type:String,
required: true,
},
email: {
type:String,
required:true,
unique: true
},
password: {
type:String,
required: true,
},
isAdmin: {
type:Boolean,
required: true,
default: false
}
}, { timestamps: true })
const User = mongoose.model('USer', userSchema)
export default User