const mongoose = require("mongoose"); // Schema/Blueprint const userSchema = new mongoose.Schema({ firstName: { type: String, required: [true, 'FirstName is required'] }, lastName: { type: String, required: [true, 'lastName is required'] }, email: { type: String, required: [true, 'Email is required'] }, mobileNo: { type: Number, required: [true, 'MobileNumber is required'] }, isAdmin: { type: Boolean, default: false, // Assuming new users are not admins by default }, password: { type: String, required: [true,'Password is required'] } }); // Model module.exports = mongoose.model("User", userSchema);