"use strict";
var __importDefault = (this && this.__importDefault) || function (mod) {
    return (mod && mod.__esModule) ? mod : { "default": mod };
};
Object.defineProperty(exports, "__esModule", { value: true });
exports.InventoryAvailabilityItemModel = exports.InventoryAvailabilityItemScheme = void 0;
const mongoose_1 = __importDefault(require("mongoose"));
const _models_1 = require("./_models");
const mongooseLeanId = require('../plugins/id.plugin');
exports.InventoryAvailabilityItemScheme = new mongoose_1.default.Schema({
    order: {
        type: Number,
        required: true,
    },
    inventoryAvailabilityId: {
        type: mongoose_1.default.Schema.Types.ObjectId,
        ref: _models_1.MODEL_NAMES.inventoryAvailability,
        required: true,
    },
    inventoryId: {
        type: mongoose_1.default.Schema.Types.ObjectId,
        ref: _models_1.MODEL_NAMES.inventoryItem,
        required: true,
    },
    matched: {
        type: Boolean,
        required: true,
    },
    unique: {
        type: Boolean,
        required: true,
    },
    groups: [{
            type: String,
            required: false,
            trim: true,
        }],
    inventoryName: {
        type: String,
        required: false,
        trim: true,
    },
    advanceRate: {
        type: Number,
        required: false,
    },
    availability: {
        type: Number,
        required: false,
    },
    expireDays: {
        type: Number,
        required: false,
    },
    skuDays: {
        type: Number,
        required: false,
    },
    __v: { type: Number, select: false },
}, { timestamps: true });
exports.InventoryAvailabilityItemScheme.plugin(mongooseLeanId);
exports.InventoryAvailabilityItemModel = mongoose_1.default.model(_models_1.MODEL_NAMES.inventoryAvailabilityItem, exports.InventoryAvailabilityItemScheme);
