"use strict";
var __importDefault = (this && this.__importDefault) || function (mod) {
    return (mod && mod.__esModule) ? mod : { "default": mod };
};
Object.defineProperty(exports, "__esModule", { value: true });
exports.AccountPayableItemModel = exports.AccountPayableItemSchema = exports.ACCOUNT_PAYABLE_FIELDS = void 0;
const mongoose_1 = __importDefault(require("mongoose"));
const _models_1 = require("./_models");
const mongooseLeanId = require('../plugins/id.plugin');
exports.ACCOUNT_PAYABLE_FIELDS = [
    '_id',
    'apDate',
    'poNumber',
    'customerName',
    'amount',
    'otherInformation1',
    'otherInformation2',
    'otherInformation3',
];
exports.AccountPayableItemSchema = new mongoose_1.default.Schema({
    bbcSheetId: {
        type: mongoose_1.default.Schema.Types.ObjectId,
        ref: _models_1.MODEL_NAMES.BBCSheets,
        required: true,
    },
    order: {
        type: Number,
        required: true,
    },
    apDate: {
        type: Date,
        required: true,
    },
    poNumber: {
        type: String,
        trim: true,
    },
    customerName: {
        type: String,
        trim: true,
    },
    amount: {
        type: Number,
        required: true,
    },
    otherInformation1: {
        type: String,
        trim: true,
    },
    otherInformation2: {
        type: String,
        trim: true,
    },
    otherInformation3: {
        type: String,
        trim: true,
    },
    __v: { type: Number, select: false },
}, { timestamps: true });
exports.AccountPayableItemSchema.plugin(mongooseLeanId);
exports.AccountPayableItemModel = mongoose_1.default.model('AccountPayableItem', exports.AccountPayableItemSchema);
