"use strict";
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;
};
Object.defineProperty(exports, "__esModule", { value: true });
exports.OrderFinancial = exports.OrderItemFinancial = void 0;
const jackson_js_1 = require("jackson-js");
const financial_entry_1 = require("../../dto/financial_entry");
class OrderItemFinancial {
    constructor(orderItemId, rootEntity) {
        this.orderItemId = orderItemId;
        this.rootEntity = rootEntity;
        this.financialEntries = [];
    }
}
__decorate([
    (0, jackson_js_1.JsonProperty)()
], OrderItemFinancial.prototype, "orderItemId", void 0);
__decorate([
    (0, jackson_js_1.JsonProperty)()
], OrderItemFinancial.prototype, "rootEntity", void 0);
__decorate([
    (0, jackson_js_1.JsonProperty)(),
    (0, jackson_js_1.JsonClassType)({ type: () => [Array, [financial_entry_1.FinancialEntry]] })
], OrderItemFinancial.prototype, "financialEntries", void 0);
exports.OrderItemFinancial = OrderItemFinancial;
class OrderFinancial {
    constructor(orderId, provider) {
        this.provider = provider;
        this.orderId = orderId;
        this.orderItems = [];
    }
    push(item) {
        this.orderItems.push(item);
    }
}
__decorate([
    (0, jackson_js_1.JsonProperty)()
], OrderFinancial.prototype, "orderId", void 0);
__decorate([
    (0, jackson_js_1.JsonProperty)()
], OrderFinancial.prototype, "provider", void 0);
__decorate([
    (0, jackson_js_1.JsonProperty)(),
    (0, jackson_js_1.JsonClassType)({ type: () => [Array, [OrderItemFinancial]] })
], OrderFinancial.prototype, "orderItems", void 0);
exports.OrderFinancial = OrderFinancial;
//# sourceMappingURL=financial.js.map