"use strict";
var __importDefault = (this && this.__importDefault) || function (mod) {
    return (mod && mod.__esModule) ? mod : { "default": mod };
};
Object.defineProperty(exports, "__esModule", { value: true });
exports.Bank = exports.BankSchema = void 0;
const mongoose_1 = __importDefault(require("mongoose"));
const _models_1 = require("./_models");
exports.BankSchema = new mongoose_1.default.Schema({
    isDeleted: {
        type: Boolean,
        default: false,
    },
    active: {
        type: Boolean,
        required: true,
        default: true,
    },
    order: {
        type: Number,
        required: true,
        default: 0,
    },
    bankAccountNumber: {
        type: String,
        trim: true,
        required: true,
    },
    name: {
        type: String,
        trim: true,
        required: true,
    },
    ledgerAccountCodes: {
        type: Map,
        of: { type: mongoose_1.default.Schema.Types.ObjectId, ref: _models_1.MODEL_NAMES.quickbooksAccounts },
        default: {},
    },
    reportSettings: {
        consolidatedAllAccounts: {
            type: Boolean,
            default: false,
        },
    },
}, { timestamps: true });
exports.Bank = mongoose_1.default.model(_models_1.MODEL_NAMES.banks, exports.BankSchema);
