"use strict";
var __importDefault = (this && this.__importDefault) || function (mod) {
    return (mod && mod.__esModule) ? mod : { "default": mod };
};
Object.defineProperty(exports, "__esModule", { value: true });
exports.BorrowerSummary = exports.BorrowerSummarySchema = exports.EChartNames = exports.ETableNames = void 0;
const mongoose_1 = __importDefault(require("mongoose"));
const _models_1 = require("./_models");
var ETableNames;
(function (ETableNames) {
    ETableNames["HIGH_LEVEL"] = "HIGH_LEVEL";
    ETableNames["HIGH_LEVEL_APPROVED"] = "HIGH_LEVEL_APPROVED";
    ETableNames["COMPLIANCE_ITEMS"] = "COMPLIANCE_ITEMS";
    ETableNames["TOP_5_SKUS"] = "TOP_5_SKUS";
    ETableNames["LAST_5_DAYS_TRANSACTIONS"] = "LAST_5_DAYS_TRANSACTIONS";
    ETableNames["INVENTORY_TURN"] = "INVENTORY_TURN";
    ETableNames["TOP_5_CUSTOMERS_CONCENTRATION"] = "TOP_5_CUSTOMERS_CONCENTRATION";
    ETableNames["AGED_OUT_CUSTOMERS"] = "AGED_OUT_CUSTOMERS";
})(ETableNames || (exports.ETableNames = ETableNames = {}));
var EChartNames;
(function (EChartNames) {
    EChartNames["LAST_6_MONTH"] = "LAST_6_MONTH";
})(EChartNames || (exports.EChartNames = EChartNames = {}));
exports.BorrowerSummarySchema = new mongoose_1.default.Schema({
    borrowerId: {
        type: mongoose_1.default.Schema.Types.ObjectId,
        ref: _models_1.MODEL_NAMES.borrowers,
        required: true,
    },
    lastCalculatedAt: {
        type: Date,
        required: true,
    },
    tableData: mongoose_1.default.Schema.Types.Mixed,
    chartData: mongoose_1.default.Schema.Types.Mixed,
}, { timestamps: true });
exports.BorrowerSummary = mongoose_1.default.model(_models_1.MODEL_NAMES.borrowerSummaries, exports.BorrowerSummarySchema);
