"use strict";
var __importDefault = (this && this.__importDefault) || function (mod) {
    return (mod && mod.__esModule) ? mod : { "default": mod };
};
Object.defineProperty(exports, "__esModule", { value: true });
exports.BankIncomingPaymentNotificationRule = exports.BankIncomingPaymentNotificationRuleSchema = exports.BankIncomingPaymentNotificationRuleValidationSchema = void 0;
const mongoose_1 = __importDefault(require("mongoose"));
const joi_1 = __importDefault(require("joi"));
const _models_1 = require("./_models");
exports.BankIncomingPaymentNotificationRuleValidationSchema = joi_1.default.object({
    _id: joi_1.default.string(),
    bankId: joi_1.default.string(),
    active: joi_1.default.boolean(),
});
exports.BankIncomingPaymentNotificationRuleSchema = new mongoose_1.default.Schema({
    bankId: {
        type: mongoose_1.default.Schema.Types.ObjectId,
        ref: _models_1.MODEL_NAMES.banks,
        required: true,
    },
    deletedAt: {
        type: Date,
    },
}, {
    timestamps: { createdAt: true, updatedAt: true },
    versionKey: false,
});
exports.BankIncomingPaymentNotificationRule = mongoose_1.default.model(_models_1.MODEL_NAMES.bankIncomingPaymentNotificationRules, exports.BankIncomingPaymentNotificationRuleSchema);
