"use strict";
var __importDefault = (this && this.__importDefault) || function (mod) {
    return (mod && mod.__esModule) ? mod : { "default": mod };
};
Object.defineProperty(exports, "__esModule", { value: true });
exports.OrganizationEmail = exports.OrganizationEmailModelSchema = exports.OrganizationEmailsType = void 0;
const mongoose_1 = __importDefault(require("mongoose"));
const _models_1 = require("./_models");
var OrganizationEmailsType;
(function (OrganizationEmailsType) {
    OrganizationEmailsType["SENDER"] = "SENDER";
    OrganizationEmailsType["PORTFOLIO"] = "PORTFOLIO";
    OrganizationEmailsType["HIDDEN_RECIPIENT"] = "HIDDEN_RECIPIENT";
    OrganizationEmailsType["FINANCIAL"] = "FINANCIAL";
})(OrganizationEmailsType || (exports.OrganizationEmailsType = OrganizationEmailsType = {}));
exports.OrganizationEmailModelSchema = new mongoose_1.default.Schema({
    organizationId: {
        type: mongoose_1.default.Schema.Types.ObjectId,
        ref: _models_1.MODEL_NAMES.organizations,
    },
    type: {
        type: String,
        enum: Object.values(OrganizationEmailsType),
        required: true,
        trim: true,
    },
    title: {
        type: String,
        required: true,
        trim: true,
    },
    address: {
        type: String,
        required: true,
        trim: true,
    },
}, {
    timestamps: { createdAt: true, updatedAt: false },
});
exports.OrganizationEmail = mongoose_1.default.model(_models_1.MODEL_NAMES.organizationEmails, exports.OrganizationEmailModelSchema);
