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