const mongoose = require("mongoose");


const userSchema = new mongoose.Schema({
	firstName: {
	    type: String,
	    required: [true, 'First Name is Required']
	},
	lastName: {
	    type: String,
	    required: [true, 'Last Name is Required']
	},
	email: {
		type: String,
		required: [true, "Email is required!"]
	},
	password: {
		type: String,
		required: [true, "Password is required!"]
	},
	mobileNo: {
	    type: String,
	    required: [true, 'Mobile Number is Required']
	},
	isAdmin: {
		type: Boolean,
		default: false
	},
	orders: {
		type: Array
	},
	myCart: {
		type: Array
	}
})

const User = mongoose.model("users", userSchema);

module.exports = User;