tt-entities 0.0.32 → 0.0.34
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/dist/libs/tatayab-entities-library/entities/order-item-bundle-selection.entity.d.ts +17 -0
- package/dist/libs/tatayab-entities-library/entities/order-item-bundle-selection.entity.js +70 -0
- package/dist/libs/tatayab-entities-library/entities/order-item-bundle-selection.entity.js.map +1 -0
- package/dist/libs/tatayab-entities-library/entities/order-item.entity.d.ts +50 -0
- package/dist/libs/tatayab-entities-library/entities/order-item.entity.js +153 -0
- package/dist/libs/tatayab-entities-library/entities/order-item.entity.js.map +1 -0
- package/dist/libs/tatayab-entities-library/entities/order-status-history.entity.d.ts +12 -0
- package/dist/libs/tatayab-entities-library/entities/order-status-history.entity.js +54 -0
- package/dist/libs/tatayab-entities-library/entities/order-status-history.entity.js.map +1 -0
- package/dist/libs/tatayab-entities-library/entities/order-status.entity.d.ts +37 -0
- package/dist/libs/tatayab-entities-library/entities/order-status.entity.js +94 -0
- package/dist/libs/tatayab-entities-library/entities/order-status.entity.js.map +1 -0
- package/dist/libs/tatayab-entities-library/entities/order.entity.d.ts +57 -0
- package/dist/libs/tatayab-entities-library/entities/order.entity.js +219 -0
- package/dist/libs/tatayab-entities-library/entities/order.entity.js.map +1 -0
- package/dist/libs/tatayab-entities-library/entities/purchase-order-order-item.entity.d.ts +16 -0
- package/dist/libs/tatayab-entities-library/entities/purchase-order-order-item.entity.js +64 -0
- package/dist/libs/tatayab-entities-library/entities/purchase-order-order-item.entity.js.map +1 -0
- package/dist/libs/tatayab-entities-library/entities/user-transaction.entity.d.ts +33 -0
- package/dist/libs/tatayab-entities-library/entities/user-transaction.entity.js +99 -0
- package/dist/libs/tatayab-entities-library/entities/user-transaction.entity.js.map +1 -0
- package/dist/libs/tatayab-entities-library/entities/user.entity.d.ts +7 -0
- package/dist/libs/tatayab-entities-library/entities/user.entity.js +19 -0
- package/dist/libs/tatayab-entities-library/entities/user.entity.js.map +1 -1
- package/dist/libs/tatayab-entities-library/index.d.ts +7 -0
- package/dist/libs/tatayab-entities-library/index.js +34 -1
- package/dist/libs/tatayab-entities-library/index.js.map +1 -1
- package/dist/src/main.js +876 -2
- package/libs/tatayab-entities-library/src/entities/order-item-bundle-selection.entity.ts +38 -0
- package/libs/tatayab-entities-library/src/entities/order-item.entity.ts +132 -0
- package/libs/tatayab-entities-library/src/entities/order-status-history.entity.ts +34 -0
- package/libs/tatayab-entities-library/src/entities/order-status.entity.ts +70 -0
- package/libs/tatayab-entities-library/src/entities/order.entity.ts +175 -0
- package/libs/tatayab-entities-library/src/entities/purchase-order-order-item.entity.ts +38 -0
- package/libs/tatayab-entities-library/src/entities/user-transaction.entity.ts +81 -0
- package/libs/tatayab-entities-library/src/entities/user.entity.ts +15 -0
- package/libs/tatayab-entities-library/src/index.ts +37 -0
- package/package.json +1 -1
|
@@ -0,0 +1,17 @@
|
|
|
1
|
+
import { Model } from 'sequelize-typescript';
|
|
2
|
+
import { OrderItem } from './order-item.entity';
|
|
3
|
+
import { Product } from './product.entity';
|
|
4
|
+
import { ProductVariant } from './product-variant.entity';
|
|
5
|
+
export declare class OrderItemBundleSelection extends Model {
|
|
6
|
+
orderItemId: number;
|
|
7
|
+
productId: number;
|
|
8
|
+
productVariantId?: number;
|
|
9
|
+
productNameEn?: string;
|
|
10
|
+
productNameAr?: string;
|
|
11
|
+
variantLabelEn?: string;
|
|
12
|
+
variantLabelAr?: string;
|
|
13
|
+
sortOrder: number;
|
|
14
|
+
orderItem: OrderItem;
|
|
15
|
+
product: Product;
|
|
16
|
+
variant?: ProductVariant;
|
|
17
|
+
}
|
|
@@ -0,0 +1,70 @@
|
|
|
1
|
+
"use strict";
|
|
2
|
+
var __decorate = (this && this.__decorate) || function (decorators, target, key, desc) {
|
|
3
|
+
var c = arguments.length, r = c < 3 ? target : desc === null ? desc = Object.getOwnPropertyDescriptor(target, key) : desc, d;
|
|
4
|
+
if (typeof Reflect === "object" && typeof Reflect.decorate === "function") r = Reflect.decorate(decorators, target, key, desc);
|
|
5
|
+
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;
|
|
6
|
+
return c > 3 && r && Object.defineProperty(target, key, r), r;
|
|
7
|
+
};
|
|
8
|
+
var __metadata = (this && this.__metadata) || function (k, v) {
|
|
9
|
+
if (typeof Reflect === "object" && typeof Reflect.metadata === "function") return Reflect.metadata(k, v);
|
|
10
|
+
};
|
|
11
|
+
Object.defineProperty(exports, "__esModule", { value: true });
|
|
12
|
+
exports.OrderItemBundleSelection = void 0;
|
|
13
|
+
const sequelize_typescript_1 = require("sequelize-typescript");
|
|
14
|
+
const order_item_entity_1 = require("./order-item.entity");
|
|
15
|
+
const product_entity_1 = require("./product.entity");
|
|
16
|
+
const product_variant_entity_1 = require("./product-variant.entity");
|
|
17
|
+
let OrderItemBundleSelection = class OrderItemBundleSelection extends sequelize_typescript_1.Model {
|
|
18
|
+
};
|
|
19
|
+
exports.OrderItemBundleSelection = OrderItemBundleSelection;
|
|
20
|
+
__decorate([
|
|
21
|
+
(0, sequelize_typescript_1.ForeignKey)(() => order_item_entity_1.OrderItem),
|
|
22
|
+
(0, sequelize_typescript_1.Column)({ allowNull: false }),
|
|
23
|
+
__metadata("design:type", Number)
|
|
24
|
+
], OrderItemBundleSelection.prototype, "orderItemId", void 0);
|
|
25
|
+
__decorate([
|
|
26
|
+
(0, sequelize_typescript_1.ForeignKey)(() => product_entity_1.Product),
|
|
27
|
+
(0, sequelize_typescript_1.Column)({ allowNull: false }),
|
|
28
|
+
__metadata("design:type", Number)
|
|
29
|
+
], OrderItemBundleSelection.prototype, "productId", void 0);
|
|
30
|
+
__decorate([
|
|
31
|
+
(0, sequelize_typescript_1.ForeignKey)(() => product_variant_entity_1.ProductVariant),
|
|
32
|
+
(0, sequelize_typescript_1.Column)({ allowNull: true }),
|
|
33
|
+
__metadata("design:type", Number)
|
|
34
|
+
], OrderItemBundleSelection.prototype, "productVariantId", void 0);
|
|
35
|
+
__decorate([
|
|
36
|
+
(0, sequelize_typescript_1.Column)({ allowNull: true }),
|
|
37
|
+
__metadata("design:type", String)
|
|
38
|
+
], OrderItemBundleSelection.prototype, "productNameEn", void 0);
|
|
39
|
+
__decorate([
|
|
40
|
+
(0, sequelize_typescript_1.Column)({ allowNull: true }),
|
|
41
|
+
__metadata("design:type", String)
|
|
42
|
+
], OrderItemBundleSelection.prototype, "productNameAr", void 0);
|
|
43
|
+
__decorate([
|
|
44
|
+
(0, sequelize_typescript_1.Column)({ allowNull: true }),
|
|
45
|
+
__metadata("design:type", String)
|
|
46
|
+
], OrderItemBundleSelection.prototype, "variantLabelEn", void 0);
|
|
47
|
+
__decorate([
|
|
48
|
+
(0, sequelize_typescript_1.Column)({ allowNull: true }),
|
|
49
|
+
__metadata("design:type", String)
|
|
50
|
+
], OrderItemBundleSelection.prototype, "variantLabelAr", void 0);
|
|
51
|
+
__decorate([
|
|
52
|
+
(0, sequelize_typescript_1.Column)({ allowNull: false, defaultValue: 0 }),
|
|
53
|
+
__metadata("design:type", Number)
|
|
54
|
+
], OrderItemBundleSelection.prototype, "sortOrder", void 0);
|
|
55
|
+
__decorate([
|
|
56
|
+
(0, sequelize_typescript_1.BelongsTo)(() => order_item_entity_1.OrderItem),
|
|
57
|
+
__metadata("design:type", order_item_entity_1.OrderItem)
|
|
58
|
+
], OrderItemBundleSelection.prototype, "orderItem", void 0);
|
|
59
|
+
__decorate([
|
|
60
|
+
(0, sequelize_typescript_1.BelongsTo)(() => product_entity_1.Product),
|
|
61
|
+
__metadata("design:type", product_entity_1.Product)
|
|
62
|
+
], OrderItemBundleSelection.prototype, "product", void 0);
|
|
63
|
+
__decorate([
|
|
64
|
+
(0, sequelize_typescript_1.BelongsTo)(() => product_variant_entity_1.ProductVariant),
|
|
65
|
+
__metadata("design:type", product_variant_entity_1.ProductVariant)
|
|
66
|
+
], OrderItemBundleSelection.prototype, "variant", void 0);
|
|
67
|
+
exports.OrderItemBundleSelection = OrderItemBundleSelection = __decorate([
|
|
68
|
+
sequelize_typescript_1.Table
|
|
69
|
+
], OrderItemBundleSelection);
|
|
70
|
+
//# sourceMappingURL=order-item-bundle-selection.entity.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"order-item-bundle-selection.entity.js","sourceRoot":"","sources":["../../../../libs/tatayab-entities-library/src/entities/order-item-bundle-selection.entity.ts"],"names":[],"mappings":";;;;;;;;;;;;AAAA,+DAAmF;AACnF,2DAAgD;AAChD,qDAA2C;AAC3C,qEAA0D;AAGnD,IAAM,wBAAwB,GAA9B,MAAM,wBAAyB,SAAQ,4BAAK;CA+BlD,CAAA;AA/BY,4DAAwB;AAG3B;IAFP,IAAA,iCAAU,EAAC,GAAG,EAAE,CAAC,6BAAS,CAAC;IAC3B,IAAA,6BAAM,EAAC,EAAE,SAAS,EAAE,KAAK,EAAE,CAAC;;6DACD;AAIpB;IAFP,IAAA,iCAAU,EAAC,GAAG,EAAE,CAAC,wBAAO,CAAC;IACzB,IAAA,6BAAM,EAAC,EAAE,SAAS,EAAE,KAAK,EAAE,CAAC;;2DACH;AAIlB;IAFP,IAAA,iCAAU,EAAC,GAAG,EAAE,CAAC,uCAAc,CAAC;IAChC,IAAA,6BAAM,EAAC,EAAE,SAAS,EAAE,IAAI,EAAE,CAAC;;kEACM;AAG1B;IADP,IAAA,6BAAM,EAAC,EAAE,SAAS,EAAE,IAAI,EAAE,CAAC;;+DACG;AAGvB;IADP,IAAA,6BAAM,EAAC,EAAE,SAAS,EAAE,IAAI,EAAE,CAAC;;+DACG;AAGvB;IADP,IAAA,6BAAM,EAAC,EAAE,SAAS,EAAE,IAAI,EAAE,CAAC;;gEACI;AAGxB;IADP,IAAA,6BAAM,EAAC,EAAE,SAAS,EAAE,IAAI,EAAE,CAAC;;gEACI;AAGxB;IADP,IAAA,6BAAM,EAAC,EAAE,SAAS,EAAE,KAAK,EAAE,YAAY,EAAE,CAAC,EAAE,CAAC;;2DACpB;AAEW;IAApC,IAAA,gCAAS,EAAC,GAAG,EAAE,CAAC,6BAAS,CAAC;8BAAqB,6BAAS;2DAAC;AACrB;IAApC,IAAA,gCAAS,EAAC,GAAG,EAAE,CAAC,wBAAO,CAAC;8BAAqB,wBAAO;yDAAC;AACb;IAAxC,IAAA,gCAAS,EAAC,GAAG,EAAE,CAAC,uCAAc,CAAC;8BAAmB,uCAAc;yDAAC;mCA9BvD,wBAAwB;IADpC,4BAAK;GACO,wBAAwB,CA+BpC"}
|
|
@@ -0,0 +1,50 @@
|
|
|
1
|
+
import { Model } from 'sequelize-typescript';
|
|
2
|
+
import { Order } from './order.entity';
|
|
3
|
+
import { Product } from './product.entity';
|
|
4
|
+
import { ProductVariant } from './product-variant.entity';
|
|
5
|
+
import { Bundle } from './bundle.entity';
|
|
6
|
+
import { OrderItemBundleSelection } from './order-item-bundle-selection.entity';
|
|
7
|
+
import { PurchaseOrderOrderItem } from './purchase-order-order-item.entity';
|
|
8
|
+
export declare enum OrderItemType {
|
|
9
|
+
PRODUCT = "product",
|
|
10
|
+
BUNDLE = "bundle"
|
|
11
|
+
}
|
|
12
|
+
export declare enum OrderItemFulfillmentStatus {
|
|
13
|
+
PENDING = "pending",
|
|
14
|
+
AWAITING_STOCK = "awaiting_stock",
|
|
15
|
+
PO_LINKED = "po_linked",
|
|
16
|
+
PO_RECEIVED = "po_received",
|
|
17
|
+
STOCK_RESERVED = "stock_reserved",
|
|
18
|
+
PACKED = "packed",
|
|
19
|
+
SHIPPED = "shipped",
|
|
20
|
+
DELIVERED = "delivered",
|
|
21
|
+
CANCELLED = "cancelled",
|
|
22
|
+
RETURN_REQUESTED = "return_requested",
|
|
23
|
+
RETURNED = "returned"
|
|
24
|
+
}
|
|
25
|
+
export declare class OrderItem extends Model {
|
|
26
|
+
orderId: number;
|
|
27
|
+
itemType: OrderItemType;
|
|
28
|
+
productId?: number;
|
|
29
|
+
productVariantId?: number;
|
|
30
|
+
bundleId?: number;
|
|
31
|
+
composedSku?: string;
|
|
32
|
+
productNameEn?: string;
|
|
33
|
+
productNameAr?: string;
|
|
34
|
+
sku?: string;
|
|
35
|
+
variantLabelEn?: string;
|
|
36
|
+
variantLabelAr?: string;
|
|
37
|
+
productImage?: string;
|
|
38
|
+
quantity: number;
|
|
39
|
+
unitPrice: number;
|
|
40
|
+
lineTotal: number;
|
|
41
|
+
fulfillmentInventoryId?: number;
|
|
42
|
+
shipmentGroup: number;
|
|
43
|
+
fulfillmentStatus: OrderItemFulfillmentStatus;
|
|
44
|
+
order: Order;
|
|
45
|
+
product?: Product;
|
|
46
|
+
variant?: ProductVariant;
|
|
47
|
+
bundle?: Bundle;
|
|
48
|
+
bundleSelections: OrderItemBundleSelection[];
|
|
49
|
+
poLink?: PurchaseOrderOrderItem;
|
|
50
|
+
}
|
|
@@ -0,0 +1,153 @@
|
|
|
1
|
+
"use strict";
|
|
2
|
+
var __decorate = (this && this.__decorate) || function (decorators, target, key, desc) {
|
|
3
|
+
var c = arguments.length, r = c < 3 ? target : desc === null ? desc = Object.getOwnPropertyDescriptor(target, key) : desc, d;
|
|
4
|
+
if (typeof Reflect === "object" && typeof Reflect.decorate === "function") r = Reflect.decorate(decorators, target, key, desc);
|
|
5
|
+
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;
|
|
6
|
+
return c > 3 && r && Object.defineProperty(target, key, r), r;
|
|
7
|
+
};
|
|
8
|
+
var __metadata = (this && this.__metadata) || function (k, v) {
|
|
9
|
+
if (typeof Reflect === "object" && typeof Reflect.metadata === "function") return Reflect.metadata(k, v);
|
|
10
|
+
};
|
|
11
|
+
Object.defineProperty(exports, "__esModule", { value: true });
|
|
12
|
+
exports.OrderItem = exports.OrderItemFulfillmentStatus = exports.OrderItemType = void 0;
|
|
13
|
+
const sequelize_typescript_1 = require("sequelize-typescript");
|
|
14
|
+
const order_entity_1 = require("./order.entity");
|
|
15
|
+
const product_entity_1 = require("./product.entity");
|
|
16
|
+
const product_variant_entity_1 = require("./product-variant.entity");
|
|
17
|
+
const bundle_entity_1 = require("./bundle.entity");
|
|
18
|
+
const order_item_bundle_selection_entity_1 = require("./order-item-bundle-selection.entity");
|
|
19
|
+
const purchase_order_order_item_entity_1 = require("./purchase-order-order-item.entity");
|
|
20
|
+
var OrderItemType;
|
|
21
|
+
(function (OrderItemType) {
|
|
22
|
+
OrderItemType["PRODUCT"] = "product";
|
|
23
|
+
OrderItemType["BUNDLE"] = "bundle";
|
|
24
|
+
})(OrderItemType || (exports.OrderItemType = OrderItemType = {}));
|
|
25
|
+
var OrderItemFulfillmentStatus;
|
|
26
|
+
(function (OrderItemFulfillmentStatus) {
|
|
27
|
+
OrderItemFulfillmentStatus["PENDING"] = "pending";
|
|
28
|
+
OrderItemFulfillmentStatus["AWAITING_STOCK"] = "awaiting_stock";
|
|
29
|
+
OrderItemFulfillmentStatus["PO_LINKED"] = "po_linked";
|
|
30
|
+
OrderItemFulfillmentStatus["PO_RECEIVED"] = "po_received";
|
|
31
|
+
OrderItemFulfillmentStatus["STOCK_RESERVED"] = "stock_reserved";
|
|
32
|
+
OrderItemFulfillmentStatus["PACKED"] = "packed";
|
|
33
|
+
OrderItemFulfillmentStatus["SHIPPED"] = "shipped";
|
|
34
|
+
OrderItemFulfillmentStatus["DELIVERED"] = "delivered";
|
|
35
|
+
OrderItemFulfillmentStatus["CANCELLED"] = "cancelled";
|
|
36
|
+
OrderItemFulfillmentStatus["RETURN_REQUESTED"] = "return_requested";
|
|
37
|
+
OrderItemFulfillmentStatus["RETURNED"] = "returned";
|
|
38
|
+
})(OrderItemFulfillmentStatus || (exports.OrderItemFulfillmentStatus = OrderItemFulfillmentStatus = {}));
|
|
39
|
+
let OrderItem = class OrderItem extends sequelize_typescript_1.Model {
|
|
40
|
+
};
|
|
41
|
+
exports.OrderItem = OrderItem;
|
|
42
|
+
__decorate([
|
|
43
|
+
(0, sequelize_typescript_1.ForeignKey)(() => order_entity_1.Order),
|
|
44
|
+
(0, sequelize_typescript_1.Column)({ allowNull: false }),
|
|
45
|
+
__metadata("design:type", Number)
|
|
46
|
+
], OrderItem.prototype, "orderId", void 0);
|
|
47
|
+
__decorate([
|
|
48
|
+
(0, sequelize_typescript_1.Column)({
|
|
49
|
+
type: sequelize_typescript_1.DataType.ENUM(...Object.values(OrderItemType)),
|
|
50
|
+
allowNull: false,
|
|
51
|
+
defaultValue: OrderItemType.PRODUCT,
|
|
52
|
+
}),
|
|
53
|
+
__metadata("design:type", String)
|
|
54
|
+
], OrderItem.prototype, "itemType", void 0);
|
|
55
|
+
__decorate([
|
|
56
|
+
(0, sequelize_typescript_1.ForeignKey)(() => product_entity_1.Product),
|
|
57
|
+
(0, sequelize_typescript_1.Column)({ allowNull: true }),
|
|
58
|
+
__metadata("design:type", Number)
|
|
59
|
+
], OrderItem.prototype, "productId", void 0);
|
|
60
|
+
__decorate([
|
|
61
|
+
(0, sequelize_typescript_1.ForeignKey)(() => product_variant_entity_1.ProductVariant),
|
|
62
|
+
(0, sequelize_typescript_1.Column)({ allowNull: true }),
|
|
63
|
+
__metadata("design:type", Number)
|
|
64
|
+
], OrderItem.prototype, "productVariantId", void 0);
|
|
65
|
+
__decorate([
|
|
66
|
+
(0, sequelize_typescript_1.ForeignKey)(() => bundle_entity_1.Bundle),
|
|
67
|
+
(0, sequelize_typescript_1.Column)({ allowNull: true }),
|
|
68
|
+
__metadata("design:type", Number)
|
|
69
|
+
], OrderItem.prototype, "bundleId", void 0);
|
|
70
|
+
__decorate([
|
|
71
|
+
(0, sequelize_typescript_1.Column)({ allowNull: true }),
|
|
72
|
+
__metadata("design:type", String)
|
|
73
|
+
], OrderItem.prototype, "composedSku", void 0);
|
|
74
|
+
__decorate([
|
|
75
|
+
(0, sequelize_typescript_1.Column)({ allowNull: true }),
|
|
76
|
+
__metadata("design:type", String)
|
|
77
|
+
], OrderItem.prototype, "productNameEn", void 0);
|
|
78
|
+
__decorate([
|
|
79
|
+
(0, sequelize_typescript_1.Column)({ allowNull: true }),
|
|
80
|
+
__metadata("design:type", String)
|
|
81
|
+
], OrderItem.prototype, "productNameAr", void 0);
|
|
82
|
+
__decorate([
|
|
83
|
+
(0, sequelize_typescript_1.Column)({ allowNull: true }),
|
|
84
|
+
__metadata("design:type", String)
|
|
85
|
+
], OrderItem.prototype, "sku", void 0);
|
|
86
|
+
__decorate([
|
|
87
|
+
(0, sequelize_typescript_1.Column)({ allowNull: true }),
|
|
88
|
+
__metadata("design:type", String)
|
|
89
|
+
], OrderItem.prototype, "variantLabelEn", void 0);
|
|
90
|
+
__decorate([
|
|
91
|
+
(0, sequelize_typescript_1.Column)({ allowNull: true }),
|
|
92
|
+
__metadata("design:type", String)
|
|
93
|
+
], OrderItem.prototype, "variantLabelAr", void 0);
|
|
94
|
+
__decorate([
|
|
95
|
+
(0, sequelize_typescript_1.Column)({ allowNull: true }),
|
|
96
|
+
__metadata("design:type", String)
|
|
97
|
+
], OrderItem.prototype, "productImage", void 0);
|
|
98
|
+
__decorate([
|
|
99
|
+
(0, sequelize_typescript_1.Column)({ allowNull: false, defaultValue: 1 }),
|
|
100
|
+
__metadata("design:type", Number)
|
|
101
|
+
], OrderItem.prototype, "quantity", void 0);
|
|
102
|
+
__decorate([
|
|
103
|
+
(0, sequelize_typescript_1.Column)({ type: sequelize_typescript_1.DataType.DECIMAL(10, 3), allowNull: false }),
|
|
104
|
+
__metadata("design:type", Number)
|
|
105
|
+
], OrderItem.prototype, "unitPrice", void 0);
|
|
106
|
+
__decorate([
|
|
107
|
+
(0, sequelize_typescript_1.Column)({ type: sequelize_typescript_1.DataType.DECIMAL(10, 3), allowNull: false }),
|
|
108
|
+
__metadata("design:type", Number)
|
|
109
|
+
], OrderItem.prototype, "lineTotal", void 0);
|
|
110
|
+
__decorate([
|
|
111
|
+
(0, sequelize_typescript_1.Column)({ allowNull: true }),
|
|
112
|
+
__metadata("design:type", Number)
|
|
113
|
+
], OrderItem.prototype, "fulfillmentInventoryId", void 0);
|
|
114
|
+
__decorate([
|
|
115
|
+
(0, sequelize_typescript_1.Column)({ allowNull: false, defaultValue: 1 }),
|
|
116
|
+
__metadata("design:type", Number)
|
|
117
|
+
], OrderItem.prototype, "shipmentGroup", void 0);
|
|
118
|
+
__decorate([
|
|
119
|
+
(0, sequelize_typescript_1.Column)({
|
|
120
|
+
type: sequelize_typescript_1.DataType.ENUM(...Object.values(OrderItemFulfillmentStatus)),
|
|
121
|
+
allowNull: false,
|
|
122
|
+
defaultValue: OrderItemFulfillmentStatus.PENDING,
|
|
123
|
+
}),
|
|
124
|
+
__metadata("design:type", String)
|
|
125
|
+
], OrderItem.prototype, "fulfillmentStatus", void 0);
|
|
126
|
+
__decorate([
|
|
127
|
+
(0, sequelize_typescript_1.BelongsTo)(() => order_entity_1.Order),
|
|
128
|
+
__metadata("design:type", order_entity_1.Order)
|
|
129
|
+
], OrderItem.prototype, "order", void 0);
|
|
130
|
+
__decorate([
|
|
131
|
+
(0, sequelize_typescript_1.BelongsTo)(() => product_entity_1.Product),
|
|
132
|
+
__metadata("design:type", product_entity_1.Product)
|
|
133
|
+
], OrderItem.prototype, "product", void 0);
|
|
134
|
+
__decorate([
|
|
135
|
+
(0, sequelize_typescript_1.BelongsTo)(() => product_variant_entity_1.ProductVariant),
|
|
136
|
+
__metadata("design:type", product_variant_entity_1.ProductVariant)
|
|
137
|
+
], OrderItem.prototype, "variant", void 0);
|
|
138
|
+
__decorate([
|
|
139
|
+
(0, sequelize_typescript_1.BelongsTo)(() => bundle_entity_1.Bundle),
|
|
140
|
+
__metadata("design:type", bundle_entity_1.Bundle)
|
|
141
|
+
], OrderItem.prototype, "bundle", void 0);
|
|
142
|
+
__decorate([
|
|
143
|
+
(0, sequelize_typescript_1.HasMany)(() => order_item_bundle_selection_entity_1.OrderItemBundleSelection),
|
|
144
|
+
__metadata("design:type", Array)
|
|
145
|
+
], OrderItem.prototype, "bundleSelections", void 0);
|
|
146
|
+
__decorate([
|
|
147
|
+
(0, sequelize_typescript_1.HasOne)(() => purchase_order_order_item_entity_1.PurchaseOrderOrderItem),
|
|
148
|
+
__metadata("design:type", purchase_order_order_item_entity_1.PurchaseOrderOrderItem)
|
|
149
|
+
], OrderItem.prototype, "poLink", void 0);
|
|
150
|
+
exports.OrderItem = OrderItem = __decorate([
|
|
151
|
+
sequelize_typescript_1.Table
|
|
152
|
+
], OrderItem);
|
|
153
|
+
//# sourceMappingURL=order-item.entity.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"order-item.entity.js","sourceRoot":"","sources":["../../../../libs/tatayab-entities-library/src/entities/order-item.entity.ts"],"names":[],"mappings":";;;;;;;;;;;;AAAA,+DAS8B;AAC9B,iDAAuC;AACvC,qDAA2C;AAC3C,qEAA0D;AAC1D,mDAAyC;AACzC,6FAAgF;AAChF,yFAA4E;AAE5E,IAAY,aAGX;AAHD,WAAY,aAAa;IACvB,oCAAmB,CAAA;IACnB,kCAAiB,CAAA;AACnB,CAAC,EAHW,aAAa,6BAAb,aAAa,QAGxB;AAED,IAAY,0BAYX;AAZD,WAAY,0BAA0B;IACpC,iDAAmB,CAAA;IACnB,+DAAiC,CAAA;IACjC,qDAAuB,CAAA;IACvB,yDAA2B,CAAA;IAC3B,+DAAiC,CAAA;IACjC,+CAAiB,CAAA;IACjB,iDAAmB,CAAA;IACnB,qDAAuB,CAAA;IACvB,qDAAuB,CAAA;IACvB,mEAAqC,CAAA;IACrC,mDAAqB,CAAA;AACvB,CAAC,EAZW,0BAA0B,0CAA1B,0BAA0B,QAYrC;AAGM,IAAM,SAAS,GAAf,MAAM,SAAU,SAAQ,4BAAK;CA8FnC,CAAA;AA9FY,8BAAS;AAGZ;IAFP,IAAA,iCAAU,EAAC,GAAG,EAAE,CAAC,oBAAK,CAAC;IACvB,IAAA,6BAAM,EAAC,EAAE,SAAS,EAAE,KAAK,EAAE,CAAC;;0CACL;AAOhB;IALP,IAAA,6BAAM,EAAC;QACN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
+
import { Order } from './order.entity';
|
|
3
|
+
export declare class OrderStatusHistory extends Model {
|
|
4
|
+
orderId: number;
|
|
5
|
+
fromStatus?: string;
|
|
6
|
+
toStatus: string;
|
|
7
|
+
toLabelEn?: string;
|
|
8
|
+
toLabelAr?: string;
|
|
9
|
+
note?: string;
|
|
10
|
+
changedBy?: string;
|
|
11
|
+
order: Order;
|
|
12
|
+
}
|
|
@@ -0,0 +1,54 @@
|
|
|
1
|
+
"use strict";
|
|
2
|
+
var __decorate = (this && this.__decorate) || function (decorators, target, key, desc) {
|
|
3
|
+
var c = arguments.length, r = c < 3 ? target : desc === null ? desc = Object.getOwnPropertyDescriptor(target, key) : desc, d;
|
|
4
|
+
if (typeof Reflect === "object" && typeof Reflect.decorate === "function") r = Reflect.decorate(decorators, target, key, desc);
|
|
5
|
+
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;
|
|
6
|
+
return c > 3 && r && Object.defineProperty(target, key, r), r;
|
|
7
|
+
};
|
|
8
|
+
var __metadata = (this && this.__metadata) || function (k, v) {
|
|
9
|
+
if (typeof Reflect === "object" && typeof Reflect.metadata === "function") return Reflect.metadata(k, v);
|
|
10
|
+
};
|
|
11
|
+
Object.defineProperty(exports, "__esModule", { value: true });
|
|
12
|
+
exports.OrderStatusHistory = void 0;
|
|
13
|
+
const sequelize_typescript_1 = require("sequelize-typescript");
|
|
14
|
+
const order_entity_1 = require("./order.entity");
|
|
15
|
+
let OrderStatusHistory = class OrderStatusHistory extends sequelize_typescript_1.Model {
|
|
16
|
+
};
|
|
17
|
+
exports.OrderStatusHistory = OrderStatusHistory;
|
|
18
|
+
__decorate([
|
|
19
|
+
(0, sequelize_typescript_1.ForeignKey)(() => order_entity_1.Order),
|
|
20
|
+
(0, sequelize_typescript_1.Column)({ allowNull: false }),
|
|
21
|
+
__metadata("design:type", Number)
|
|
22
|
+
], OrderStatusHistory.prototype, "orderId", void 0);
|
|
23
|
+
__decorate([
|
|
24
|
+
(0, sequelize_typescript_1.Column)({ allowNull: true }),
|
|
25
|
+
__metadata("design:type", String)
|
|
26
|
+
], OrderStatusHistory.prototype, "fromStatus", void 0);
|
|
27
|
+
__decorate([
|
|
28
|
+
(0, sequelize_typescript_1.Column)({ allowNull: false }),
|
|
29
|
+
__metadata("design:type", String)
|
|
30
|
+
], OrderStatusHistory.prototype, "toStatus", void 0);
|
|
31
|
+
__decorate([
|
|
32
|
+
(0, sequelize_typescript_1.Column)({ allowNull: true }),
|
|
33
|
+
__metadata("design:type", String)
|
|
34
|
+
], OrderStatusHistory.prototype, "toLabelEn", void 0);
|
|
35
|
+
__decorate([
|
|
36
|
+
(0, sequelize_typescript_1.Column)({ allowNull: true }),
|
|
37
|
+
__metadata("design:type", String)
|
|
38
|
+
], OrderStatusHistory.prototype, "toLabelAr", void 0);
|
|
39
|
+
__decorate([
|
|
40
|
+
(0, sequelize_typescript_1.Column)({ type: sequelize_typescript_1.DataType.TEXT, allowNull: true }),
|
|
41
|
+
__metadata("design:type", String)
|
|
42
|
+
], OrderStatusHistory.prototype, "note", void 0);
|
|
43
|
+
__decorate([
|
|
44
|
+
(0, sequelize_typescript_1.Column)({ allowNull: true }),
|
|
45
|
+
__metadata("design:type", String)
|
|
46
|
+
], OrderStatusHistory.prototype, "changedBy", void 0);
|
|
47
|
+
__decorate([
|
|
48
|
+
(0, sequelize_typescript_1.BelongsTo)(() => order_entity_1.Order),
|
|
49
|
+
__metadata("design:type", order_entity_1.Order)
|
|
50
|
+
], OrderStatusHistory.prototype, "order", void 0);
|
|
51
|
+
exports.OrderStatusHistory = OrderStatusHistory = __decorate([
|
|
52
|
+
sequelize_typescript_1.Table
|
|
53
|
+
], OrderStatusHistory);
|
|
54
|
+
//# sourceMappingURL=order-status-history.entity.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"order-status-history.entity.js","sourceRoot":"","sources":["../../../../libs/tatayab-entities-library/src/entities/order-status-history.entity.ts"],"names":[],"mappings":";;;;;;;;;;;;AAAA,+DAE8B;AAC9B,iDAAuC;AAGhC,IAAM,kBAAkB,GAAxB,MAAM,kBAAmB,SAAQ,4BAAK;CA2B5C,CAAA;AA3BY,gDAAkB;AAGrB;IAFP,IAAA,iCAAU,EAAC,GAAG,EAAE,CAAC,oBAAK,CAAC;IACvB,IAAA,6BAAM,EAAC,EAAE,SAAS,EAAE,KAAK,EAAE,CAAC;;mDACL;AAGhB;IADP,IAAA,6BAAM,EAAC,EAAE,SAAS,EAAE,IAAI,EAAE,CAAC;;sDACA;AAGpB;IADP,IAAA,6BAAM,EAAC,EAAE,SAAS,EAAE,KAAK,EAAE,CAAC;;oDACJ;AAIjB;IADP,IAAA,6BAAM,EAAC,EAAE,SAAS,EAAE,IAAI,EAAE,CAAC;;qDACD;AAGnB;IADP,IAAA,6BAAM,EAAC,EAAE,SAAS,EAAE,IAAI,EAAE,CAAC;;qDACD;AAGnB;IADP,IAAA,6BAAM,EAAC,EAAE,IAAI,EAAE,+BAAQ,CAAC,IAAI,EAAE,SAAS,EAAE,IAAI,EAAE,CAAC;;gDAC3B;AAId;IADP,IAAA,6BAAM,EAAC,EAAE,SAAS,EAAE,IAAI,EAAE,CAAC;;qDACD;AAGnB;IADP,IAAA,gCAAS,EAAC,GAAG,EAAE,CAAC,oBAAK,CAAC;8BACR,oBAAK;iDAAC;6BA1BV,kBAAkB;IAD9B,4BAAK;GACO,kBAAkB,CA2B9B"}
|
|
@@ -0,0 +1,37 @@
|
|
|
1
|
+
import { Model } from 'sequelize-typescript';
|
|
2
|
+
import { Order } from './order.entity';
|
|
3
|
+
export declare enum OrderStatusCode {
|
|
4
|
+
PENDING_PAYMENT = "pending_payment",
|
|
5
|
+
PAID = "paid",
|
|
6
|
+
PROCESSING = "processing",
|
|
7
|
+
AWAITING_FULFILLMENT = "awaiting_fulfillment",
|
|
8
|
+
PENDING_VENDOR = "pending_vendor",
|
|
9
|
+
VENDOR_ORDERED = "vendor_ordered",
|
|
10
|
+
STOCK_RECEIVED = "stock_received",
|
|
11
|
+
PACKED = "packed",
|
|
12
|
+
SHIPPED = "shipped",
|
|
13
|
+
OUT_FOR_DELIVERY = "out_for_delivery",
|
|
14
|
+
DELIVERED = "delivered",
|
|
15
|
+
COMPLETED = "completed",
|
|
16
|
+
CANCELLED = "cancelled",
|
|
17
|
+
RETURN_REQUESTED = "return_requested",
|
|
18
|
+
RETURN_APPROVED = "return_approved",
|
|
19
|
+
RETURNED = "returned",
|
|
20
|
+
REFUNDED = "refunded",
|
|
21
|
+
FAILED = "failed"
|
|
22
|
+
}
|
|
23
|
+
export declare class OrderStatus extends Model {
|
|
24
|
+
code: string;
|
|
25
|
+
labelEn: string;
|
|
26
|
+
labelAr: string;
|
|
27
|
+
descriptionEn?: string;
|
|
28
|
+
descriptionAr?: string;
|
|
29
|
+
color?: string;
|
|
30
|
+
icon?: string;
|
|
31
|
+
nextStatuses?: string;
|
|
32
|
+
prevStatuses?: string;
|
|
33
|
+
isTerminal: boolean;
|
|
34
|
+
isVisibleToUser: boolean;
|
|
35
|
+
sortOrder: number;
|
|
36
|
+
orders: Order[];
|
|
37
|
+
}
|
|
@@ -0,0 +1,94 @@
|
|
|
1
|
+
"use strict";
|
|
2
|
+
var __decorate = (this && this.__decorate) || function (decorators, target, key, desc) {
|
|
3
|
+
var c = arguments.length, r = c < 3 ? target : desc === null ? desc = Object.getOwnPropertyDescriptor(target, key) : desc, d;
|
|
4
|
+
if (typeof Reflect === "object" && typeof Reflect.decorate === "function") r = Reflect.decorate(decorators, target, key, desc);
|
|
5
|
+
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;
|
|
6
|
+
return c > 3 && r && Object.defineProperty(target, key, r), r;
|
|
7
|
+
};
|
|
8
|
+
var __metadata = (this && this.__metadata) || function (k, v) {
|
|
9
|
+
if (typeof Reflect === "object" && typeof Reflect.metadata === "function") return Reflect.metadata(k, v);
|
|
10
|
+
};
|
|
11
|
+
Object.defineProperty(exports, "__esModule", { value: true });
|
|
12
|
+
exports.OrderStatus = exports.OrderStatusCode = void 0;
|
|
13
|
+
const sequelize_typescript_1 = require("sequelize-typescript");
|
|
14
|
+
const order_entity_1 = require("./order.entity");
|
|
15
|
+
var OrderStatusCode;
|
|
16
|
+
(function (OrderStatusCode) {
|
|
17
|
+
OrderStatusCode["PENDING_PAYMENT"] = "pending_payment";
|
|
18
|
+
OrderStatusCode["PAID"] = "paid";
|
|
19
|
+
OrderStatusCode["PROCESSING"] = "processing";
|
|
20
|
+
OrderStatusCode["AWAITING_FULFILLMENT"] = "awaiting_fulfillment";
|
|
21
|
+
OrderStatusCode["PENDING_VENDOR"] = "pending_vendor";
|
|
22
|
+
OrderStatusCode["VENDOR_ORDERED"] = "vendor_ordered";
|
|
23
|
+
OrderStatusCode["STOCK_RECEIVED"] = "stock_received";
|
|
24
|
+
OrderStatusCode["PACKED"] = "packed";
|
|
25
|
+
OrderStatusCode["SHIPPED"] = "shipped";
|
|
26
|
+
OrderStatusCode["OUT_FOR_DELIVERY"] = "out_for_delivery";
|
|
27
|
+
OrderStatusCode["DELIVERED"] = "delivered";
|
|
28
|
+
OrderStatusCode["COMPLETED"] = "completed";
|
|
29
|
+
OrderStatusCode["CANCELLED"] = "cancelled";
|
|
30
|
+
OrderStatusCode["RETURN_REQUESTED"] = "return_requested";
|
|
31
|
+
OrderStatusCode["RETURN_APPROVED"] = "return_approved";
|
|
32
|
+
OrderStatusCode["RETURNED"] = "returned";
|
|
33
|
+
OrderStatusCode["REFUNDED"] = "refunded";
|
|
34
|
+
OrderStatusCode["FAILED"] = "failed";
|
|
35
|
+
})(OrderStatusCode || (exports.OrderStatusCode = OrderStatusCode = {}));
|
|
36
|
+
let OrderStatus = class OrderStatus extends sequelize_typescript_1.Model {
|
|
37
|
+
};
|
|
38
|
+
exports.OrderStatus = OrderStatus;
|
|
39
|
+
__decorate([
|
|
40
|
+
(0, sequelize_typescript_1.Column)({ allowNull: false, unique: true }),
|
|
41
|
+
__metadata("design:type", String)
|
|
42
|
+
], OrderStatus.prototype, "code", void 0);
|
|
43
|
+
__decorate([
|
|
44
|
+
(0, sequelize_typescript_1.Column)({ allowNull: false }),
|
|
45
|
+
__metadata("design:type", String)
|
|
46
|
+
], OrderStatus.prototype, "labelEn", void 0);
|
|
47
|
+
__decorate([
|
|
48
|
+
(0, sequelize_typescript_1.Column)({ allowNull: false }),
|
|
49
|
+
__metadata("design:type", String)
|
|
50
|
+
], OrderStatus.prototype, "labelAr", void 0);
|
|
51
|
+
__decorate([
|
|
52
|
+
(0, sequelize_typescript_1.Column)({ type: sequelize_typescript_1.DataType.TEXT, allowNull: true }),
|
|
53
|
+
__metadata("design:type", String)
|
|
54
|
+
], OrderStatus.prototype, "descriptionEn", void 0);
|
|
55
|
+
__decorate([
|
|
56
|
+
(0, sequelize_typescript_1.Column)({ type: sequelize_typescript_1.DataType.TEXT, allowNull: true }),
|
|
57
|
+
__metadata("design:type", String)
|
|
58
|
+
], OrderStatus.prototype, "descriptionAr", void 0);
|
|
59
|
+
__decorate([
|
|
60
|
+
(0, sequelize_typescript_1.Column)({ allowNull: true }),
|
|
61
|
+
__metadata("design:type", String)
|
|
62
|
+
], OrderStatus.prototype, "color", void 0);
|
|
63
|
+
__decorate([
|
|
64
|
+
(0, sequelize_typescript_1.Column)({ allowNull: true }),
|
|
65
|
+
__metadata("design:type", String)
|
|
66
|
+
], OrderStatus.prototype, "icon", void 0);
|
|
67
|
+
__decorate([
|
|
68
|
+
(0, sequelize_typescript_1.Column)({ type: sequelize_typescript_1.DataType.TEXT, allowNull: true }),
|
|
69
|
+
__metadata("design:type", String)
|
|
70
|
+
], OrderStatus.prototype, "nextStatuses", void 0);
|
|
71
|
+
__decorate([
|
|
72
|
+
(0, sequelize_typescript_1.Column)({ type: sequelize_typescript_1.DataType.TEXT, allowNull: true }),
|
|
73
|
+
__metadata("design:type", String)
|
|
74
|
+
], OrderStatus.prototype, "prevStatuses", void 0);
|
|
75
|
+
__decorate([
|
|
76
|
+
(0, sequelize_typescript_1.Column)({ allowNull: false, defaultValue: false }),
|
|
77
|
+
__metadata("design:type", Boolean)
|
|
78
|
+
], OrderStatus.prototype, "isTerminal", void 0);
|
|
79
|
+
__decorate([
|
|
80
|
+
(0, sequelize_typescript_1.Column)({ allowNull: false, defaultValue: true }),
|
|
81
|
+
__metadata("design:type", Boolean)
|
|
82
|
+
], OrderStatus.prototype, "isVisibleToUser", void 0);
|
|
83
|
+
__decorate([
|
|
84
|
+
(0, sequelize_typescript_1.Column)({ allowNull: false, defaultValue: 0 }),
|
|
85
|
+
__metadata("design:type", Number)
|
|
86
|
+
], OrderStatus.prototype, "sortOrder", void 0);
|
|
87
|
+
__decorate([
|
|
88
|
+
(0, sequelize_typescript_1.HasMany)(() => order_entity_1.Order, { foreignKey: 'statusId' }),
|
|
89
|
+
__metadata("design:type", Array)
|
|
90
|
+
], OrderStatus.prototype, "orders", void 0);
|
|
91
|
+
exports.OrderStatus = OrderStatus = __decorate([
|
|
92
|
+
sequelize_typescript_1.Table
|
|
93
|
+
], OrderStatus);
|
|
94
|
+
//# sourceMappingURL=order-status.entity.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"order-status.entity.js","sourceRoot":"","sources":["../../../../libs/tatayab-entities-library/src/entities/order-status.entity.ts"],"names":[],"mappings":";;;;;;;;;;;;AAAA,+DAE8B;AAC9B,iDAAuC;AAGvC,IAAY,eAmBX;AAnBD,WAAY,eAAe;IACzB,sDAAwC,CAAA;IACxC,gCAA6B,CAAA;IAC7B,4CAAmC,CAAA;IACnC,gEAA6C,CAAA;IAC7C,oDAAuC,CAAA;IACvC,oDAAuC,CAAA;IACvC,oDAAuC,CAAA;IACvC,oCAA+B,CAAA;IAC/B,sCAAgC,CAAA;IAChC,wDAAyC,CAAA;IACzC,0CAAkC,CAAA;IAClC,0CAAkC,CAAA;IAClC,0CAA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,EAAE,KAAK,EAAE,YAAY,EAAE,IAAI,EAAE,CAAC;;oDAChB;AAGzB;IADP,IAAA,6BAAM,EAAC,EAAE,SAAS,EAAE,KAAK,EAAE,YAAY,EAAE,CAAC,EAAE,CAAC;;8CACpB;AAKlB;IADP,IAAA,8BAAO,EAAC,GAAG,EAAE,CAAC,oBAAK,EAAE,EAAE,UAAU,EAAE,UAAU,EAAE,CAAC;;2CACzB;sBAxCb,WAAW;IADvB,4BAAK;GACO,WAAW,CAyCvB"}
|
|
@@ -0,0 +1,57 @@
|
|
|
1
|
+
import { Model } from 'sequelize-typescript';
|
|
2
|
+
import { User } from './user.entity';
|
|
3
|
+
import { Store } from './store.entity';
|
|
4
|
+
import { Country } from './country.entity';
|
|
5
|
+
import { OrderStatus } from './order-status.entity';
|
|
6
|
+
import { OrderItem } from './order-item.entity';
|
|
7
|
+
import { OrderStatusHistory } from './order-status-history.entity';
|
|
8
|
+
import { UserTransaction } from './user-transaction.entity';
|
|
9
|
+
export declare class Order extends Model {
|
|
10
|
+
orderNumber: string;
|
|
11
|
+
userId?: number;
|
|
12
|
+
guestToken?: string;
|
|
13
|
+
storeId: number;
|
|
14
|
+
statusId: number;
|
|
15
|
+
statusCode: string;
|
|
16
|
+
deliveryCountryId?: number;
|
|
17
|
+
deliveryFullName?: string;
|
|
18
|
+
deliveryPhoneExt?: string;
|
|
19
|
+
deliveryPhone?: string;
|
|
20
|
+
deliveryCity?: string;
|
|
21
|
+
deliveryBlock?: string;
|
|
22
|
+
deliveryStreet?: string;
|
|
23
|
+
deliveryBuilding?: string;
|
|
24
|
+
deliveryFloor?: string;
|
|
25
|
+
deliveryApartment?: string;
|
|
26
|
+
deliveryAdditionalInfo?: string;
|
|
27
|
+
deliveryLatitude?: number;
|
|
28
|
+
deliveryLongitude?: number;
|
|
29
|
+
subtotal: number;
|
|
30
|
+
shippingFee: number;
|
|
31
|
+
vatAmount: number;
|
|
32
|
+
discountAmount: number;
|
|
33
|
+
total: number;
|
|
34
|
+
currency: string;
|
|
35
|
+
currencySymbolEn?: string;
|
|
36
|
+
couponCode?: string;
|
|
37
|
+
couponId?: number;
|
|
38
|
+
paymentMethodSlug?: string;
|
|
39
|
+
paymentStatus?: string;
|
|
40
|
+
paymentReference?: string;
|
|
41
|
+
paidAt?: Date;
|
|
42
|
+
carrierName?: string;
|
|
43
|
+
trackingNumber?: string;
|
|
44
|
+
trackingUrl?: string;
|
|
45
|
+
estimatedDeliveryDate?: Date;
|
|
46
|
+
shippedAt?: Date;
|
|
47
|
+
deliveredAt?: Date;
|
|
48
|
+
customerNotes?: string;
|
|
49
|
+
internalNotes?: string;
|
|
50
|
+
user?: User;
|
|
51
|
+
store: Store;
|
|
52
|
+
status: OrderStatus;
|
|
53
|
+
deliveryCountry?: Country;
|
|
54
|
+
items: OrderItem[];
|
|
55
|
+
statusHistory: OrderStatusHistory[];
|
|
56
|
+
transactions: UserTransaction[];
|
|
57
|
+
}
|