var __decorate = (this && this.__decorate) || function (decorators, target, key, desc) {
    var c = arguments.length, r = c < 3 ? target : desc === null ? desc = Object.getOwnPropertyDescriptor(target, key) : desc, d;
    if (typeof Reflect === "object" && typeof Reflect.decorate === "function") r = Reflect.decorate(decorators, target, key, desc);
    else for (var i = decorators.length - 1; i >= 0; i--) if (d = decorators[i]) r = (c < 3 ? d(r) : c > 3 ? d(target, key, r) : d(target, key)) || r;
    return c > 3 && r && Object.defineProperty(target, key, r), r;
};
import { JsonClassType, JsonProperty } from "jackson-js";
import { Transaction } from "../../dto/transaction";
import _ from "lodash";
export class ProductPurchaseLookup {
    constructor(productPurchaseId, quantity) {
        this.productPurchaseId = productPurchaseId;
        this.quantity = quantity;
    }
}
__decorate([
    JsonProperty()
], ProductPurchaseLookup.prototype, "productPurchaseId", void 0);
__decorate([
    JsonProperty()
], ProductPurchaseLookup.prototype, "quantity", void 0);
export class PurchaseOrderExpense {
    constructor(expense) {
        // PurchaseOrderExpense is ment to be a message payload, therefore we need to
        // strip useless fields
        const exp = _.cloneDeep(expense);
        exp.strip();
        this.purchaseOrderStatus = "";
        this.expenseType = "";
        this.productPurchasesMap = {};
        this.expense = exp;
    }
}
__decorate([
    JsonProperty()
], PurchaseOrderExpense.prototype, "purchaseOrderStatus", void 0);
__decorate([
    JsonProperty()
], PurchaseOrderExpense.prototype, "expenseType", void 0);
__decorate([
    JsonProperty(),
    JsonClassType({ type: () => [Object] })
], PurchaseOrderExpense.prototype, "productPurchasesMap", void 0);
__decorate([
    JsonProperty(),
    JsonClassType({ type: () => [Transaction] })
], PurchaseOrderExpense.prototype, "expense", void 0);
//# sourceMappingURL=expense.js.map