"use strict";
var __importDefault = (this && this.__importDefault) || function (mod) {
    return (mod && mod.__esModule) ? mod : { "default": mod };
};
Object.defineProperty(exports, "__esModule", { value: true });
exports.TermLoanSettingsModel = exports.TermLoanSettingsSchema = exports.TERM_LOAN_SETTINGS_FIELDS = void 0;
const mongoose_1 = __importDefault(require("mongoose"));
const _models_1 = require("./_models");
exports.TERM_LOAN_SETTINGS_FIELDS = [
    'termMonths',
    'amortizationProfileMonths',
    'gracePeriodMonths',
    'principalDueDay',
];
exports.TermLoanSettingsSchema = new mongoose_1.default.Schema({
    termLoanId: {
        type: mongoose_1.default.Schema.Types.ObjectId,
        ref: _models_1.MODEL_NAMES.termLoan,
        required: true,
    },
    termMonths: {
        type: Number,
        required: true,
    },
    amortizationProfileMonths: {
        type: Number,
        required: true,
    },
    gracePeriodMonths: {
        type: Number,
        required: true,
    },
    principalDueDay: {
        type: Number,
        required: true,
    },
    __v: { type: Number, select: false },
}, { timestamps: true });
exports.TermLoanSettingsModel = mongoose_1.default.model(_models_1.MODEL_NAMES.termLoanSettings, exports.TermLoanSettingsSchema);
