scheunemann-interfaces
Version:
Interfaces de Projetos Scheunemann
47 lines (46 loc) • 1.76 kB
JavaScript
"use strict";
Object.defineProperty(exports, "__esModule", { value: true });
exports.OrderEntity = void 0;
var general_1 = require("../../general");
var enums_1 = require("../enums");
var cancellation_entity_1 = require("./cancellation.entity");
var customer_entity_1 = require("./customer.entity");
var payment_entity_1 = require("./payment.entity");
var total_entity_1 = require("./total.entity");
var OrderEntity = /** @class */ (function () {
function OrderEntity(data) {
// #region Properties (22)
this.additionalFees = [];
this.benefits = [];
this.cancellation = new cancellation_entity_1.OrderCancellationEntity();
this.companyId = '';
this.containerId = '';
this.createdAt = new Date();
this.customer = new customer_entity_1.OrderCustomerEntity();
this.delivery = null;
this.displayId = Math.round(Math.random() * 100000).toString();
this.id = '';
this.invoiceId = null;
this.items = [];
this.orderTiming = enums_1.EOrderTiming.IMMEDIATE;
this.orderType = null;
this.payments = new payment_entity_1.OrderPaymentEntity();
this.reference = null;
this.salesChannel = '';
this.sandbox = false;
this.status = enums_1.OrderStatusEnum.PENDING;
this.total = new total_entity_1.OrderTotalEntity();
this.updatedAt = new Date();
this.version = '';
this.from = general_1.EDesenfilaFrom.DEFAULT;
if (data) {
for (var key in data) {
if (data.hasOwnProperty(key) && key in this) {
this[key] = data[key];
}
}
}
}
return OrderEntity;
}());
exports.OrderEntity = OrderEntity;