"use strict";
var __importDefault = (this && this.__importDefault) || function (mod) {
    return (mod && mod.__esModule) ? mod : { "default": mod };
};
Object.defineProperty(exports, "__esModule", { value: true });
const mongoose_1 = __importDefault(require("mongoose"));
const UserSchema = new mongoose_1.default.Schema({
    name: { type: String, required: true },
    email: { type: String, required: true, unique: true },
    password: { type: String, required: true },
    role: { type: String, enum: ['admin', 'manager', 'waiter', 'cashier'], default: 'admin' },
    avatar: String,
    resetPasswordToken: String,
    resetPasswordExpires: Date,
}, { timestamps: true });
exports.default = mongoose_1.default.models.User || mongoose_1.default.model('User', UserSchema);
