"use strict";
var __importDefault = (this && this.__importDefault) || function (mod) {
    return (mod && mod.__esModule) ? mod : { "default": mod };
};
Object.defineProperty(exports, "__esModule", { value: true });
exports.Appraiser = exports.AppraiserSchema = exports.AppraiserValidationSchema = void 0;
const mongoose_1 = __importDefault(require("mongoose"));
const joi_1 = __importDefault(require("joi"));
const _models_1 = require("./_models");
exports.AppraiserValidationSchema = joi_1.default.object({
    _id: joi_1.default.string(),
    name: joi_1.default.string().required(),
    speciality: joi_1.default.string().allow(''),
    isDeleted: joi_1.default.boolean(),
    order: joi_1.default.number().required().allow(null),
});
exports.AppraiserSchema = new mongoose_1.default.Schema({
    isDeleted: {
        type: Boolean,
        default: false,
    },
    name: {
        type: String,
        required: true,
    },
    speciality: {
        type: String,
    },
    order: {
        type: Number,
        required: true,
    },
}, {
    timestamps: { createdAt: true, updatedAt: true },
    versionKey: false,
});
exports.Appraiser = mongoose_1.default.model(_models_1.MODEL_NAMES.appraiser, exports.AppraiserSchema);
