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.

27 lines
413 B
JavaScript

const mongoose = require("mongoose");
const userSchema = new mongoose.Schema({
email: {
type: String,
required: [true, "Email is required!"]
},
password: {
type: String,
required: [true, "Password is required!"]
},
isAdmin: {
type: Boolean,
default: false
},
orders: {
type: Array
},
myCart: {
type: Array
}
})
const User = mongoose.model("users", userSchema);
module.exports = User;