"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.InsertOrderBalance = exports.InsertOrderItemBalance = exports.Balance = void 0;
const jackson_js_1 = require("jackson-js");
const jack_x_1 = require("../../../jack-x");
const tag_1 = require("../../../tag");
class Balance {
    constructor(amount, currency, date, tag) {
        this.amount = amount;
        this.currency = currency;
        this.date = date;
        this.tag = tag;
    }
}
__decorate([
    (0, jackson_js_1.JsonProperty)()
], Balance.prototype, "amount", void 0);
__decorate([
    (0, jackson_js_1.JsonProperty)()
], Balance.prototype, "currency", void 0);
__decorate([
    (0, jackson_js_1.JsonProperty)(),
    (0, jackson_js_1.JsonSerialize)({ using: jack_x_1.DateSerializer.serialize }),
    (0, jackson_js_1.JsonDeserialize)({ using: jack_x_1.DateSerializer.deserialize }),
    (0, jackson_js_1.JsonClassType)({ type: () => [Date] })
], Balance.prototype, "date", void 0);
__decorate([
    (0, jackson_js_1.JsonProperty)(),
    (0, jackson_js_1.JsonClassType)({ type: () => [tag_1.Tag] })
], Balance.prototype, "tag", void 0);
exports.Balance = Balance;
class InsertOrderItemBalance {
    constructor(orderItemId, sellerSku) {
        this.orderItemId = orderItemId;
        this.sellerSku = sellerSku;
        this.balances = [];
    }
    addBalance(balance) {
        this.balances.push(balance);
    }
}
__decorate([
    (0, jackson_js_1.JsonProperty)()
], InsertOrderItemBalance.prototype, "orderItemId", void 0);
__decorate([
    (0, jackson_js_1.JsonProperty)()
], InsertOrderItemBalance.prototype, "sellerSku", void 0);
__decorate([
    (0, jackson_js_1.JsonProperty)(),
    (0, jackson_js_1.JsonClassType)({ type: () => [Array, [Balance]] })
], InsertOrderItemBalance.prototype, "balances", void 0);
exports.InsertOrderItemBalance = InsertOrderItemBalance;
class InsertOrderBalance {
    constructor(tenant, orderId) {
        this.tenant = tenant;
        this.orderId = orderId;
        this.balances = [];
    }
    addBalance(balance) {
        this.balances.push(balance);
    }
}
__decorate([
    (0, jackson_js_1.JsonProperty)()
], InsertOrderBalance.prototype, "orderId", void 0);
__decorate([
    (0, jackson_js_1.JsonProperty)()
], InsertOrderBalance.prototype, "tenant", void 0);
__decorate([
    (0, jackson_js_1.JsonProperty)(),
    (0, jackson_js_1.JsonClassType)({ type: () => [Array, [InsertOrderItemBalance]] })
], InsertOrderBalance.prototype, "balances", void 0);
exports.InsertOrderBalance = InsertOrderBalance;
//# sourceMappingURL=insert_order_balance.js.map