tt-entities 0.0.14 → 0.0.16
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/src/entities/brand.entity.d.ts +12 -0
- package/dist/libs/tatayab-entities-library/src/entities/brand.entity.js +56 -0
- package/dist/libs/tatayab-entities-library/src/entities/brand.entity.js.map +1 -0
- package/dist/libs/tatayab-entities-library/src/entities/category.entity.d.ts +14 -0
- package/dist/libs/tatayab-entities-library/src/entities/category.entity.js +65 -0
- package/dist/libs/tatayab-entities-library/src/entities/category.entity.js.map +1 -0
- package/dist/libs/tatayab-entities-library/src/entities/inventory-stock.entity.d.ts +16 -0
- package/dist/libs/tatayab-entities-library/src/entities/inventory-stock.entity.js +66 -0
- package/dist/libs/tatayab-entities-library/src/entities/inventory-stock.entity.js.map +1 -0
- package/dist/libs/tatayab-entities-library/src/entities/inventory.entity.d.ts +15 -0
- package/dist/libs/tatayab-entities-library/src/entities/inventory.entity.js +63 -0
- package/dist/libs/tatayab-entities-library/src/entities/inventory.entity.js.map +1 -0
- package/dist/libs/tatayab-entities-library/src/entities/product-media.entity.d.ts +16 -0
- package/dist/libs/tatayab-entities-library/src/entities/product-media.entity.js +62 -0
- package/dist/libs/tatayab-entities-library/src/entities/product-media.entity.js.map +1 -0
- package/dist/libs/tatayab-entities-library/src/entities/product-store.entity.d.ts +8 -0
- package/dist/libs/tatayab-entities-library/src/entities/product-store.entity.js +44 -0
- package/dist/libs/tatayab-entities-library/src/entities/product-store.entity.js.map +1 -0
- package/dist/libs/tatayab-entities-library/src/entities/product-variant-option.entity.d.ts +5 -0
- package/dist/libs/tatayab-entities-library/src/entities/product-variant-option.entity.js +32 -0
- package/dist/libs/tatayab-entities-library/src/entities/product-variant-option.entity.js.map +1 -0
- package/dist/libs/tatayab-entities-library/src/entities/product-variant.entity.d.ts +15 -0
- package/dist/libs/tatayab-entities-library/src/entities/product-variant.entity.js +64 -0
- package/dist/libs/tatayab-entities-library/src/entities/product-variant.entity.js.map +1 -0
- package/dist/libs/tatayab-entities-library/src/entities/product.entity.d.ts +27 -0
- package/dist/libs/tatayab-entities-library/src/entities/product.entity.js +104 -0
- package/dist/libs/tatayab-entities-library/src/entities/product.entity.js.map +1 -0
- package/dist/libs/tatayab-entities-library/src/entities/purchase-order-item.entity.d.ts +25 -0
- package/dist/libs/tatayab-entities-library/src/entities/purchase-order-item.entity.js +88 -0
- package/dist/libs/tatayab-entities-library/src/entities/purchase-order-item.entity.js.map +1 -0
- package/dist/libs/tatayab-entities-library/src/entities/purchase-order.entity.d.ts +27 -0
- package/dist/libs/tatayab-entities-library/src/entities/purchase-order.entity.js +108 -0
- package/dist/libs/tatayab-entities-library/src/entities/purchase-order.entity.js.map +1 -0
- package/dist/libs/tatayab-entities-library/src/entities/stock-movement.entity.d.ts +23 -0
- package/dist/libs/tatayab-entities-library/src/entities/stock-movement.entity.js +92 -0
- package/dist/libs/tatayab-entities-library/src/entities/stock-movement.entity.js.map +1 -0
- package/dist/libs/tatayab-entities-library/src/entities/store-inventory.entity.d.ts +6 -0
- package/dist/libs/tatayab-entities-library/src/entities/store-inventory.entity.js +36 -0
- package/dist/libs/tatayab-entities-library/src/entities/store-inventory.entity.js.map +1 -0
- package/dist/libs/tatayab-entities-library/src/entities/store.entity.d.ts +21 -0
- package/dist/libs/tatayab-entities-library/src/entities/store.entity.js +86 -0
- package/dist/libs/tatayab-entities-library/src/entities/store.entity.js.map +1 -0
- package/dist/libs/tatayab-entities-library/src/entities/variant-option.entity.d.ts +11 -0
- package/dist/libs/tatayab-entities-library/src/entities/variant-option.entity.js +50 -0
- package/dist/libs/tatayab-entities-library/src/entities/variant-option.entity.js.map +1 -0
- package/dist/libs/tatayab-entities-library/src/entities/variant-type.entity.d.ts +7 -0
- package/dist/libs/tatayab-entities-library/src/entities/variant-type.entity.js +37 -0
- package/dist/libs/tatayab-entities-library/src/entities/variant-type.entity.js.map +1 -0
- package/dist/libs/tatayab-entities-library/src/entities/vendor-product.entity.d.ts +19 -0
- package/dist/libs/tatayab-entities-library/src/entities/vendor-product.entity.js +78 -0
- package/dist/libs/tatayab-entities-library/src/entities/vendor-product.entity.js.map +1 -0
- package/dist/libs/tatayab-entities-library/src/entities/vendor.entity.d.ts +19 -0
- package/dist/libs/tatayab-entities-library/src/entities/vendor.entity.js +82 -0
- package/dist/libs/tatayab-entities-library/src/entities/vendor.entity.js.map +1 -0
- package/dist/libs/tatayab-entities-library/src/index.d.ts +21 -0
- package/dist/libs/tatayab-entities-library/src/index.js +81 -1
- package/dist/libs/tatayab-entities-library/src/index.js.map +1 -1
- package/dist/libs/tatayab-entities-library/src/utils/enums/purchaseOrderStatus.d.ts +8 -0
- package/dist/libs/tatayab-entities-library/src/utils/enums/purchaseOrderStatus.js +13 -0
- package/dist/libs/tatayab-entities-library/src/utils/enums/purchaseOrderStatus.js.map +1 -0
- package/dist/libs/tatayab-entities-library/src/utils/enums/stockMovementType.d.ts +11 -0
- package/dist/libs/tatayab-entities-library/src/utils/enums/stockMovementType.js +16 -0
- package/dist/libs/tatayab-entities-library/src/utils/enums/stockMovementType.js.map +1 -0
- package/dist/src/main.js +1437 -1
- package/libs/tatayab-entities-library/src/entities/brand.entity.ts +32 -0
- package/libs/tatayab-entities-library/src/entities/category.entity.ts +47 -0
- package/libs/tatayab-entities-library/src/entities/inventory-stock.entity.ts +55 -0
- package/libs/tatayab-entities-library/src/entities/inventory.entity.ts +47 -0
- package/libs/tatayab-entities-library/src/entities/product-media.entity.ts +45 -0
- package/libs/tatayab-entities-library/src/entities/product-store.entity.ts +31 -0
- package/libs/tatayab-entities-library/src/entities/product-variant-option.entity.ts +19 -0
- package/libs/tatayab-entities-library/src/entities/product-variant.entity.ts +51 -0
- package/libs/tatayab-entities-library/src/entities/product.entity.ts +82 -0
- package/libs/tatayab-entities-library/src/entities/purchase-order-item.entity.ts +73 -0
- package/libs/tatayab-entities-library/src/entities/purchase-order.entity.ts +86 -0
- package/libs/tatayab-entities-library/src/entities/stock-movement.entity.ts +74 -0
- package/libs/tatayab-entities-library/src/entities/store-inventory.entity.ts +24 -0
- package/libs/tatayab-entities-library/src/entities/store.entity.ts +68 -0
- package/libs/tatayab-entities-library/src/entities/variant-option.entity.ts +35 -0
- package/libs/tatayab-entities-library/src/entities/variant-type.entity.ts +18 -0
- package/libs/tatayab-entities-library/src/entities/vendor-product.entity.ts +65 -0
- package/libs/tatayab-entities-library/src/entities/vendor.entity.ts +63 -0
- package/libs/tatayab-entities-library/src/index.ts +95 -2
- package/libs/tatayab-entities-library/src/utils/enums/purchaseOrderStatus.ts +8 -0
- package/libs/tatayab-entities-library/src/utils/enums/stockMovementType.ts +20 -0
- package/package.json +1 -1
package/dist/src/main.js
CHANGED
|
@@ -85,7 +85,7 @@ module.exports = require("@nestjs/config");
|
|
|
85
85
|
|
|
86
86
|
|
|
87
87
|
Object.defineProperty(exports, "__esModule", ({ value: true }));
|
|
88
|
-
exports.Gender = exports.Status = exports.Language = exports.VersionType = exports.ProductApp = exports.OsName = exports.UserDevice = exports.User = exports.SysUser = exports.SysRole = exports.Area = exports.Translation = exports.Country = exports.ApiKey = void 0;
|
|
88
|
+
exports.StockMovementType = exports.PurchaseOrderStatus = exports.Gender = exports.Status = exports.Language = exports.VersionType = exports.ProductApp = exports.OsName = exports.PurchaseOrderItemStatus = exports.PurchaseOrderItem = exports.PurchaseOrder = exports.VendorProduct = exports.Vendor = exports.StockMovement = exports.InventoryStock = exports.StoreInventory = exports.Inventory = exports.ProductStore = exports.Store = exports.ProductVariantOption = exports.ProductVariant = exports.MediaType = exports.ProductMedia = exports.Product = exports.VariantOption = exports.VariantType = exports.Brand = exports.Category = exports.UserDevice = exports.User = exports.SysUser = exports.SysRole = exports.Area = exports.Translation = exports.Country = exports.ApiKey = void 0;
|
|
89
89
|
exports.getDbModels = getDbModels;
|
|
90
90
|
const country_entity_1 = __webpack_require__(8);
|
|
91
91
|
const translation_entity_1 = __webpack_require__(10);
|
|
@@ -95,6 +95,24 @@ const sys_user_entity_1 = __webpack_require__(13);
|
|
|
95
95
|
const user_entity_1 = __webpack_require__(15);
|
|
96
96
|
const userDevice_entity_1 = __webpack_require__(18);
|
|
97
97
|
const apikey_entity_1 = __webpack_require__(20);
|
|
98
|
+
const category_entity_1 = __webpack_require__(23);
|
|
99
|
+
const brand_entity_1 = __webpack_require__(24);
|
|
100
|
+
const variant_type_entity_1 = __webpack_require__(25);
|
|
101
|
+
const variant_option_entity_1 = __webpack_require__(26);
|
|
102
|
+
const product_entity_1 = __webpack_require__(27);
|
|
103
|
+
const product_media_entity_1 = __webpack_require__(28);
|
|
104
|
+
const product_variant_entity_1 = __webpack_require__(29);
|
|
105
|
+
const product_variant_option_entity_1 = __webpack_require__(30);
|
|
106
|
+
const store_entity_1 = __webpack_require__(32);
|
|
107
|
+
const product_store_entity_1 = __webpack_require__(31);
|
|
108
|
+
const inventory_entity_1 = __webpack_require__(34);
|
|
109
|
+
const store_inventory_entity_1 = __webpack_require__(33);
|
|
110
|
+
const inventory_stock_entity_1 = __webpack_require__(35);
|
|
111
|
+
const stock_movement_entity_1 = __webpack_require__(36);
|
|
112
|
+
const vendor_entity_1 = __webpack_require__(38);
|
|
113
|
+
const vendor_product_entity_1 = __webpack_require__(39);
|
|
114
|
+
const purchase_order_entity_1 = __webpack_require__(40);
|
|
115
|
+
const purchase_order_item_entity_1 = __webpack_require__(41);
|
|
98
116
|
var apikey_entity_2 = __webpack_require__(20);
|
|
99
117
|
Object.defineProperty(exports, "ApiKey", ({ enumerable: true, get: function () { return apikey_entity_2.ApiKey; } }));
|
|
100
118
|
var country_entity_2 = __webpack_require__(8);
|
|
@@ -111,6 +129,44 @@ var user_entity_2 = __webpack_require__(15);
|
|
|
111
129
|
Object.defineProperty(exports, "User", ({ enumerable: true, get: function () { return user_entity_2.User; } }));
|
|
112
130
|
var userDevice_entity_2 = __webpack_require__(18);
|
|
113
131
|
Object.defineProperty(exports, "UserDevice", ({ enumerable: true, get: function () { return userDevice_entity_2.UserDevice; } }));
|
|
132
|
+
var category_entity_2 = __webpack_require__(23);
|
|
133
|
+
Object.defineProperty(exports, "Category", ({ enumerable: true, get: function () { return category_entity_2.Category; } }));
|
|
134
|
+
var brand_entity_2 = __webpack_require__(24);
|
|
135
|
+
Object.defineProperty(exports, "Brand", ({ enumerable: true, get: function () { return brand_entity_2.Brand; } }));
|
|
136
|
+
var variant_type_entity_2 = __webpack_require__(25);
|
|
137
|
+
Object.defineProperty(exports, "VariantType", ({ enumerable: true, get: function () { return variant_type_entity_2.VariantType; } }));
|
|
138
|
+
var variant_option_entity_2 = __webpack_require__(26);
|
|
139
|
+
Object.defineProperty(exports, "VariantOption", ({ enumerable: true, get: function () { return variant_option_entity_2.VariantOption; } }));
|
|
140
|
+
var product_entity_2 = __webpack_require__(27);
|
|
141
|
+
Object.defineProperty(exports, "Product", ({ enumerable: true, get: function () { return product_entity_2.Product; } }));
|
|
142
|
+
var product_media_entity_2 = __webpack_require__(28);
|
|
143
|
+
Object.defineProperty(exports, "ProductMedia", ({ enumerable: true, get: function () { return product_media_entity_2.ProductMedia; } }));
|
|
144
|
+
Object.defineProperty(exports, "MediaType", ({ enumerable: true, get: function () { return product_media_entity_2.MediaType; } }));
|
|
145
|
+
var product_variant_entity_2 = __webpack_require__(29);
|
|
146
|
+
Object.defineProperty(exports, "ProductVariant", ({ enumerable: true, get: function () { return product_variant_entity_2.ProductVariant; } }));
|
|
147
|
+
var product_variant_option_entity_2 = __webpack_require__(30);
|
|
148
|
+
Object.defineProperty(exports, "ProductVariantOption", ({ enumerable: true, get: function () { return product_variant_option_entity_2.ProductVariantOption; } }));
|
|
149
|
+
var store_entity_2 = __webpack_require__(32);
|
|
150
|
+
Object.defineProperty(exports, "Store", ({ enumerable: true, get: function () { return store_entity_2.Store; } }));
|
|
151
|
+
var product_store_entity_2 = __webpack_require__(31);
|
|
152
|
+
Object.defineProperty(exports, "ProductStore", ({ enumerable: true, get: function () { return product_store_entity_2.ProductStore; } }));
|
|
153
|
+
var inventory_entity_2 = __webpack_require__(34);
|
|
154
|
+
Object.defineProperty(exports, "Inventory", ({ enumerable: true, get: function () { return inventory_entity_2.Inventory; } }));
|
|
155
|
+
var store_inventory_entity_2 = __webpack_require__(33);
|
|
156
|
+
Object.defineProperty(exports, "StoreInventory", ({ enumerable: true, get: function () { return store_inventory_entity_2.StoreInventory; } }));
|
|
157
|
+
var inventory_stock_entity_2 = __webpack_require__(35);
|
|
158
|
+
Object.defineProperty(exports, "InventoryStock", ({ enumerable: true, get: function () { return inventory_stock_entity_2.InventoryStock; } }));
|
|
159
|
+
var stock_movement_entity_2 = __webpack_require__(36);
|
|
160
|
+
Object.defineProperty(exports, "StockMovement", ({ enumerable: true, get: function () { return stock_movement_entity_2.StockMovement; } }));
|
|
161
|
+
var vendor_entity_2 = __webpack_require__(38);
|
|
162
|
+
Object.defineProperty(exports, "Vendor", ({ enumerable: true, get: function () { return vendor_entity_2.Vendor; } }));
|
|
163
|
+
var vendor_product_entity_2 = __webpack_require__(39);
|
|
164
|
+
Object.defineProperty(exports, "VendorProduct", ({ enumerable: true, get: function () { return vendor_product_entity_2.VendorProduct; } }));
|
|
165
|
+
var purchase_order_entity_2 = __webpack_require__(40);
|
|
166
|
+
Object.defineProperty(exports, "PurchaseOrder", ({ enumerable: true, get: function () { return purchase_order_entity_2.PurchaseOrder; } }));
|
|
167
|
+
var purchase_order_item_entity_2 = __webpack_require__(41);
|
|
168
|
+
Object.defineProperty(exports, "PurchaseOrderItem", ({ enumerable: true, get: function () { return purchase_order_item_entity_2.PurchaseOrderItem; } }));
|
|
169
|
+
Object.defineProperty(exports, "PurchaseOrderItemStatus", ({ enumerable: true, get: function () { return purchase_order_item_entity_2.PurchaseOrderItemStatus; } }));
|
|
114
170
|
var osName_1 = __webpack_require__(19);
|
|
115
171
|
Object.defineProperty(exports, "OsName", ({ enumerable: true, get: function () { return osName_1.OsName; } }));
|
|
116
172
|
var productApp_1 = __webpack_require__(22);
|
|
@@ -123,6 +179,10 @@ var status_1 = __webpack_require__(14);
|
|
|
123
179
|
Object.defineProperty(exports, "Status", ({ enumerable: true, get: function () { return status_1.Status; } }));
|
|
124
180
|
var gender_1 = __webpack_require__(17);
|
|
125
181
|
Object.defineProperty(exports, "Gender", ({ enumerable: true, get: function () { return gender_1.Gender; } }));
|
|
182
|
+
var purchaseOrderStatus_1 = __webpack_require__(42);
|
|
183
|
+
Object.defineProperty(exports, "PurchaseOrderStatus", ({ enumerable: true, get: function () { return purchaseOrderStatus_1.PurchaseOrderStatus; } }));
|
|
184
|
+
var stockMovementType_1 = __webpack_require__(37);
|
|
185
|
+
Object.defineProperty(exports, "StockMovementType", ({ enumerable: true, get: function () { return stockMovementType_1.StockMovementType; } }));
|
|
126
186
|
function getDbModels() {
|
|
127
187
|
return [
|
|
128
188
|
apikey_entity_1.ApiKey,
|
|
@@ -133,6 +193,24 @@ function getDbModels() {
|
|
|
133
193
|
translation_entity_1.Translation,
|
|
134
194
|
user_entity_1.User,
|
|
135
195
|
userDevice_entity_1.UserDevice,
|
|
196
|
+
category_entity_1.Category,
|
|
197
|
+
brand_entity_1.Brand,
|
|
198
|
+
variant_type_entity_1.VariantType,
|
|
199
|
+
variant_option_entity_1.VariantOption,
|
|
200
|
+
product_entity_1.Product,
|
|
201
|
+
product_media_entity_1.ProductMedia,
|
|
202
|
+
product_variant_entity_1.ProductVariant,
|
|
203
|
+
product_variant_option_entity_1.ProductVariantOption,
|
|
204
|
+
store_entity_1.Store,
|
|
205
|
+
product_store_entity_1.ProductStore,
|
|
206
|
+
inventory_entity_1.Inventory,
|
|
207
|
+
store_inventory_entity_1.StoreInventory,
|
|
208
|
+
inventory_stock_entity_1.InventoryStock,
|
|
209
|
+
stock_movement_entity_1.StockMovement,
|
|
210
|
+
vendor_entity_1.Vendor,
|
|
211
|
+
vendor_product_entity_1.VendorProduct,
|
|
212
|
+
purchase_order_entity_1.PurchaseOrder,
|
|
213
|
+
purchase_order_item_entity_1.PurchaseOrderItem,
|
|
136
214
|
];
|
|
137
215
|
}
|
|
138
216
|
|
|
@@ -719,6 +797,1364 @@ var ProductApp;
|
|
|
719
797
|
})(ProductApp || (exports.ProductApp = ProductApp = {}));
|
|
720
798
|
|
|
721
799
|
|
|
800
|
+
/***/ }),
|
|
801
|
+
/* 23 */
|
|
802
|
+
/***/ (function(__unused_webpack_module, exports, __webpack_require__) {
|
|
803
|
+
|
|
804
|
+
|
|
805
|
+
var __decorate = (this && this.__decorate) || function (decorators, target, key, desc) {
|
|
806
|
+
var c = arguments.length, r = c < 3 ? target : desc === null ? desc = Object.getOwnPropertyDescriptor(target, key) : desc, d;
|
|
807
|
+
if (typeof Reflect === "object" && typeof Reflect.decorate === "function") r = Reflect.decorate(decorators, target, key, desc);
|
|
808
|
+
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;
|
|
809
|
+
return c > 3 && r && Object.defineProperty(target, key, r), r;
|
|
810
|
+
};
|
|
811
|
+
var __metadata = (this && this.__metadata) || function (k, v) {
|
|
812
|
+
if (typeof Reflect === "object" && typeof Reflect.metadata === "function") return Reflect.metadata(k, v);
|
|
813
|
+
};
|
|
814
|
+
var _a;
|
|
815
|
+
Object.defineProperty(exports, "__esModule", ({ value: true }));
|
|
816
|
+
exports.Category = void 0;
|
|
817
|
+
const sequelize_typescript_1 = __webpack_require__(9);
|
|
818
|
+
const status_1 = __webpack_require__(14);
|
|
819
|
+
let Category = class Category extends sequelize_typescript_1.Model {
|
|
820
|
+
};
|
|
821
|
+
exports.Category = Category;
|
|
822
|
+
__decorate([
|
|
823
|
+
(0, sequelize_typescript_1.Column)({ allowNull: false }),
|
|
824
|
+
__metadata("design:type", String)
|
|
825
|
+
], Category.prototype, "nameEn", void 0);
|
|
826
|
+
__decorate([
|
|
827
|
+
(0, sequelize_typescript_1.Column)({ allowNull: false }),
|
|
828
|
+
__metadata("design:type", String)
|
|
829
|
+
], Category.prototype, "nameAr", void 0);
|
|
830
|
+
__decorate([
|
|
831
|
+
(0, sequelize_typescript_1.Column)({ type: sequelize_typescript_1.DataType.TEXT, allowNull: true }),
|
|
832
|
+
__metadata("design:type", String)
|
|
833
|
+
], Category.prototype, "descriptionEn", void 0);
|
|
834
|
+
__decorate([
|
|
835
|
+
(0, sequelize_typescript_1.Column)({ type: sequelize_typescript_1.DataType.TEXT, allowNull: true }),
|
|
836
|
+
__metadata("design:type", String)
|
|
837
|
+
], Category.prototype, "descriptionAr", void 0);
|
|
838
|
+
__decorate([
|
|
839
|
+
(0, sequelize_typescript_1.Column)({ allowNull: true }),
|
|
840
|
+
__metadata("design:type", String)
|
|
841
|
+
], Category.prototype, "image", void 0);
|
|
842
|
+
__decorate([
|
|
843
|
+
(0, sequelize_typescript_1.Column)({ defaultValue: 0 }),
|
|
844
|
+
__metadata("design:type", Number)
|
|
845
|
+
], Category.prototype, "sortOrder", void 0);
|
|
846
|
+
__decorate([
|
|
847
|
+
(0, sequelize_typescript_1.Column)({
|
|
848
|
+
type: sequelize_typescript_1.DataType.ENUM(...Object.values(status_1.Status)),
|
|
849
|
+
defaultValue: status_1.Status.ACTIVE,
|
|
850
|
+
}),
|
|
851
|
+
__metadata("design:type", typeof (_a = typeof status_1.Status !== "undefined" && status_1.Status) === "function" ? _a : Object)
|
|
852
|
+
], Category.prototype, "status", void 0);
|
|
853
|
+
__decorate([
|
|
854
|
+
(0, sequelize_typescript_1.ForeignKey)(() => Category),
|
|
855
|
+
(0, sequelize_typescript_1.Column)({ allowNull: true }),
|
|
856
|
+
__metadata("design:type", Number)
|
|
857
|
+
], Category.prototype, "parentId", void 0);
|
|
858
|
+
__decorate([
|
|
859
|
+
(0, sequelize_typescript_1.BelongsTo)(() => Category, { foreignKey: 'parentId', as: 'parent' }),
|
|
860
|
+
__metadata("design:type", Category)
|
|
861
|
+
], Category.prototype, "parent", void 0);
|
|
862
|
+
__decorate([
|
|
863
|
+
(0, sequelize_typescript_1.HasMany)(() => Category, { foreignKey: 'parentId', as: 'children' }),
|
|
864
|
+
__metadata("design:type", Array)
|
|
865
|
+
], Category.prototype, "children", void 0);
|
|
866
|
+
exports.Category = Category = __decorate([
|
|
867
|
+
sequelize_typescript_1.Table
|
|
868
|
+
], Category);
|
|
869
|
+
|
|
870
|
+
|
|
871
|
+
/***/ }),
|
|
872
|
+
/* 24 */
|
|
873
|
+
/***/ (function(__unused_webpack_module, exports, __webpack_require__) {
|
|
874
|
+
|
|
875
|
+
|
|
876
|
+
var __decorate = (this && this.__decorate) || function (decorators, target, key, desc) {
|
|
877
|
+
var c = arguments.length, r = c < 3 ? target : desc === null ? desc = Object.getOwnPropertyDescriptor(target, key) : desc, d;
|
|
878
|
+
if (typeof Reflect === "object" && typeof Reflect.decorate === "function") r = Reflect.decorate(decorators, target, key, desc);
|
|
879
|
+
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;
|
|
880
|
+
return c > 3 && r && Object.defineProperty(target, key, r), r;
|
|
881
|
+
};
|
|
882
|
+
var __metadata = (this && this.__metadata) || function (k, v) {
|
|
883
|
+
if (typeof Reflect === "object" && typeof Reflect.metadata === "function") return Reflect.metadata(k, v);
|
|
884
|
+
};
|
|
885
|
+
var _a;
|
|
886
|
+
Object.defineProperty(exports, "__esModule", ({ value: true }));
|
|
887
|
+
exports.Brand = void 0;
|
|
888
|
+
const sequelize_typescript_1 = __webpack_require__(9);
|
|
889
|
+
const status_1 = __webpack_require__(14);
|
|
890
|
+
let Brand = class Brand extends sequelize_typescript_1.Model {
|
|
891
|
+
};
|
|
892
|
+
exports.Brand = Brand;
|
|
893
|
+
__decorate([
|
|
894
|
+
(0, sequelize_typescript_1.Column)({ allowNull: false }),
|
|
895
|
+
__metadata("design:type", String)
|
|
896
|
+
], Brand.prototype, "nameEn", void 0);
|
|
897
|
+
__decorate([
|
|
898
|
+
(0, sequelize_typescript_1.Column)({ allowNull: false }),
|
|
899
|
+
__metadata("design:type", String)
|
|
900
|
+
], Brand.prototype, "nameAr", void 0);
|
|
901
|
+
__decorate([
|
|
902
|
+
(0, sequelize_typescript_1.Column)({ type: sequelize_typescript_1.DataType.TEXT, allowNull: true }),
|
|
903
|
+
__metadata("design:type", String)
|
|
904
|
+
], Brand.prototype, "descriptionEn", void 0);
|
|
905
|
+
__decorate([
|
|
906
|
+
(0, sequelize_typescript_1.Column)({ type: sequelize_typescript_1.DataType.TEXT, allowNull: true }),
|
|
907
|
+
__metadata("design:type", String)
|
|
908
|
+
], Brand.prototype, "descriptionAr", void 0);
|
|
909
|
+
__decorate([
|
|
910
|
+
(0, sequelize_typescript_1.Column)({ allowNull: true }),
|
|
911
|
+
__metadata("design:type", String)
|
|
912
|
+
], Brand.prototype, "logo", void 0);
|
|
913
|
+
__decorate([
|
|
914
|
+
(0, sequelize_typescript_1.Column)({ allowNull: true }),
|
|
915
|
+
__metadata("design:type", String)
|
|
916
|
+
], Brand.prototype, "website", void 0);
|
|
917
|
+
__decorate([
|
|
918
|
+
(0, sequelize_typescript_1.Column)({ defaultValue: 0 }),
|
|
919
|
+
__metadata("design:type", Number)
|
|
920
|
+
], Brand.prototype, "sortOrder", void 0);
|
|
921
|
+
__decorate([
|
|
922
|
+
(0, sequelize_typescript_1.Column)({
|
|
923
|
+
type: sequelize_typescript_1.DataType.ENUM(...Object.values(status_1.Status)),
|
|
924
|
+
defaultValue: status_1.Status.ACTIVE,
|
|
925
|
+
}),
|
|
926
|
+
__metadata("design:type", typeof (_a = typeof status_1.Status !== "undefined" && status_1.Status) === "function" ? _a : Object)
|
|
927
|
+
], Brand.prototype, "status", void 0);
|
|
928
|
+
exports.Brand = Brand = __decorate([
|
|
929
|
+
sequelize_typescript_1.Table
|
|
930
|
+
], Brand);
|
|
931
|
+
|
|
932
|
+
|
|
933
|
+
/***/ }),
|
|
934
|
+
/* 25 */
|
|
935
|
+
/***/ (function(__unused_webpack_module, exports, __webpack_require__) {
|
|
936
|
+
|
|
937
|
+
|
|
938
|
+
var __decorate = (this && this.__decorate) || function (decorators, target, key, desc) {
|
|
939
|
+
var c = arguments.length, r = c < 3 ? target : desc === null ? desc = Object.getOwnPropertyDescriptor(target, key) : desc, d;
|
|
940
|
+
if (typeof Reflect === "object" && typeof Reflect.decorate === "function") r = Reflect.decorate(decorators, target, key, desc);
|
|
941
|
+
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;
|
|
942
|
+
return c > 3 && r && Object.defineProperty(target, key, r), r;
|
|
943
|
+
};
|
|
944
|
+
var __metadata = (this && this.__metadata) || function (k, v) {
|
|
945
|
+
if (typeof Reflect === "object" && typeof Reflect.metadata === "function") return Reflect.metadata(k, v);
|
|
946
|
+
};
|
|
947
|
+
var _a;
|
|
948
|
+
Object.defineProperty(exports, "__esModule", ({ value: true }));
|
|
949
|
+
exports.VariantType = void 0;
|
|
950
|
+
const sequelize_typescript_1 = __webpack_require__(9);
|
|
951
|
+
const status_1 = __webpack_require__(14);
|
|
952
|
+
const sequelize_typescript_2 = __webpack_require__(9);
|
|
953
|
+
let VariantType = class VariantType extends sequelize_typescript_1.Model {
|
|
954
|
+
};
|
|
955
|
+
exports.VariantType = VariantType;
|
|
956
|
+
__decorate([
|
|
957
|
+
(0, sequelize_typescript_1.Column)({ allowNull: false }),
|
|
958
|
+
__metadata("design:type", String)
|
|
959
|
+
], VariantType.prototype, "nameEn", void 0);
|
|
960
|
+
__decorate([
|
|
961
|
+
(0, sequelize_typescript_1.Column)({ allowNull: false }),
|
|
962
|
+
__metadata("design:type", String)
|
|
963
|
+
], VariantType.prototype, "nameAr", void 0);
|
|
964
|
+
__decorate([
|
|
965
|
+
(0, sequelize_typescript_1.Column)({
|
|
966
|
+
type: sequelize_typescript_2.DataType.ENUM(...Object.values(status_1.Status)),
|
|
967
|
+
defaultValue: status_1.Status.ACTIVE,
|
|
968
|
+
}),
|
|
969
|
+
__metadata("design:type", typeof (_a = typeof status_1.Status !== "undefined" && status_1.Status) === "function" ? _a : Object)
|
|
970
|
+
], VariantType.prototype, "status", void 0);
|
|
971
|
+
exports.VariantType = VariantType = __decorate([
|
|
972
|
+
sequelize_typescript_1.Table
|
|
973
|
+
], VariantType);
|
|
974
|
+
|
|
975
|
+
|
|
976
|
+
/***/ }),
|
|
977
|
+
/* 26 */
|
|
978
|
+
/***/ (function(__unused_webpack_module, exports, __webpack_require__) {
|
|
979
|
+
|
|
980
|
+
|
|
981
|
+
var __decorate = (this && this.__decorate) || function (decorators, target, key, desc) {
|
|
982
|
+
var c = arguments.length, r = c < 3 ? target : desc === null ? desc = Object.getOwnPropertyDescriptor(target, key) : desc, d;
|
|
983
|
+
if (typeof Reflect === "object" && typeof Reflect.decorate === "function") r = Reflect.decorate(decorators, target, key, desc);
|
|
984
|
+
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;
|
|
985
|
+
return c > 3 && r && Object.defineProperty(target, key, r), r;
|
|
986
|
+
};
|
|
987
|
+
var __metadata = (this && this.__metadata) || function (k, v) {
|
|
988
|
+
if (typeof Reflect === "object" && typeof Reflect.metadata === "function") return Reflect.metadata(k, v);
|
|
989
|
+
};
|
|
990
|
+
var _a, _b;
|
|
991
|
+
Object.defineProperty(exports, "__esModule", ({ value: true }));
|
|
992
|
+
exports.VariantOption = void 0;
|
|
993
|
+
const sequelize_typescript_1 = __webpack_require__(9);
|
|
994
|
+
const variant_type_entity_1 = __webpack_require__(25);
|
|
995
|
+
const status_1 = __webpack_require__(14);
|
|
996
|
+
let VariantOption = class VariantOption extends sequelize_typescript_1.Model {
|
|
997
|
+
};
|
|
998
|
+
exports.VariantOption = VariantOption;
|
|
999
|
+
__decorate([
|
|
1000
|
+
(0, sequelize_typescript_1.ForeignKey)(() => variant_type_entity_1.VariantType),
|
|
1001
|
+
(0, sequelize_typescript_1.Column)({ allowNull: false }),
|
|
1002
|
+
__metadata("design:type", Number)
|
|
1003
|
+
], VariantOption.prototype, "variantTypeId", void 0);
|
|
1004
|
+
__decorate([
|
|
1005
|
+
(0, sequelize_typescript_1.Column)({ allowNull: false }),
|
|
1006
|
+
__metadata("design:type", String)
|
|
1007
|
+
], VariantOption.prototype, "nameEn", void 0);
|
|
1008
|
+
__decorate([
|
|
1009
|
+
(0, sequelize_typescript_1.Column)({ allowNull: false }),
|
|
1010
|
+
__metadata("design:type", String)
|
|
1011
|
+
], VariantOption.prototype, "nameAr", void 0);
|
|
1012
|
+
__decorate([
|
|
1013
|
+
(0, sequelize_typescript_1.Column)({ defaultValue: 0 }),
|
|
1014
|
+
__metadata("design:type", Number)
|
|
1015
|
+
], VariantOption.prototype, "sortOrder", void 0);
|
|
1016
|
+
__decorate([
|
|
1017
|
+
(0, sequelize_typescript_1.Column)({
|
|
1018
|
+
type: sequelize_typescript_1.DataType.ENUM(...Object.values(status_1.Status)),
|
|
1019
|
+
defaultValue: status_1.Status.ACTIVE,
|
|
1020
|
+
}),
|
|
1021
|
+
__metadata("design:type", typeof (_a = typeof status_1.Status !== "undefined" && status_1.Status) === "function" ? _a : Object)
|
|
1022
|
+
], VariantOption.prototype, "status", void 0);
|
|
1023
|
+
__decorate([
|
|
1024
|
+
(0, sequelize_typescript_1.BelongsTo)(() => variant_type_entity_1.VariantType),
|
|
1025
|
+
__metadata("design:type", typeof (_b = typeof variant_type_entity_1.VariantType !== "undefined" && variant_type_entity_1.VariantType) === "function" ? _b : Object)
|
|
1026
|
+
], VariantOption.prototype, "variantType", void 0);
|
|
1027
|
+
exports.VariantOption = VariantOption = __decorate([
|
|
1028
|
+
sequelize_typescript_1.Table
|
|
1029
|
+
], VariantOption);
|
|
1030
|
+
|
|
1031
|
+
|
|
1032
|
+
/***/ }),
|
|
1033
|
+
/* 27 */
|
|
1034
|
+
/***/ (function(__unused_webpack_module, exports, __webpack_require__) {
|
|
1035
|
+
|
|
1036
|
+
|
|
1037
|
+
var __decorate = (this && this.__decorate) || function (decorators, target, key, desc) {
|
|
1038
|
+
var c = arguments.length, r = c < 3 ? target : desc === null ? desc = Object.getOwnPropertyDescriptor(target, key) : desc, d;
|
|
1039
|
+
if (typeof Reflect === "object" && typeof Reflect.decorate === "function") r = Reflect.decorate(decorators, target, key, desc);
|
|
1040
|
+
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;
|
|
1041
|
+
return c > 3 && r && Object.defineProperty(target, key, r), r;
|
|
1042
|
+
};
|
|
1043
|
+
var __metadata = (this && this.__metadata) || function (k, v) {
|
|
1044
|
+
if (typeof Reflect === "object" && typeof Reflect.metadata === "function") return Reflect.metadata(k, v);
|
|
1045
|
+
};
|
|
1046
|
+
var _a, _b, _c;
|
|
1047
|
+
Object.defineProperty(exports, "__esModule", ({ value: true }));
|
|
1048
|
+
exports.Product = void 0;
|
|
1049
|
+
const sequelize_typescript_1 = __webpack_require__(9);
|
|
1050
|
+
const brand_entity_1 = __webpack_require__(24);
|
|
1051
|
+
const category_entity_1 = __webpack_require__(23);
|
|
1052
|
+
const product_media_entity_1 = __webpack_require__(28);
|
|
1053
|
+
const product_variant_entity_1 = __webpack_require__(29);
|
|
1054
|
+
const product_store_entity_1 = __webpack_require__(31);
|
|
1055
|
+
const store_entity_1 = __webpack_require__(32);
|
|
1056
|
+
const status_1 = __webpack_require__(14);
|
|
1057
|
+
let Product = class Product extends sequelize_typescript_1.Model {
|
|
1058
|
+
};
|
|
1059
|
+
exports.Product = Product;
|
|
1060
|
+
__decorate([
|
|
1061
|
+
(0, sequelize_typescript_1.Column)({ allowNull: false }),
|
|
1062
|
+
__metadata("design:type", String)
|
|
1063
|
+
], Product.prototype, "nameEn", void 0);
|
|
1064
|
+
__decorate([
|
|
1065
|
+
(0, sequelize_typescript_1.Column)({ allowNull: false }),
|
|
1066
|
+
__metadata("design:type", String)
|
|
1067
|
+
], Product.prototype, "nameAr", void 0);
|
|
1068
|
+
__decorate([
|
|
1069
|
+
(0, sequelize_typescript_1.Column)({ type: sequelize_typescript_1.DataType.TEXT, allowNull: true }),
|
|
1070
|
+
__metadata("design:type", String)
|
|
1071
|
+
], Product.prototype, "descriptionEn", void 0);
|
|
1072
|
+
__decorate([
|
|
1073
|
+
(0, sequelize_typescript_1.Column)({ type: sequelize_typescript_1.DataType.TEXT, allowNull: true }),
|
|
1074
|
+
__metadata("design:type", String)
|
|
1075
|
+
], Product.prototype, "descriptionAr", void 0);
|
|
1076
|
+
__decorate([
|
|
1077
|
+
(0, sequelize_typescript_1.Column)({ allowNull: true }),
|
|
1078
|
+
__metadata("design:type", String)
|
|
1079
|
+
], Product.prototype, "sku", void 0);
|
|
1080
|
+
__decorate([
|
|
1081
|
+
(0, sequelize_typescript_1.Column)({ allowNull: true }),
|
|
1082
|
+
__metadata("design:type", String)
|
|
1083
|
+
], Product.prototype, "barcode", void 0);
|
|
1084
|
+
__decorate([
|
|
1085
|
+
(0, sequelize_typescript_1.Column)({ type: sequelize_typescript_1.DataType.DECIMAL(10, 3), allowNull: false, defaultValue: 0 }),
|
|
1086
|
+
__metadata("design:type", Number)
|
|
1087
|
+
], Product.prototype, "defaultPrice", void 0);
|
|
1088
|
+
__decorate([
|
|
1089
|
+
(0, sequelize_typescript_1.ForeignKey)(() => brand_entity_1.Brand),
|
|
1090
|
+
(0, sequelize_typescript_1.Column)({ allowNull: true }),
|
|
1091
|
+
__metadata("design:type", Number)
|
|
1092
|
+
], Product.prototype, "brandId", void 0);
|
|
1093
|
+
__decorate([
|
|
1094
|
+
(0, sequelize_typescript_1.ForeignKey)(() => category_entity_1.Category),
|
|
1095
|
+
(0, sequelize_typescript_1.Column)({ allowNull: true }),
|
|
1096
|
+
__metadata("design:type", Number)
|
|
1097
|
+
], Product.prototype, "categoryId", void 0);
|
|
1098
|
+
__decorate([
|
|
1099
|
+
(0, sequelize_typescript_1.Column)({ defaultValue: 0 }),
|
|
1100
|
+
__metadata("design:type", Number)
|
|
1101
|
+
], Product.prototype, "sortOrder", void 0);
|
|
1102
|
+
__decorate([
|
|
1103
|
+
(0, sequelize_typescript_1.Column)({ defaultValue: false }),
|
|
1104
|
+
__metadata("design:type", Boolean)
|
|
1105
|
+
], Product.prototype, "isFeatured", void 0);
|
|
1106
|
+
__decorate([
|
|
1107
|
+
(0, sequelize_typescript_1.Column)({ defaultValue: false }),
|
|
1108
|
+
__metadata("design:type", Boolean)
|
|
1109
|
+
], Product.prototype, "hasVariants", void 0);
|
|
1110
|
+
__decorate([
|
|
1111
|
+
(0, sequelize_typescript_1.Column)({
|
|
1112
|
+
type: sequelize_typescript_1.DataType.ENUM(...Object.values(status_1.Status)),
|
|
1113
|
+
defaultValue: status_1.Status.ACTIVE,
|
|
1114
|
+
}),
|
|
1115
|
+
__metadata("design:type", typeof (_a = typeof status_1.Status !== "undefined" && status_1.Status) === "function" ? _a : Object)
|
|
1116
|
+
], Product.prototype, "status", void 0);
|
|
1117
|
+
__decorate([
|
|
1118
|
+
(0, sequelize_typescript_1.BelongsTo)(() => brand_entity_1.Brand),
|
|
1119
|
+
__metadata("design:type", typeof (_b = typeof brand_entity_1.Brand !== "undefined" && brand_entity_1.Brand) === "function" ? _b : Object)
|
|
1120
|
+
], Product.prototype, "brand", void 0);
|
|
1121
|
+
__decorate([
|
|
1122
|
+
(0, sequelize_typescript_1.BelongsTo)(() => category_entity_1.Category),
|
|
1123
|
+
__metadata("design:type", typeof (_c = typeof category_entity_1.Category !== "undefined" && category_entity_1.Category) === "function" ? _c : Object)
|
|
1124
|
+
], Product.prototype, "category", void 0);
|
|
1125
|
+
__decorate([
|
|
1126
|
+
(0, sequelize_typescript_1.HasMany)(() => product_media_entity_1.ProductMedia),
|
|
1127
|
+
__metadata("design:type", Array)
|
|
1128
|
+
], Product.prototype, "media", void 0);
|
|
1129
|
+
__decorate([
|
|
1130
|
+
(0, sequelize_typescript_1.HasMany)(() => product_variant_entity_1.ProductVariant),
|
|
1131
|
+
__metadata("design:type", Array)
|
|
1132
|
+
], Product.prototype, "variants", void 0);
|
|
1133
|
+
__decorate([
|
|
1134
|
+
(0, sequelize_typescript_1.BelongsToMany)(() => store_entity_1.Store, () => product_store_entity_1.ProductStore),
|
|
1135
|
+
__metadata("design:type", Array)
|
|
1136
|
+
], Product.prototype, "stores", void 0);
|
|
1137
|
+
exports.Product = Product = __decorate([
|
|
1138
|
+
sequelize_typescript_1.Table
|
|
1139
|
+
], Product);
|
|
1140
|
+
|
|
1141
|
+
|
|
1142
|
+
/***/ }),
|
|
1143
|
+
/* 28 */
|
|
1144
|
+
/***/ (function(__unused_webpack_module, exports, __webpack_require__) {
|
|
1145
|
+
|
|
1146
|
+
|
|
1147
|
+
var __decorate = (this && this.__decorate) || function (decorators, target, key, desc) {
|
|
1148
|
+
var c = arguments.length, r = c < 3 ? target : desc === null ? desc = Object.getOwnPropertyDescriptor(target, key) : desc, d;
|
|
1149
|
+
if (typeof Reflect === "object" && typeof Reflect.decorate === "function") r = Reflect.decorate(decorators, target, key, desc);
|
|
1150
|
+
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;
|
|
1151
|
+
return c > 3 && r && Object.defineProperty(target, key, r), r;
|
|
1152
|
+
};
|
|
1153
|
+
var __metadata = (this && this.__metadata) || function (k, v) {
|
|
1154
|
+
if (typeof Reflect === "object" && typeof Reflect.metadata === "function") return Reflect.metadata(k, v);
|
|
1155
|
+
};
|
|
1156
|
+
var _a;
|
|
1157
|
+
Object.defineProperty(exports, "__esModule", ({ value: true }));
|
|
1158
|
+
exports.ProductMedia = exports.MediaType = void 0;
|
|
1159
|
+
const sequelize_typescript_1 = __webpack_require__(9);
|
|
1160
|
+
const product_entity_1 = __webpack_require__(27);
|
|
1161
|
+
var MediaType;
|
|
1162
|
+
(function (MediaType) {
|
|
1163
|
+
MediaType["IMAGE"] = "image";
|
|
1164
|
+
MediaType["VIDEO"] = "video";
|
|
1165
|
+
})(MediaType || (exports.MediaType = MediaType = {}));
|
|
1166
|
+
let ProductMedia = class ProductMedia extends sequelize_typescript_1.Model {
|
|
1167
|
+
};
|
|
1168
|
+
exports.ProductMedia = ProductMedia;
|
|
1169
|
+
__decorate([
|
|
1170
|
+
(0, sequelize_typescript_1.ForeignKey)(() => product_entity_1.Product),
|
|
1171
|
+
(0, sequelize_typescript_1.Column)({ allowNull: false }),
|
|
1172
|
+
__metadata("design:type", Number)
|
|
1173
|
+
], ProductMedia.prototype, "productId", void 0);
|
|
1174
|
+
__decorate([
|
|
1175
|
+
(0, sequelize_typescript_1.Column)({ allowNull: false }),
|
|
1176
|
+
__metadata("design:type", String)
|
|
1177
|
+
], ProductMedia.prototype, "url", void 0);
|
|
1178
|
+
__decorate([
|
|
1179
|
+
(0, sequelize_typescript_1.Column)({
|
|
1180
|
+
type: sequelize_typescript_1.DataType.ENUM(...Object.values(MediaType)),
|
|
1181
|
+
defaultValue: MediaType.IMAGE,
|
|
1182
|
+
}),
|
|
1183
|
+
__metadata("design:type", String)
|
|
1184
|
+
], ProductMedia.prototype, "type", void 0);
|
|
1185
|
+
__decorate([
|
|
1186
|
+
(0, sequelize_typescript_1.Column)({ defaultValue: false }),
|
|
1187
|
+
__metadata("design:type", Boolean)
|
|
1188
|
+
], ProductMedia.prototype, "isDefault", void 0);
|
|
1189
|
+
__decorate([
|
|
1190
|
+
(0, sequelize_typescript_1.Column)({ defaultValue: 0 }),
|
|
1191
|
+
__metadata("design:type", Number)
|
|
1192
|
+
], ProductMedia.prototype, "sortOrder", void 0);
|
|
1193
|
+
__decorate([
|
|
1194
|
+
(0, sequelize_typescript_1.Column)({ allowNull: true }),
|
|
1195
|
+
__metadata("design:type", String)
|
|
1196
|
+
], ProductMedia.prototype, "altEn", void 0);
|
|
1197
|
+
__decorate([
|
|
1198
|
+
(0, sequelize_typescript_1.Column)({ allowNull: true }),
|
|
1199
|
+
__metadata("design:type", String)
|
|
1200
|
+
], ProductMedia.prototype, "altAr", void 0);
|
|
1201
|
+
__decorate([
|
|
1202
|
+
(0, sequelize_typescript_1.BelongsTo)(() => product_entity_1.Product),
|
|
1203
|
+
__metadata("design:type", typeof (_a = typeof product_entity_1.Product !== "undefined" && product_entity_1.Product) === "function" ? _a : Object)
|
|
1204
|
+
], ProductMedia.prototype, "product", void 0);
|
|
1205
|
+
exports.ProductMedia = ProductMedia = __decorate([
|
|
1206
|
+
sequelize_typescript_1.Table
|
|
1207
|
+
], ProductMedia);
|
|
1208
|
+
|
|
1209
|
+
|
|
1210
|
+
/***/ }),
|
|
1211
|
+
/* 29 */
|
|
1212
|
+
/***/ (function(__unused_webpack_module, exports, __webpack_require__) {
|
|
1213
|
+
|
|
1214
|
+
|
|
1215
|
+
var __decorate = (this && this.__decorate) || function (decorators, target, key, desc) {
|
|
1216
|
+
var c = arguments.length, r = c < 3 ? target : desc === null ? desc = Object.getOwnPropertyDescriptor(target, key) : desc, d;
|
|
1217
|
+
if (typeof Reflect === "object" && typeof Reflect.decorate === "function") r = Reflect.decorate(decorators, target, key, desc);
|
|
1218
|
+
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;
|
|
1219
|
+
return c > 3 && r && Object.defineProperty(target, key, r), r;
|
|
1220
|
+
};
|
|
1221
|
+
var __metadata = (this && this.__metadata) || function (k, v) {
|
|
1222
|
+
if (typeof Reflect === "object" && typeof Reflect.metadata === "function") return Reflect.metadata(k, v);
|
|
1223
|
+
};
|
|
1224
|
+
var _a, _b;
|
|
1225
|
+
Object.defineProperty(exports, "__esModule", ({ value: true }));
|
|
1226
|
+
exports.ProductVariant = void 0;
|
|
1227
|
+
const sequelize_typescript_1 = __webpack_require__(9);
|
|
1228
|
+
const product_entity_1 = __webpack_require__(27);
|
|
1229
|
+
const variant_option_entity_1 = __webpack_require__(26);
|
|
1230
|
+
const product_variant_option_entity_1 = __webpack_require__(30);
|
|
1231
|
+
const status_1 = __webpack_require__(14);
|
|
1232
|
+
let ProductVariant = class ProductVariant extends sequelize_typescript_1.Model {
|
|
1233
|
+
};
|
|
1234
|
+
exports.ProductVariant = ProductVariant;
|
|
1235
|
+
__decorate([
|
|
1236
|
+
(0, sequelize_typescript_1.ForeignKey)(() => product_entity_1.Product),
|
|
1237
|
+
(0, sequelize_typescript_1.Column)({ allowNull: false }),
|
|
1238
|
+
__metadata("design:type", Number)
|
|
1239
|
+
], ProductVariant.prototype, "productId", void 0);
|
|
1240
|
+
__decorate([
|
|
1241
|
+
(0, sequelize_typescript_1.Column)({ allowNull: true }),
|
|
1242
|
+
__metadata("design:type", String)
|
|
1243
|
+
], ProductVariant.prototype, "sku", void 0);
|
|
1244
|
+
__decorate([
|
|
1245
|
+
(0, sequelize_typescript_1.Column)({ allowNull: true }),
|
|
1246
|
+
__metadata("design:type", String)
|
|
1247
|
+
], ProductVariant.prototype, "barcode", void 0);
|
|
1248
|
+
__decorate([
|
|
1249
|
+
(0, sequelize_typescript_1.Column)({ type: sequelize_typescript_1.DataType.DECIMAL(10, 3), allowNull: true }),
|
|
1250
|
+
__metadata("design:type", Number)
|
|
1251
|
+
], ProductVariant.prototype, "priceOverride", void 0);
|
|
1252
|
+
__decorate([
|
|
1253
|
+
(0, sequelize_typescript_1.Column)({ allowNull: true }),
|
|
1254
|
+
__metadata("design:type", String)
|
|
1255
|
+
], ProductVariant.prototype, "image", void 0);
|
|
1256
|
+
__decorate([
|
|
1257
|
+
(0, sequelize_typescript_1.Column)({ defaultValue: 0 }),
|
|
1258
|
+
__metadata("design:type", Number)
|
|
1259
|
+
], ProductVariant.prototype, "sortOrder", void 0);
|
|
1260
|
+
__decorate([
|
|
1261
|
+
(0, sequelize_typescript_1.Column)({
|
|
1262
|
+
type: sequelize_typescript_1.DataType.ENUM(...Object.values(status_1.Status)),
|
|
1263
|
+
defaultValue: status_1.Status.ACTIVE,
|
|
1264
|
+
}),
|
|
1265
|
+
__metadata("design:type", typeof (_a = typeof status_1.Status !== "undefined" && status_1.Status) === "function" ? _a : Object)
|
|
1266
|
+
], ProductVariant.prototype, "status", void 0);
|
|
1267
|
+
__decorate([
|
|
1268
|
+
(0, sequelize_typescript_1.BelongsTo)(() => product_entity_1.Product),
|
|
1269
|
+
__metadata("design:type", typeof (_b = typeof product_entity_1.Product !== "undefined" && product_entity_1.Product) === "function" ? _b : Object)
|
|
1270
|
+
], ProductVariant.prototype, "product", void 0);
|
|
1271
|
+
__decorate([
|
|
1272
|
+
(0, sequelize_typescript_1.BelongsToMany)(() => variant_option_entity_1.VariantOption, () => product_variant_option_entity_1.ProductVariantOption),
|
|
1273
|
+
__metadata("design:type", Array)
|
|
1274
|
+
], ProductVariant.prototype, "options", void 0);
|
|
1275
|
+
exports.ProductVariant = ProductVariant = __decorate([
|
|
1276
|
+
sequelize_typescript_1.Table
|
|
1277
|
+
], ProductVariant);
|
|
1278
|
+
|
|
1279
|
+
|
|
1280
|
+
/***/ }),
|
|
1281
|
+
/* 30 */
|
|
1282
|
+
/***/ (function(__unused_webpack_module, exports, __webpack_require__) {
|
|
1283
|
+
|
|
1284
|
+
|
|
1285
|
+
var __decorate = (this && this.__decorate) || function (decorators, target, key, desc) {
|
|
1286
|
+
var c = arguments.length, r = c < 3 ? target : desc === null ? desc = Object.getOwnPropertyDescriptor(target, key) : desc, d;
|
|
1287
|
+
if (typeof Reflect === "object" && typeof Reflect.decorate === "function") r = Reflect.decorate(decorators, target, key, desc);
|
|
1288
|
+
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;
|
|
1289
|
+
return c > 3 && r && Object.defineProperty(target, key, r), r;
|
|
1290
|
+
};
|
|
1291
|
+
var __metadata = (this && this.__metadata) || function (k, v) {
|
|
1292
|
+
if (typeof Reflect === "object" && typeof Reflect.metadata === "function") return Reflect.metadata(k, v);
|
|
1293
|
+
};
|
|
1294
|
+
Object.defineProperty(exports, "__esModule", ({ value: true }));
|
|
1295
|
+
exports.ProductVariantOption = void 0;
|
|
1296
|
+
const sequelize_typescript_1 = __webpack_require__(9);
|
|
1297
|
+
const product_variant_entity_1 = __webpack_require__(29);
|
|
1298
|
+
const variant_option_entity_1 = __webpack_require__(26);
|
|
1299
|
+
let ProductVariantOption = class ProductVariantOption extends sequelize_typescript_1.Model {
|
|
1300
|
+
};
|
|
1301
|
+
exports.ProductVariantOption = ProductVariantOption;
|
|
1302
|
+
__decorate([
|
|
1303
|
+
(0, sequelize_typescript_1.ForeignKey)(() => product_variant_entity_1.ProductVariant),
|
|
1304
|
+
(0, sequelize_typescript_1.Column)({ allowNull: false }),
|
|
1305
|
+
__metadata("design:type", Number)
|
|
1306
|
+
], ProductVariantOption.prototype, "productVariantId", void 0);
|
|
1307
|
+
__decorate([
|
|
1308
|
+
(0, sequelize_typescript_1.ForeignKey)(() => variant_option_entity_1.VariantOption),
|
|
1309
|
+
(0, sequelize_typescript_1.Column)({ allowNull: false }),
|
|
1310
|
+
__metadata("design:type", Number)
|
|
1311
|
+
], ProductVariantOption.prototype, "variantOptionId", void 0);
|
|
1312
|
+
exports.ProductVariantOption = ProductVariantOption = __decorate([
|
|
1313
|
+
sequelize_typescript_1.Table
|
|
1314
|
+
], ProductVariantOption);
|
|
1315
|
+
|
|
1316
|
+
|
|
1317
|
+
/***/ }),
|
|
1318
|
+
/* 31 */
|
|
1319
|
+
/***/ (function(__unused_webpack_module, exports, __webpack_require__) {
|
|
1320
|
+
|
|
1321
|
+
|
|
1322
|
+
var __decorate = (this && this.__decorate) || function (decorators, target, key, desc) {
|
|
1323
|
+
var c = arguments.length, r = c < 3 ? target : desc === null ? desc = Object.getOwnPropertyDescriptor(target, key) : desc, d;
|
|
1324
|
+
if (typeof Reflect === "object" && typeof Reflect.decorate === "function") r = Reflect.decorate(decorators, target, key, desc);
|
|
1325
|
+
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;
|
|
1326
|
+
return c > 3 && r && Object.defineProperty(target, key, r), r;
|
|
1327
|
+
};
|
|
1328
|
+
var __metadata = (this && this.__metadata) || function (k, v) {
|
|
1329
|
+
if (typeof Reflect === "object" && typeof Reflect.metadata === "function") return Reflect.metadata(k, v);
|
|
1330
|
+
};
|
|
1331
|
+
var _a;
|
|
1332
|
+
Object.defineProperty(exports, "__esModule", ({ value: true }));
|
|
1333
|
+
exports.ProductStore = void 0;
|
|
1334
|
+
const sequelize_typescript_1 = __webpack_require__(9);
|
|
1335
|
+
const product_entity_1 = __webpack_require__(27);
|
|
1336
|
+
const store_entity_1 = __webpack_require__(32);
|
|
1337
|
+
const status_1 = __webpack_require__(14);
|
|
1338
|
+
let ProductStore = class ProductStore extends sequelize_typescript_1.Model {
|
|
1339
|
+
};
|
|
1340
|
+
exports.ProductStore = ProductStore;
|
|
1341
|
+
__decorate([
|
|
1342
|
+
(0, sequelize_typescript_1.ForeignKey)(() => product_entity_1.Product),
|
|
1343
|
+
(0, sequelize_typescript_1.Column)({ allowNull: false }),
|
|
1344
|
+
__metadata("design:type", Number)
|
|
1345
|
+
], ProductStore.prototype, "productId", void 0);
|
|
1346
|
+
__decorate([
|
|
1347
|
+
(0, sequelize_typescript_1.ForeignKey)(() => store_entity_1.Store),
|
|
1348
|
+
(0, sequelize_typescript_1.Column)({ allowNull: false }),
|
|
1349
|
+
__metadata("design:type", Number)
|
|
1350
|
+
], ProductStore.prototype, "storeId", void 0);
|
|
1351
|
+
__decorate([
|
|
1352
|
+
(0, sequelize_typescript_1.Column)({ type: sequelize_typescript_1.DataType.DECIMAL(10, 3), allowNull: true }),
|
|
1353
|
+
__metadata("design:type", Number)
|
|
1354
|
+
], ProductStore.prototype, "price", void 0);
|
|
1355
|
+
__decorate([
|
|
1356
|
+
(0, sequelize_typescript_1.Column)({
|
|
1357
|
+
type: sequelize_typescript_1.DataType.ENUM(...Object.values(status_1.Status)),
|
|
1358
|
+
defaultValue: status_1.Status.ACTIVE,
|
|
1359
|
+
}),
|
|
1360
|
+
__metadata("design:type", typeof (_a = typeof status_1.Status !== "undefined" && status_1.Status) === "function" ? _a : Object)
|
|
1361
|
+
], ProductStore.prototype, "status", void 0);
|
|
1362
|
+
exports.ProductStore = ProductStore = __decorate([
|
|
1363
|
+
sequelize_typescript_1.Table
|
|
1364
|
+
], ProductStore);
|
|
1365
|
+
|
|
1366
|
+
|
|
1367
|
+
/***/ }),
|
|
1368
|
+
/* 32 */
|
|
1369
|
+
/***/ (function(__unused_webpack_module, exports, __webpack_require__) {
|
|
1370
|
+
|
|
1371
|
+
|
|
1372
|
+
var __decorate = (this && this.__decorate) || function (decorators, target, key, desc) {
|
|
1373
|
+
var c = arguments.length, r = c < 3 ? target : desc === null ? desc = Object.getOwnPropertyDescriptor(target, key) : desc, d;
|
|
1374
|
+
if (typeof Reflect === "object" && typeof Reflect.decorate === "function") r = Reflect.decorate(decorators, target, key, desc);
|
|
1375
|
+
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;
|
|
1376
|
+
return c > 3 && r && Object.defineProperty(target, key, r), r;
|
|
1377
|
+
};
|
|
1378
|
+
var __metadata = (this && this.__metadata) || function (k, v) {
|
|
1379
|
+
if (typeof Reflect === "object" && typeof Reflect.metadata === "function") return Reflect.metadata(k, v);
|
|
1380
|
+
};
|
|
1381
|
+
var _a, _b;
|
|
1382
|
+
Object.defineProperty(exports, "__esModule", ({ value: true }));
|
|
1383
|
+
exports.Store = void 0;
|
|
1384
|
+
const sequelize_typescript_1 = __webpack_require__(9);
|
|
1385
|
+
const country_entity_1 = __webpack_require__(8);
|
|
1386
|
+
const product_store_entity_1 = __webpack_require__(31);
|
|
1387
|
+
const product_entity_1 = __webpack_require__(27);
|
|
1388
|
+
const store_inventory_entity_1 = __webpack_require__(33);
|
|
1389
|
+
const inventory_entity_1 = __webpack_require__(34);
|
|
1390
|
+
const status_1 = __webpack_require__(14);
|
|
1391
|
+
let Store = class Store extends sequelize_typescript_1.Model {
|
|
1392
|
+
};
|
|
1393
|
+
exports.Store = Store;
|
|
1394
|
+
__decorate([
|
|
1395
|
+
(0, sequelize_typescript_1.Column)({ allowNull: false }),
|
|
1396
|
+
__metadata("design:type", String)
|
|
1397
|
+
], Store.prototype, "nameEn", void 0);
|
|
1398
|
+
__decorate([
|
|
1399
|
+
(0, sequelize_typescript_1.Column)({ allowNull: false }),
|
|
1400
|
+
__metadata("design:type", String)
|
|
1401
|
+
], Store.prototype, "nameAr", void 0);
|
|
1402
|
+
__decorate([
|
|
1403
|
+
(0, sequelize_typescript_1.Column)({ type: sequelize_typescript_1.DataType.TEXT, allowNull: true }),
|
|
1404
|
+
__metadata("design:type", String)
|
|
1405
|
+
], Store.prototype, "descriptionEn", void 0);
|
|
1406
|
+
__decorate([
|
|
1407
|
+
(0, sequelize_typescript_1.Column)({ type: sequelize_typescript_1.DataType.TEXT, allowNull: true }),
|
|
1408
|
+
__metadata("design:type", String)
|
|
1409
|
+
], Store.prototype, "descriptionAr", void 0);
|
|
1410
|
+
__decorate([
|
|
1411
|
+
(0, sequelize_typescript_1.Column)({ allowNull: true }),
|
|
1412
|
+
__metadata("design:type", String)
|
|
1413
|
+
], Store.prototype, "logo", void 0);
|
|
1414
|
+
__decorate([
|
|
1415
|
+
(0, sequelize_typescript_1.Column)({ allowNull: false, defaultValue: 'USD' }),
|
|
1416
|
+
__metadata("design:type", String)
|
|
1417
|
+
], Store.prototype, "currency", void 0);
|
|
1418
|
+
__decorate([
|
|
1419
|
+
(0, sequelize_typescript_1.Column)({ allowNull: true }),
|
|
1420
|
+
__metadata("design:type", String)
|
|
1421
|
+
], Store.prototype, "currencySymbolEn", void 0);
|
|
1422
|
+
__decorate([
|
|
1423
|
+
(0, sequelize_typescript_1.Column)({ allowNull: true }),
|
|
1424
|
+
__metadata("design:type", String)
|
|
1425
|
+
], Store.prototype, "currencySymbolAr", void 0);
|
|
1426
|
+
__decorate([
|
|
1427
|
+
(0, sequelize_typescript_1.ForeignKey)(() => country_entity_1.Country),
|
|
1428
|
+
(0, sequelize_typescript_1.Column)({ allowNull: true }),
|
|
1429
|
+
__metadata("design:type", Number)
|
|
1430
|
+
], Store.prototype, "countryId", void 0);
|
|
1431
|
+
__decorate([
|
|
1432
|
+
(0, sequelize_typescript_1.Column)({ defaultValue: false }),
|
|
1433
|
+
__metadata("design:type", Boolean)
|
|
1434
|
+
], Store.prototype, "isGlobal", void 0);
|
|
1435
|
+
__decorate([
|
|
1436
|
+
(0, sequelize_typescript_1.Column)({
|
|
1437
|
+
type: sequelize_typescript_1.DataType.ENUM(...Object.values(status_1.Status)),
|
|
1438
|
+
defaultValue: status_1.Status.ACTIVE,
|
|
1439
|
+
}),
|
|
1440
|
+
__metadata("design:type", typeof (_a = typeof status_1.Status !== "undefined" && status_1.Status) === "function" ? _a : Object)
|
|
1441
|
+
], Store.prototype, "status", void 0);
|
|
1442
|
+
__decorate([
|
|
1443
|
+
(0, sequelize_typescript_1.BelongsTo)(() => country_entity_1.Country),
|
|
1444
|
+
__metadata("design:type", typeof (_b = typeof country_entity_1.Country !== "undefined" && country_entity_1.Country) === "function" ? _b : Object)
|
|
1445
|
+
], Store.prototype, "country", void 0);
|
|
1446
|
+
__decorate([
|
|
1447
|
+
(0, sequelize_typescript_1.BelongsToMany)(() => product_entity_1.Product, () => product_store_entity_1.ProductStore),
|
|
1448
|
+
__metadata("design:type", Array)
|
|
1449
|
+
], Store.prototype, "products", void 0);
|
|
1450
|
+
__decorate([
|
|
1451
|
+
(0, sequelize_typescript_1.BelongsToMany)(() => inventory_entity_1.Inventory, () => store_inventory_entity_1.StoreInventory),
|
|
1452
|
+
__metadata("design:type", Array)
|
|
1453
|
+
], Store.prototype, "inventories", void 0);
|
|
1454
|
+
exports.Store = Store = __decorate([
|
|
1455
|
+
sequelize_typescript_1.Table
|
|
1456
|
+
], Store);
|
|
1457
|
+
|
|
1458
|
+
|
|
1459
|
+
/***/ }),
|
|
1460
|
+
/* 33 */
|
|
1461
|
+
/***/ (function(__unused_webpack_module, exports, __webpack_require__) {
|
|
1462
|
+
|
|
1463
|
+
|
|
1464
|
+
var __decorate = (this && this.__decorate) || function (decorators, target, key, desc) {
|
|
1465
|
+
var c = arguments.length, r = c < 3 ? target : desc === null ? desc = Object.getOwnPropertyDescriptor(target, key) : desc, d;
|
|
1466
|
+
if (typeof Reflect === "object" && typeof Reflect.decorate === "function") r = Reflect.decorate(decorators, target, key, desc);
|
|
1467
|
+
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;
|
|
1468
|
+
return c > 3 && r && Object.defineProperty(target, key, r), r;
|
|
1469
|
+
};
|
|
1470
|
+
var __metadata = (this && this.__metadata) || function (k, v) {
|
|
1471
|
+
if (typeof Reflect === "object" && typeof Reflect.metadata === "function") return Reflect.metadata(k, v);
|
|
1472
|
+
};
|
|
1473
|
+
Object.defineProperty(exports, "__esModule", ({ value: true }));
|
|
1474
|
+
exports.StoreInventory = void 0;
|
|
1475
|
+
const sequelize_typescript_1 = __webpack_require__(9);
|
|
1476
|
+
const store_entity_1 = __webpack_require__(32);
|
|
1477
|
+
const inventory_entity_1 = __webpack_require__(34);
|
|
1478
|
+
let StoreInventory = class StoreInventory extends sequelize_typescript_1.Model {
|
|
1479
|
+
};
|
|
1480
|
+
exports.StoreInventory = StoreInventory;
|
|
1481
|
+
__decorate([
|
|
1482
|
+
(0, sequelize_typescript_1.ForeignKey)(() => store_entity_1.Store),
|
|
1483
|
+
(0, sequelize_typescript_1.Column)({ allowNull: false }),
|
|
1484
|
+
__metadata("design:type", Number)
|
|
1485
|
+
], StoreInventory.prototype, "storeId", void 0);
|
|
1486
|
+
__decorate([
|
|
1487
|
+
(0, sequelize_typescript_1.ForeignKey)(() => inventory_entity_1.Inventory),
|
|
1488
|
+
(0, sequelize_typescript_1.Column)({ allowNull: false }),
|
|
1489
|
+
__metadata("design:type", Number)
|
|
1490
|
+
], StoreInventory.prototype, "inventoryId", void 0);
|
|
1491
|
+
__decorate([
|
|
1492
|
+
(0, sequelize_typescript_1.Column)({ defaultValue: 1 }),
|
|
1493
|
+
__metadata("design:type", Number)
|
|
1494
|
+
], StoreInventory.prototype, "priority", void 0);
|
|
1495
|
+
exports.StoreInventory = StoreInventory = __decorate([
|
|
1496
|
+
sequelize_typescript_1.Table
|
|
1497
|
+
], StoreInventory);
|
|
1498
|
+
|
|
1499
|
+
|
|
1500
|
+
/***/ }),
|
|
1501
|
+
/* 34 */
|
|
1502
|
+
/***/ (function(__unused_webpack_module, exports, __webpack_require__) {
|
|
1503
|
+
|
|
1504
|
+
|
|
1505
|
+
var __decorate = (this && this.__decorate) || function (decorators, target, key, desc) {
|
|
1506
|
+
var c = arguments.length, r = c < 3 ? target : desc === null ? desc = Object.getOwnPropertyDescriptor(target, key) : desc, d;
|
|
1507
|
+
if (typeof Reflect === "object" && typeof Reflect.decorate === "function") r = Reflect.decorate(decorators, target, key, desc);
|
|
1508
|
+
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;
|
|
1509
|
+
return c > 3 && r && Object.defineProperty(target, key, r), r;
|
|
1510
|
+
};
|
|
1511
|
+
var __metadata = (this && this.__metadata) || function (k, v) {
|
|
1512
|
+
if (typeof Reflect === "object" && typeof Reflect.metadata === "function") return Reflect.metadata(k, v);
|
|
1513
|
+
};
|
|
1514
|
+
var _a;
|
|
1515
|
+
Object.defineProperty(exports, "__esModule", ({ value: true }));
|
|
1516
|
+
exports.Inventory = void 0;
|
|
1517
|
+
const sequelize_typescript_1 = __webpack_require__(9);
|
|
1518
|
+
const inventory_stock_entity_1 = __webpack_require__(35);
|
|
1519
|
+
const store_inventory_entity_1 = __webpack_require__(33);
|
|
1520
|
+
const store_entity_1 = __webpack_require__(32);
|
|
1521
|
+
const status_1 = __webpack_require__(14);
|
|
1522
|
+
let Inventory = class Inventory extends sequelize_typescript_1.Model {
|
|
1523
|
+
};
|
|
1524
|
+
exports.Inventory = Inventory;
|
|
1525
|
+
__decorate([
|
|
1526
|
+
(0, sequelize_typescript_1.Column)({ allowNull: false }),
|
|
1527
|
+
__metadata("design:type", String)
|
|
1528
|
+
], Inventory.prototype, "nameEn", void 0);
|
|
1529
|
+
__decorate([
|
|
1530
|
+
(0, sequelize_typescript_1.Column)({ allowNull: false }),
|
|
1531
|
+
__metadata("design:type", String)
|
|
1532
|
+
], Inventory.prototype, "nameAr", void 0);
|
|
1533
|
+
__decorate([
|
|
1534
|
+
(0, sequelize_typescript_1.Column)({ type: sequelize_typescript_1.DataType.TEXT, allowNull: true }),
|
|
1535
|
+
__metadata("design:type", String)
|
|
1536
|
+
], Inventory.prototype, "addressEn", void 0);
|
|
1537
|
+
__decorate([
|
|
1538
|
+
(0, sequelize_typescript_1.Column)({ type: sequelize_typescript_1.DataType.TEXT, allowNull: true }),
|
|
1539
|
+
__metadata("design:type", String)
|
|
1540
|
+
], Inventory.prototype, "addressAr", void 0);
|
|
1541
|
+
__decorate([
|
|
1542
|
+
(0, sequelize_typescript_1.Column)({ allowNull: true }),
|
|
1543
|
+
__metadata("design:type", String)
|
|
1544
|
+
], Inventory.prototype, "contactPhone", void 0);
|
|
1545
|
+
__decorate([
|
|
1546
|
+
(0, sequelize_typescript_1.Column)({ allowNull: true }),
|
|
1547
|
+
__metadata("design:type", String)
|
|
1548
|
+
], Inventory.prototype, "contactEmail", void 0);
|
|
1549
|
+
__decorate([
|
|
1550
|
+
(0, sequelize_typescript_1.Column)({
|
|
1551
|
+
type: sequelize_typescript_1.DataType.ENUM(...Object.values(status_1.Status)),
|
|
1552
|
+
defaultValue: status_1.Status.ACTIVE,
|
|
1553
|
+
}),
|
|
1554
|
+
__metadata("design:type", typeof (_a = typeof status_1.Status !== "undefined" && status_1.Status) === "function" ? _a : Object)
|
|
1555
|
+
], Inventory.prototype, "status", void 0);
|
|
1556
|
+
__decorate([
|
|
1557
|
+
(0, sequelize_typescript_1.HasMany)(() => inventory_stock_entity_1.InventoryStock),
|
|
1558
|
+
__metadata("design:type", Array)
|
|
1559
|
+
], Inventory.prototype, "stocks", void 0);
|
|
1560
|
+
__decorate([
|
|
1561
|
+
(0, sequelize_typescript_1.BelongsToMany)(() => store_entity_1.Store, () => store_inventory_entity_1.StoreInventory),
|
|
1562
|
+
__metadata("design:type", Array)
|
|
1563
|
+
], Inventory.prototype, "stores", void 0);
|
|
1564
|
+
exports.Inventory = Inventory = __decorate([
|
|
1565
|
+
sequelize_typescript_1.Table
|
|
1566
|
+
], Inventory);
|
|
1567
|
+
|
|
1568
|
+
|
|
1569
|
+
/***/ }),
|
|
1570
|
+
/* 35 */
|
|
1571
|
+
/***/ (function(__unused_webpack_module, exports, __webpack_require__) {
|
|
1572
|
+
|
|
1573
|
+
|
|
1574
|
+
var __decorate = (this && this.__decorate) || function (decorators, target, key, desc) {
|
|
1575
|
+
var c = arguments.length, r = c < 3 ? target : desc === null ? desc = Object.getOwnPropertyDescriptor(target, key) : desc, d;
|
|
1576
|
+
if (typeof Reflect === "object" && typeof Reflect.decorate === "function") r = Reflect.decorate(decorators, target, key, desc);
|
|
1577
|
+
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;
|
|
1578
|
+
return c > 3 && r && Object.defineProperty(target, key, r), r;
|
|
1579
|
+
};
|
|
1580
|
+
var __metadata = (this && this.__metadata) || function (k, v) {
|
|
1581
|
+
if (typeof Reflect === "object" && typeof Reflect.metadata === "function") return Reflect.metadata(k, v);
|
|
1582
|
+
};
|
|
1583
|
+
var _a, _b, _c;
|
|
1584
|
+
Object.defineProperty(exports, "__esModule", ({ value: true }));
|
|
1585
|
+
exports.InventoryStock = void 0;
|
|
1586
|
+
const sequelize_typescript_1 = __webpack_require__(9);
|
|
1587
|
+
const inventory_entity_1 = __webpack_require__(34);
|
|
1588
|
+
const product_entity_1 = __webpack_require__(27);
|
|
1589
|
+
const product_variant_entity_1 = __webpack_require__(29);
|
|
1590
|
+
let InventoryStock = class InventoryStock extends sequelize_typescript_1.Model {
|
|
1591
|
+
};
|
|
1592
|
+
exports.InventoryStock = InventoryStock;
|
|
1593
|
+
__decorate([
|
|
1594
|
+
(0, sequelize_typescript_1.ForeignKey)(() => inventory_entity_1.Inventory),
|
|
1595
|
+
(0, sequelize_typescript_1.Column)({ allowNull: false }),
|
|
1596
|
+
__metadata("design:type", Number)
|
|
1597
|
+
], InventoryStock.prototype, "inventoryId", void 0);
|
|
1598
|
+
__decorate([
|
|
1599
|
+
(0, sequelize_typescript_1.ForeignKey)(() => product_entity_1.Product),
|
|
1600
|
+
(0, sequelize_typescript_1.Column)({ allowNull: false }),
|
|
1601
|
+
__metadata("design:type", Number)
|
|
1602
|
+
], InventoryStock.prototype, "productId", void 0);
|
|
1603
|
+
__decorate([
|
|
1604
|
+
(0, sequelize_typescript_1.ForeignKey)(() => product_variant_entity_1.ProductVariant),
|
|
1605
|
+
(0, sequelize_typescript_1.Column)({ allowNull: true }),
|
|
1606
|
+
__metadata("design:type", Number)
|
|
1607
|
+
], InventoryStock.prototype, "productVariantId", void 0);
|
|
1608
|
+
__decorate([
|
|
1609
|
+
(0, sequelize_typescript_1.Column)({ defaultValue: 0 }),
|
|
1610
|
+
__metadata("design:type", Number)
|
|
1611
|
+
], InventoryStock.prototype, "physicalQuantity", void 0);
|
|
1612
|
+
__decorate([
|
|
1613
|
+
(0, sequelize_typescript_1.Column)({ defaultValue: 0 }),
|
|
1614
|
+
__metadata("design:type", Number)
|
|
1615
|
+
], InventoryStock.prototype, "reservedQuantity", void 0);
|
|
1616
|
+
__decorate([
|
|
1617
|
+
(0, sequelize_typescript_1.Column)({ defaultValue: false }),
|
|
1618
|
+
__metadata("design:type", Boolean)
|
|
1619
|
+
], InventoryStock.prototype, "availableFromVendor", void 0);
|
|
1620
|
+
__decorate([
|
|
1621
|
+
(0, sequelize_typescript_1.Column)({ allowNull: true }),
|
|
1622
|
+
__metadata("design:type", Number)
|
|
1623
|
+
], InventoryStock.prototype, "lowStockThreshold", void 0);
|
|
1624
|
+
__decorate([
|
|
1625
|
+
(0, sequelize_typescript_1.BelongsTo)(() => inventory_entity_1.Inventory),
|
|
1626
|
+
__metadata("design:type", typeof (_a = typeof inventory_entity_1.Inventory !== "undefined" && inventory_entity_1.Inventory) === "function" ? _a : Object)
|
|
1627
|
+
], InventoryStock.prototype, "inventory", void 0);
|
|
1628
|
+
__decorate([
|
|
1629
|
+
(0, sequelize_typescript_1.BelongsTo)(() => product_entity_1.Product),
|
|
1630
|
+
__metadata("design:type", typeof (_b = typeof product_entity_1.Product !== "undefined" && product_entity_1.Product) === "function" ? _b : Object)
|
|
1631
|
+
], InventoryStock.prototype, "product", void 0);
|
|
1632
|
+
__decorate([
|
|
1633
|
+
(0, sequelize_typescript_1.BelongsTo)(() => product_variant_entity_1.ProductVariant),
|
|
1634
|
+
__metadata("design:type", typeof (_c = typeof product_variant_entity_1.ProductVariant !== "undefined" && product_variant_entity_1.ProductVariant) === "function" ? _c : Object)
|
|
1635
|
+
], InventoryStock.prototype, "variant", void 0);
|
|
1636
|
+
exports.InventoryStock = InventoryStock = __decorate([
|
|
1637
|
+
sequelize_typescript_1.Table
|
|
1638
|
+
], InventoryStock);
|
|
1639
|
+
|
|
1640
|
+
|
|
1641
|
+
/***/ }),
|
|
1642
|
+
/* 36 */
|
|
1643
|
+
/***/ (function(__unused_webpack_module, exports, __webpack_require__) {
|
|
1644
|
+
|
|
1645
|
+
|
|
1646
|
+
var __decorate = (this && this.__decorate) || function (decorators, target, key, desc) {
|
|
1647
|
+
var c = arguments.length, r = c < 3 ? target : desc === null ? desc = Object.getOwnPropertyDescriptor(target, key) : desc, d;
|
|
1648
|
+
if (typeof Reflect === "object" && typeof Reflect.decorate === "function") r = Reflect.decorate(decorators, target, key, desc);
|
|
1649
|
+
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;
|
|
1650
|
+
return c > 3 && r && Object.defineProperty(target, key, r), r;
|
|
1651
|
+
};
|
|
1652
|
+
var __metadata = (this && this.__metadata) || function (k, v) {
|
|
1653
|
+
if (typeof Reflect === "object" && typeof Reflect.metadata === "function") return Reflect.metadata(k, v);
|
|
1654
|
+
};
|
|
1655
|
+
var _a, _b, _c, _d, _e;
|
|
1656
|
+
Object.defineProperty(exports, "__esModule", ({ value: true }));
|
|
1657
|
+
exports.StockMovement = void 0;
|
|
1658
|
+
const sequelize_typescript_1 = __webpack_require__(9);
|
|
1659
|
+
const inventory_entity_1 = __webpack_require__(34);
|
|
1660
|
+
const product_entity_1 = __webpack_require__(27);
|
|
1661
|
+
const product_variant_entity_1 = __webpack_require__(29);
|
|
1662
|
+
const sys_user_entity_1 = __webpack_require__(13);
|
|
1663
|
+
const stockMovementType_1 = __webpack_require__(37);
|
|
1664
|
+
let StockMovement = class StockMovement extends sequelize_typescript_1.Model {
|
|
1665
|
+
};
|
|
1666
|
+
exports.StockMovement = StockMovement;
|
|
1667
|
+
__decorate([
|
|
1668
|
+
(0, sequelize_typescript_1.ForeignKey)(() => inventory_entity_1.Inventory),
|
|
1669
|
+
(0, sequelize_typescript_1.Column)({ allowNull: false }),
|
|
1670
|
+
__metadata("design:type", Number)
|
|
1671
|
+
], StockMovement.prototype, "inventoryId", void 0);
|
|
1672
|
+
__decorate([
|
|
1673
|
+
(0, sequelize_typescript_1.ForeignKey)(() => product_entity_1.Product),
|
|
1674
|
+
(0, sequelize_typescript_1.Column)({ allowNull: false }),
|
|
1675
|
+
__metadata("design:type", Number)
|
|
1676
|
+
], StockMovement.prototype, "productId", void 0);
|
|
1677
|
+
__decorate([
|
|
1678
|
+
(0, sequelize_typescript_1.ForeignKey)(() => product_variant_entity_1.ProductVariant),
|
|
1679
|
+
(0, sequelize_typescript_1.Column)({ allowNull: true }),
|
|
1680
|
+
__metadata("design:type", Number)
|
|
1681
|
+
], StockMovement.prototype, "productVariantId", void 0);
|
|
1682
|
+
__decorate([
|
|
1683
|
+
(0, sequelize_typescript_1.Column)({
|
|
1684
|
+
type: sequelize_typescript_1.DataType.ENUM(...Object.values(stockMovementType_1.StockMovementType)),
|
|
1685
|
+
allowNull: false,
|
|
1686
|
+
}),
|
|
1687
|
+
__metadata("design:type", typeof (_a = typeof stockMovementType_1.StockMovementType !== "undefined" && stockMovementType_1.StockMovementType) === "function" ? _a : Object)
|
|
1688
|
+
], StockMovement.prototype, "movementType", void 0);
|
|
1689
|
+
__decorate([
|
|
1690
|
+
(0, sequelize_typescript_1.Column)({ allowNull: false }),
|
|
1691
|
+
__metadata("design:type", Number)
|
|
1692
|
+
], StockMovement.prototype, "quantity", void 0);
|
|
1693
|
+
__decorate([
|
|
1694
|
+
(0, sequelize_typescript_1.Column)({ allowNull: false }),
|
|
1695
|
+
__metadata("design:type", Number)
|
|
1696
|
+
], StockMovement.prototype, "quantityBefore", void 0);
|
|
1697
|
+
__decorate([
|
|
1698
|
+
(0, sequelize_typescript_1.Column)({ allowNull: false }),
|
|
1699
|
+
__metadata("design:type", Number)
|
|
1700
|
+
], StockMovement.prototype, "quantityAfter", void 0);
|
|
1701
|
+
__decorate([
|
|
1702
|
+
(0, sequelize_typescript_1.Column)({ allowNull: true }),
|
|
1703
|
+
__metadata("design:type", String)
|
|
1704
|
+
], StockMovement.prototype, "referenceType", void 0);
|
|
1705
|
+
__decorate([
|
|
1706
|
+
(0, sequelize_typescript_1.Column)({ allowNull: true }),
|
|
1707
|
+
__metadata("design:type", Number)
|
|
1708
|
+
], StockMovement.prototype, "referenceId", void 0);
|
|
1709
|
+
__decorate([
|
|
1710
|
+
(0, sequelize_typescript_1.Column)({ type: sequelize_typescript_1.DataType.TEXT, allowNull: true }),
|
|
1711
|
+
__metadata("design:type", String)
|
|
1712
|
+
], StockMovement.prototype, "notes", void 0);
|
|
1713
|
+
__decorate([
|
|
1714
|
+
(0, sequelize_typescript_1.ForeignKey)(() => sys_user_entity_1.SysUser),
|
|
1715
|
+
(0, sequelize_typescript_1.Column)({ allowNull: true }),
|
|
1716
|
+
__metadata("design:type", Number)
|
|
1717
|
+
], StockMovement.prototype, "createdBy", void 0);
|
|
1718
|
+
__decorate([
|
|
1719
|
+
(0, sequelize_typescript_1.BelongsTo)(() => inventory_entity_1.Inventory),
|
|
1720
|
+
__metadata("design:type", typeof (_b = typeof inventory_entity_1.Inventory !== "undefined" && inventory_entity_1.Inventory) === "function" ? _b : Object)
|
|
1721
|
+
], StockMovement.prototype, "inventory", void 0);
|
|
1722
|
+
__decorate([
|
|
1723
|
+
(0, sequelize_typescript_1.BelongsTo)(() => product_entity_1.Product),
|
|
1724
|
+
__metadata("design:type", typeof (_c = typeof product_entity_1.Product !== "undefined" && product_entity_1.Product) === "function" ? _c : Object)
|
|
1725
|
+
], StockMovement.prototype, "product", void 0);
|
|
1726
|
+
__decorate([
|
|
1727
|
+
(0, sequelize_typescript_1.BelongsTo)(() => product_variant_entity_1.ProductVariant),
|
|
1728
|
+
__metadata("design:type", typeof (_d = typeof product_variant_entity_1.ProductVariant !== "undefined" && product_variant_entity_1.ProductVariant) === "function" ? _d : Object)
|
|
1729
|
+
], StockMovement.prototype, "variant", void 0);
|
|
1730
|
+
__decorate([
|
|
1731
|
+
(0, sequelize_typescript_1.BelongsTo)(() => sys_user_entity_1.SysUser),
|
|
1732
|
+
__metadata("design:type", typeof (_e = typeof sys_user_entity_1.SysUser !== "undefined" && sys_user_entity_1.SysUser) === "function" ? _e : Object)
|
|
1733
|
+
], StockMovement.prototype, "createdByUser", void 0);
|
|
1734
|
+
exports.StockMovement = StockMovement = __decorate([
|
|
1735
|
+
sequelize_typescript_1.Table
|
|
1736
|
+
], StockMovement);
|
|
1737
|
+
|
|
1738
|
+
|
|
1739
|
+
/***/ }),
|
|
1740
|
+
/* 37 */
|
|
1741
|
+
/***/ ((__unused_webpack_module, exports) => {
|
|
1742
|
+
|
|
1743
|
+
|
|
1744
|
+
Object.defineProperty(exports, "__esModule", ({ value: true }));
|
|
1745
|
+
exports.StockMovementType = void 0;
|
|
1746
|
+
var StockMovementType;
|
|
1747
|
+
(function (StockMovementType) {
|
|
1748
|
+
StockMovementType["RECEIVED"] = "received";
|
|
1749
|
+
StockMovementType["RESERVED"] = "reserved";
|
|
1750
|
+
StockMovementType["RESERVATION_RELEASED"] = "reservation_released";
|
|
1751
|
+
StockMovementType["ADJUSTMENT_ADD"] = "adjustment_add";
|
|
1752
|
+
StockMovementType["ADJUSTMENT_REMOVE"] = "adjustment_remove";
|
|
1753
|
+
StockMovementType["RETURNED_FROM_CUSTOMER"] = "returned_from_customer";
|
|
1754
|
+
StockMovementType["RETURNED_TO_VENDOR"] = "returned_to_vendor";
|
|
1755
|
+
StockMovementType["TRANSFER_IN"] = "transfer_in";
|
|
1756
|
+
StockMovementType["TRANSFER_OUT"] = "transfer_out";
|
|
1757
|
+
})(StockMovementType || (exports.StockMovementType = StockMovementType = {}));
|
|
1758
|
+
|
|
1759
|
+
|
|
1760
|
+
/***/ }),
|
|
1761
|
+
/* 38 */
|
|
1762
|
+
/***/ (function(__unused_webpack_module, exports, __webpack_require__) {
|
|
1763
|
+
|
|
1764
|
+
|
|
1765
|
+
var __decorate = (this && this.__decorate) || function (decorators, target, key, desc) {
|
|
1766
|
+
var c = arguments.length, r = c < 3 ? target : desc === null ? desc = Object.getOwnPropertyDescriptor(target, key) : desc, d;
|
|
1767
|
+
if (typeof Reflect === "object" && typeof Reflect.decorate === "function") r = Reflect.decorate(decorators, target, key, desc);
|
|
1768
|
+
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;
|
|
1769
|
+
return c > 3 && r && Object.defineProperty(target, key, r), r;
|
|
1770
|
+
};
|
|
1771
|
+
var __metadata = (this && this.__metadata) || function (k, v) {
|
|
1772
|
+
if (typeof Reflect === "object" && typeof Reflect.metadata === "function") return Reflect.metadata(k, v);
|
|
1773
|
+
};
|
|
1774
|
+
var _a, _b;
|
|
1775
|
+
Object.defineProperty(exports, "__esModule", ({ value: true }));
|
|
1776
|
+
exports.Vendor = void 0;
|
|
1777
|
+
const sequelize_typescript_1 = __webpack_require__(9);
|
|
1778
|
+
const country_entity_1 = __webpack_require__(8);
|
|
1779
|
+
const status_1 = __webpack_require__(14);
|
|
1780
|
+
let Vendor = class Vendor extends sequelize_typescript_1.Model {
|
|
1781
|
+
};
|
|
1782
|
+
exports.Vendor = Vendor;
|
|
1783
|
+
__decorate([
|
|
1784
|
+
(0, sequelize_typescript_1.Column)({ allowNull: false }),
|
|
1785
|
+
__metadata("design:type", String)
|
|
1786
|
+
], Vendor.prototype, "nameEn", void 0);
|
|
1787
|
+
__decorate([
|
|
1788
|
+
(0, sequelize_typescript_1.Column)({ allowNull: false }),
|
|
1789
|
+
__metadata("design:type", String)
|
|
1790
|
+
], Vendor.prototype, "nameAr", void 0);
|
|
1791
|
+
__decorate([
|
|
1792
|
+
(0, sequelize_typescript_1.Column)({ allowNull: true }),
|
|
1793
|
+
__metadata("design:type", String)
|
|
1794
|
+
], Vendor.prototype, "contactPerson", void 0);
|
|
1795
|
+
__decorate([
|
|
1796
|
+
(0, sequelize_typescript_1.Column)({ allowNull: true }),
|
|
1797
|
+
__metadata("design:type", String)
|
|
1798
|
+
], Vendor.prototype, "email", void 0);
|
|
1799
|
+
__decorate([
|
|
1800
|
+
(0, sequelize_typescript_1.Column)({ allowNull: true }),
|
|
1801
|
+
__metadata("design:type", String)
|
|
1802
|
+
], Vendor.prototype, "phone", void 0);
|
|
1803
|
+
__decorate([
|
|
1804
|
+
(0, sequelize_typescript_1.Column)({ type: sequelize_typescript_1.DataType.TEXT, allowNull: true }),
|
|
1805
|
+
__metadata("design:type", String)
|
|
1806
|
+
], Vendor.prototype, "addressEn", void 0);
|
|
1807
|
+
__decorate([
|
|
1808
|
+
(0, sequelize_typescript_1.Column)({ type: sequelize_typescript_1.DataType.TEXT, allowNull: true }),
|
|
1809
|
+
__metadata("design:type", String)
|
|
1810
|
+
], Vendor.prototype, "addressAr", void 0);
|
|
1811
|
+
__decorate([
|
|
1812
|
+
(0, sequelize_typescript_1.ForeignKey)(() => country_entity_1.Country),
|
|
1813
|
+
(0, sequelize_typescript_1.Column)({ allowNull: true }),
|
|
1814
|
+
__metadata("design:type", Number)
|
|
1815
|
+
], Vendor.prototype, "countryId", void 0);
|
|
1816
|
+
__decorate([
|
|
1817
|
+
(0, sequelize_typescript_1.Column)({ allowNull: true }),
|
|
1818
|
+
__metadata("design:type", String)
|
|
1819
|
+
], Vendor.prototype, "taxNumber", void 0);
|
|
1820
|
+
__decorate([
|
|
1821
|
+
(0, sequelize_typescript_1.Column)({ allowNull: true }),
|
|
1822
|
+
__metadata("design:type", String)
|
|
1823
|
+
], Vendor.prototype, "commercialRegNumber", void 0);
|
|
1824
|
+
__decorate([
|
|
1825
|
+
(0, sequelize_typescript_1.Column)({ defaultValue: 0 }),
|
|
1826
|
+
__metadata("design:type", Number)
|
|
1827
|
+
], Vendor.prototype, "paymentTermsDays", void 0);
|
|
1828
|
+
__decorate([
|
|
1829
|
+
(0, sequelize_typescript_1.Column)({ allowNull: true }),
|
|
1830
|
+
__metadata("design:type", String)
|
|
1831
|
+
], Vendor.prototype, "notes", void 0);
|
|
1832
|
+
__decorate([
|
|
1833
|
+
(0, sequelize_typescript_1.Column)({
|
|
1834
|
+
type: sequelize_typescript_1.DataType.ENUM(...Object.values(status_1.Status)),
|
|
1835
|
+
defaultValue: status_1.Status.ACTIVE,
|
|
1836
|
+
}),
|
|
1837
|
+
__metadata("design:type", typeof (_a = typeof status_1.Status !== "undefined" && status_1.Status) === "function" ? _a : Object)
|
|
1838
|
+
], Vendor.prototype, "status", void 0);
|
|
1839
|
+
__decorate([
|
|
1840
|
+
(0, sequelize_typescript_1.BelongsTo)(() => country_entity_1.Country),
|
|
1841
|
+
__metadata("design:type", typeof (_b = typeof country_entity_1.Country !== "undefined" && country_entity_1.Country) === "function" ? _b : Object)
|
|
1842
|
+
], Vendor.prototype, "country", void 0);
|
|
1843
|
+
exports.Vendor = Vendor = __decorate([
|
|
1844
|
+
sequelize_typescript_1.Table
|
|
1845
|
+
], Vendor);
|
|
1846
|
+
|
|
1847
|
+
|
|
1848
|
+
/***/ }),
|
|
1849
|
+
/* 39 */
|
|
1850
|
+
/***/ (function(__unused_webpack_module, exports, __webpack_require__) {
|
|
1851
|
+
|
|
1852
|
+
|
|
1853
|
+
var __decorate = (this && this.__decorate) || function (decorators, target, key, desc) {
|
|
1854
|
+
var c = arguments.length, r = c < 3 ? target : desc === null ? desc = Object.getOwnPropertyDescriptor(target, key) : desc, d;
|
|
1855
|
+
if (typeof Reflect === "object" && typeof Reflect.decorate === "function") r = Reflect.decorate(decorators, target, key, desc);
|
|
1856
|
+
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;
|
|
1857
|
+
return c > 3 && r && Object.defineProperty(target, key, r), r;
|
|
1858
|
+
};
|
|
1859
|
+
var __metadata = (this && this.__metadata) || function (k, v) {
|
|
1860
|
+
if (typeof Reflect === "object" && typeof Reflect.metadata === "function") return Reflect.metadata(k, v);
|
|
1861
|
+
};
|
|
1862
|
+
var _a, _b, _c, _d;
|
|
1863
|
+
Object.defineProperty(exports, "__esModule", ({ value: true }));
|
|
1864
|
+
exports.VendorProduct = void 0;
|
|
1865
|
+
const sequelize_typescript_1 = __webpack_require__(9);
|
|
1866
|
+
const vendor_entity_1 = __webpack_require__(38);
|
|
1867
|
+
const product_entity_1 = __webpack_require__(27);
|
|
1868
|
+
const product_variant_entity_1 = __webpack_require__(29);
|
|
1869
|
+
const status_1 = __webpack_require__(14);
|
|
1870
|
+
let VendorProduct = class VendorProduct extends sequelize_typescript_1.Model {
|
|
1871
|
+
};
|
|
1872
|
+
exports.VendorProduct = VendorProduct;
|
|
1873
|
+
__decorate([
|
|
1874
|
+
(0, sequelize_typescript_1.ForeignKey)(() => vendor_entity_1.Vendor),
|
|
1875
|
+
(0, sequelize_typescript_1.Column)({ allowNull: false }),
|
|
1876
|
+
__metadata("design:type", Number)
|
|
1877
|
+
], VendorProduct.prototype, "vendorId", void 0);
|
|
1878
|
+
__decorate([
|
|
1879
|
+
(0, sequelize_typescript_1.ForeignKey)(() => product_entity_1.Product),
|
|
1880
|
+
(0, sequelize_typescript_1.Column)({ allowNull: false }),
|
|
1881
|
+
__metadata("design:type", Number)
|
|
1882
|
+
], VendorProduct.prototype, "productId", void 0);
|
|
1883
|
+
__decorate([
|
|
1884
|
+
(0, sequelize_typescript_1.ForeignKey)(() => product_variant_entity_1.ProductVariant),
|
|
1885
|
+
(0, sequelize_typescript_1.Column)({ allowNull: true }),
|
|
1886
|
+
__metadata("design:type", Number)
|
|
1887
|
+
], VendorProduct.prototype, "productVariantId", void 0);
|
|
1888
|
+
__decorate([
|
|
1889
|
+
(0, sequelize_typescript_1.Column)({ type: sequelize_typescript_1.DataType.DECIMAL(10, 3), allowNull: false }),
|
|
1890
|
+
__metadata("design:type", Number)
|
|
1891
|
+
], VendorProduct.prototype, "costPrice", void 0);
|
|
1892
|
+
__decorate([
|
|
1893
|
+
(0, sequelize_typescript_1.Column)({ allowNull: true }),
|
|
1894
|
+
__metadata("design:type", String)
|
|
1895
|
+
], VendorProduct.prototype, "vendorSku", void 0);
|
|
1896
|
+
__decorate([
|
|
1897
|
+
(0, sequelize_typescript_1.Column)({ allowNull: true }),
|
|
1898
|
+
__metadata("design:type", Number)
|
|
1899
|
+
], VendorProduct.prototype, "leadTimeDays", void 0);
|
|
1900
|
+
__decorate([
|
|
1901
|
+
(0, sequelize_typescript_1.Column)({ defaultValue: 1 }),
|
|
1902
|
+
__metadata("design:type", Number)
|
|
1903
|
+
], VendorProduct.prototype, "moq", void 0);
|
|
1904
|
+
__decorate([
|
|
1905
|
+
(0, sequelize_typescript_1.Column)({ defaultValue: false }),
|
|
1906
|
+
__metadata("design:type", Boolean)
|
|
1907
|
+
], VendorProduct.prototype, "isPreferred", void 0);
|
|
1908
|
+
__decorate([
|
|
1909
|
+
(0, sequelize_typescript_1.Column)({
|
|
1910
|
+
type: sequelize_typescript_1.DataType.ENUM(...Object.values(status_1.Status)),
|
|
1911
|
+
defaultValue: status_1.Status.ACTIVE,
|
|
1912
|
+
}),
|
|
1913
|
+
__metadata("design:type", typeof (_a = typeof status_1.Status !== "undefined" && status_1.Status) === "function" ? _a : Object)
|
|
1914
|
+
], VendorProduct.prototype, "status", void 0);
|
|
1915
|
+
__decorate([
|
|
1916
|
+
(0, sequelize_typescript_1.BelongsTo)(() => vendor_entity_1.Vendor),
|
|
1917
|
+
__metadata("design:type", typeof (_b = typeof vendor_entity_1.Vendor !== "undefined" && vendor_entity_1.Vendor) === "function" ? _b : Object)
|
|
1918
|
+
], VendorProduct.prototype, "vendor", void 0);
|
|
1919
|
+
__decorate([
|
|
1920
|
+
(0, sequelize_typescript_1.BelongsTo)(() => product_entity_1.Product),
|
|
1921
|
+
__metadata("design:type", typeof (_c = typeof product_entity_1.Product !== "undefined" && product_entity_1.Product) === "function" ? _c : Object)
|
|
1922
|
+
], VendorProduct.prototype, "product", void 0);
|
|
1923
|
+
__decorate([
|
|
1924
|
+
(0, sequelize_typescript_1.BelongsTo)(() => product_variant_entity_1.ProductVariant),
|
|
1925
|
+
__metadata("design:type", typeof (_d = typeof product_variant_entity_1.ProductVariant !== "undefined" && product_variant_entity_1.ProductVariant) === "function" ? _d : Object)
|
|
1926
|
+
], VendorProduct.prototype, "variant", void 0);
|
|
1927
|
+
exports.VendorProduct = VendorProduct = __decorate([
|
|
1928
|
+
sequelize_typescript_1.Table
|
|
1929
|
+
], VendorProduct);
|
|
1930
|
+
|
|
1931
|
+
|
|
1932
|
+
/***/ }),
|
|
1933
|
+
/* 40 */
|
|
1934
|
+
/***/ (function(__unused_webpack_module, exports, __webpack_require__) {
|
|
1935
|
+
|
|
1936
|
+
|
|
1937
|
+
var __decorate = (this && this.__decorate) || function (decorators, target, key, desc) {
|
|
1938
|
+
var c = arguments.length, r = c < 3 ? target : desc === null ? desc = Object.getOwnPropertyDescriptor(target, key) : desc, d;
|
|
1939
|
+
if (typeof Reflect === "object" && typeof Reflect.decorate === "function") r = Reflect.decorate(decorators, target, key, desc);
|
|
1940
|
+
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;
|
|
1941
|
+
return c > 3 && r && Object.defineProperty(target, key, r), r;
|
|
1942
|
+
};
|
|
1943
|
+
var __metadata = (this && this.__metadata) || function (k, v) {
|
|
1944
|
+
if (typeof Reflect === "object" && typeof Reflect.metadata === "function") return Reflect.metadata(k, v);
|
|
1945
|
+
};
|
|
1946
|
+
var _a, _b, _c, _d, _e, _f, _g, _h, _j;
|
|
1947
|
+
Object.defineProperty(exports, "__esModule", ({ value: true }));
|
|
1948
|
+
exports.PurchaseOrder = void 0;
|
|
1949
|
+
const sequelize_typescript_1 = __webpack_require__(9);
|
|
1950
|
+
const vendor_entity_1 = __webpack_require__(38);
|
|
1951
|
+
const inventory_entity_1 = __webpack_require__(34);
|
|
1952
|
+
const sys_user_entity_1 = __webpack_require__(13);
|
|
1953
|
+
const purchase_order_item_entity_1 = __webpack_require__(41);
|
|
1954
|
+
const purchaseOrderStatus_1 = __webpack_require__(42);
|
|
1955
|
+
let PurchaseOrder = class PurchaseOrder extends sequelize_typescript_1.Model {
|
|
1956
|
+
};
|
|
1957
|
+
exports.PurchaseOrder = PurchaseOrder;
|
|
1958
|
+
__decorate([
|
|
1959
|
+
(0, sequelize_typescript_1.Column)({ allowNull: false, unique: true }),
|
|
1960
|
+
__metadata("design:type", String)
|
|
1961
|
+
], PurchaseOrder.prototype, "poNumber", void 0);
|
|
1962
|
+
__decorate([
|
|
1963
|
+
(0, sequelize_typescript_1.ForeignKey)(() => vendor_entity_1.Vendor),
|
|
1964
|
+
(0, sequelize_typescript_1.Column)({ allowNull: false }),
|
|
1965
|
+
__metadata("design:type", Number)
|
|
1966
|
+
], PurchaseOrder.prototype, "vendorId", void 0);
|
|
1967
|
+
__decorate([
|
|
1968
|
+
(0, sequelize_typescript_1.ForeignKey)(() => inventory_entity_1.Inventory),
|
|
1969
|
+
(0, sequelize_typescript_1.Column)({ allowNull: false }),
|
|
1970
|
+
__metadata("design:type", Number)
|
|
1971
|
+
], PurchaseOrder.prototype, "inventoryId", void 0);
|
|
1972
|
+
__decorate([
|
|
1973
|
+
(0, sequelize_typescript_1.Column)({
|
|
1974
|
+
type: sequelize_typescript_1.DataType.ENUM(...Object.values(purchaseOrderStatus_1.PurchaseOrderStatus)),
|
|
1975
|
+
defaultValue: purchaseOrderStatus_1.PurchaseOrderStatus.DRAFT,
|
|
1976
|
+
}),
|
|
1977
|
+
__metadata("design:type", typeof (_a = typeof purchaseOrderStatus_1.PurchaseOrderStatus !== "undefined" && purchaseOrderStatus_1.PurchaseOrderStatus) === "function" ? _a : Object)
|
|
1978
|
+
], PurchaseOrder.prototype, "status", void 0);
|
|
1979
|
+
__decorate([
|
|
1980
|
+
(0, sequelize_typescript_1.Column)({ type: sequelize_typescript_1.DataType.DECIMAL(10, 3), defaultValue: 0 }),
|
|
1981
|
+
__metadata("design:type", Number)
|
|
1982
|
+
], PurchaseOrder.prototype, "totalAmount", void 0);
|
|
1983
|
+
__decorate([
|
|
1984
|
+
(0, sequelize_typescript_1.Column)({ allowNull: false, defaultValue: 'USD' }),
|
|
1985
|
+
__metadata("design:type", String)
|
|
1986
|
+
], PurchaseOrder.prototype, "currency", void 0);
|
|
1987
|
+
__decorate([
|
|
1988
|
+
(0, sequelize_typescript_1.Column)({ allowNull: true }),
|
|
1989
|
+
__metadata("design:type", typeof (_b = typeof Date !== "undefined" && Date) === "function" ? _b : Object)
|
|
1990
|
+
], PurchaseOrder.prototype, "expectedDeliveryDate", void 0);
|
|
1991
|
+
__decorate([
|
|
1992
|
+
(0, sequelize_typescript_1.Column)({ allowNull: true }),
|
|
1993
|
+
__metadata("design:type", typeof (_c = typeof Date !== "undefined" && Date) === "function" ? _c : Object)
|
|
1994
|
+
], PurchaseOrder.prototype, "sentAt", void 0);
|
|
1995
|
+
__decorate([
|
|
1996
|
+
(0, sequelize_typescript_1.Column)({ allowNull: true }),
|
|
1997
|
+
__metadata("design:type", typeof (_d = typeof Date !== "undefined" && Date) === "function" ? _d : Object)
|
|
1998
|
+
], PurchaseOrder.prototype, "closedAt", void 0);
|
|
1999
|
+
__decorate([
|
|
2000
|
+
(0, sequelize_typescript_1.Column)({ allowNull: true }),
|
|
2001
|
+
__metadata("design:type", typeof (_e = typeof Date !== "undefined" && Date) === "function" ? _e : Object)
|
|
2002
|
+
], PurchaseOrder.prototype, "cancelledAt", void 0);
|
|
2003
|
+
__decorate([
|
|
2004
|
+
(0, sequelize_typescript_1.Column)({ type: sequelize_typescript_1.DataType.TEXT, allowNull: true }),
|
|
2005
|
+
__metadata("design:type", String)
|
|
2006
|
+
], PurchaseOrder.prototype, "cancellationReason", void 0);
|
|
2007
|
+
__decorate([
|
|
2008
|
+
(0, sequelize_typescript_1.Column)({ type: sequelize_typescript_1.DataType.TEXT, allowNull: true }),
|
|
2009
|
+
__metadata("design:type", String)
|
|
2010
|
+
], PurchaseOrder.prototype, "notes", void 0);
|
|
2011
|
+
__decorate([
|
|
2012
|
+
(0, sequelize_typescript_1.ForeignKey)(() => sys_user_entity_1.SysUser),
|
|
2013
|
+
(0, sequelize_typescript_1.Column)({ allowNull: true }),
|
|
2014
|
+
__metadata("design:type", Number)
|
|
2015
|
+
], PurchaseOrder.prototype, "createdBy", void 0);
|
|
2016
|
+
__decorate([
|
|
2017
|
+
(0, sequelize_typescript_1.ForeignKey)(() => sys_user_entity_1.SysUser),
|
|
2018
|
+
(0, sequelize_typescript_1.Column)({ allowNull: true }),
|
|
2019
|
+
__metadata("design:type", Number)
|
|
2020
|
+
], PurchaseOrder.prototype, "sentBy", void 0);
|
|
2021
|
+
__decorate([
|
|
2022
|
+
(0, sequelize_typescript_1.BelongsTo)(() => vendor_entity_1.Vendor),
|
|
2023
|
+
__metadata("design:type", typeof (_f = typeof vendor_entity_1.Vendor !== "undefined" && vendor_entity_1.Vendor) === "function" ? _f : Object)
|
|
2024
|
+
], PurchaseOrder.prototype, "vendor", void 0);
|
|
2025
|
+
__decorate([
|
|
2026
|
+
(0, sequelize_typescript_1.BelongsTo)(() => inventory_entity_1.Inventory),
|
|
2027
|
+
__metadata("design:type", typeof (_g = typeof inventory_entity_1.Inventory !== "undefined" && inventory_entity_1.Inventory) === "function" ? _g : Object)
|
|
2028
|
+
], PurchaseOrder.prototype, "inventory", void 0);
|
|
2029
|
+
__decorate([
|
|
2030
|
+
(0, sequelize_typescript_1.BelongsTo)(() => sys_user_entity_1.SysUser, { foreignKey: 'createdBy', as: 'creator' }),
|
|
2031
|
+
__metadata("design:type", typeof (_h = typeof sys_user_entity_1.SysUser !== "undefined" && sys_user_entity_1.SysUser) === "function" ? _h : Object)
|
|
2032
|
+
], PurchaseOrder.prototype, "creator", void 0);
|
|
2033
|
+
__decorate([
|
|
2034
|
+
(0, sequelize_typescript_1.BelongsTo)(() => sys_user_entity_1.SysUser, { foreignKey: 'sentBy', as: 'sender' }),
|
|
2035
|
+
__metadata("design:type", typeof (_j = typeof sys_user_entity_1.SysUser !== "undefined" && sys_user_entity_1.SysUser) === "function" ? _j : Object)
|
|
2036
|
+
], PurchaseOrder.prototype, "sender", void 0);
|
|
2037
|
+
__decorate([
|
|
2038
|
+
(0, sequelize_typescript_1.HasMany)(() => purchase_order_item_entity_1.PurchaseOrderItem),
|
|
2039
|
+
__metadata("design:type", Array)
|
|
2040
|
+
], PurchaseOrder.prototype, "items", void 0);
|
|
2041
|
+
exports.PurchaseOrder = PurchaseOrder = __decorate([
|
|
2042
|
+
sequelize_typescript_1.Table
|
|
2043
|
+
], PurchaseOrder);
|
|
2044
|
+
|
|
2045
|
+
|
|
2046
|
+
/***/ }),
|
|
2047
|
+
/* 41 */
|
|
2048
|
+
/***/ (function(__unused_webpack_module, exports, __webpack_require__) {
|
|
2049
|
+
|
|
2050
|
+
|
|
2051
|
+
var __decorate = (this && this.__decorate) || function (decorators, target, key, desc) {
|
|
2052
|
+
var c = arguments.length, r = c < 3 ? target : desc === null ? desc = Object.getOwnPropertyDescriptor(target, key) : desc, d;
|
|
2053
|
+
if (typeof Reflect === "object" && typeof Reflect.decorate === "function") r = Reflect.decorate(decorators, target, key, desc);
|
|
2054
|
+
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;
|
|
2055
|
+
return c > 3 && r && Object.defineProperty(target, key, r), r;
|
|
2056
|
+
};
|
|
2057
|
+
var __metadata = (this && this.__metadata) || function (k, v) {
|
|
2058
|
+
if (typeof Reflect === "object" && typeof Reflect.metadata === "function") return Reflect.metadata(k, v);
|
|
2059
|
+
};
|
|
2060
|
+
var _a, _b, _c;
|
|
2061
|
+
Object.defineProperty(exports, "__esModule", ({ value: true }));
|
|
2062
|
+
exports.PurchaseOrderItem = exports.PurchaseOrderItemStatus = void 0;
|
|
2063
|
+
const sequelize_typescript_1 = __webpack_require__(9);
|
|
2064
|
+
const purchase_order_entity_1 = __webpack_require__(40);
|
|
2065
|
+
const product_entity_1 = __webpack_require__(27);
|
|
2066
|
+
const product_variant_entity_1 = __webpack_require__(29);
|
|
2067
|
+
var PurchaseOrderItemStatus;
|
|
2068
|
+
(function (PurchaseOrderItemStatus) {
|
|
2069
|
+
PurchaseOrderItemStatus["PENDING"] = "pending";
|
|
2070
|
+
PurchaseOrderItemStatus["PARTIALLY_RECEIVED"] = "partially_received";
|
|
2071
|
+
PurchaseOrderItemStatus["FULLY_RECEIVED"] = "fully_received";
|
|
2072
|
+
PurchaseOrderItemStatus["CANCELLED"] = "cancelled";
|
|
2073
|
+
})(PurchaseOrderItemStatus || (exports.PurchaseOrderItemStatus = PurchaseOrderItemStatus = {}));
|
|
2074
|
+
let PurchaseOrderItem = class PurchaseOrderItem extends sequelize_typescript_1.Model {
|
|
2075
|
+
};
|
|
2076
|
+
exports.PurchaseOrderItem = PurchaseOrderItem;
|
|
2077
|
+
__decorate([
|
|
2078
|
+
(0, sequelize_typescript_1.ForeignKey)(() => purchase_order_entity_1.PurchaseOrder),
|
|
2079
|
+
(0, sequelize_typescript_1.Column)({ allowNull: false }),
|
|
2080
|
+
__metadata("design:type", Number)
|
|
2081
|
+
], PurchaseOrderItem.prototype, "purchaseOrderId", void 0);
|
|
2082
|
+
__decorate([
|
|
2083
|
+
(0, sequelize_typescript_1.ForeignKey)(() => product_entity_1.Product),
|
|
2084
|
+
(0, sequelize_typescript_1.Column)({ allowNull: false }),
|
|
2085
|
+
__metadata("design:type", Number)
|
|
2086
|
+
], PurchaseOrderItem.prototype, "productId", void 0);
|
|
2087
|
+
__decorate([
|
|
2088
|
+
(0, sequelize_typescript_1.ForeignKey)(() => product_variant_entity_1.ProductVariant),
|
|
2089
|
+
(0, sequelize_typescript_1.Column)({ allowNull: true }),
|
|
2090
|
+
__metadata("design:type", Number)
|
|
2091
|
+
], PurchaseOrderItem.prototype, "productVariantId", void 0);
|
|
2092
|
+
__decorate([
|
|
2093
|
+
(0, sequelize_typescript_1.Column)({ allowNull: false }),
|
|
2094
|
+
__metadata("design:type", Number)
|
|
2095
|
+
], PurchaseOrderItem.prototype, "orderedQuantity", void 0);
|
|
2096
|
+
__decorate([
|
|
2097
|
+
(0, sequelize_typescript_1.Column)({ defaultValue: 0 }),
|
|
2098
|
+
__metadata("design:type", Number)
|
|
2099
|
+
], PurchaseOrderItem.prototype, "receivedQuantity", void 0);
|
|
2100
|
+
__decorate([
|
|
2101
|
+
(0, sequelize_typescript_1.Column)({ defaultValue: 0 }),
|
|
2102
|
+
__metadata("design:type", Number)
|
|
2103
|
+
], PurchaseOrderItem.prototype, "reservedQuantity", void 0);
|
|
2104
|
+
__decorate([
|
|
2105
|
+
(0, sequelize_typescript_1.Column)({ type: sequelize_typescript_1.DataType.DECIMAL(10, 3), allowNull: false }),
|
|
2106
|
+
__metadata("design:type", Number)
|
|
2107
|
+
], PurchaseOrderItem.prototype, "unitCostPrice", void 0);
|
|
2108
|
+
__decorate([
|
|
2109
|
+
(0, sequelize_typescript_1.Column)({ type: sequelize_typescript_1.DataType.DECIMAL(10, 3), defaultValue: 0 }),
|
|
2110
|
+
__metadata("design:type", Number)
|
|
2111
|
+
], PurchaseOrderItem.prototype, "totalCostPrice", void 0);
|
|
2112
|
+
__decorate([
|
|
2113
|
+
(0, sequelize_typescript_1.Column)({
|
|
2114
|
+
type: sequelize_typescript_1.DataType.ENUM(...Object.values(PurchaseOrderItemStatus)),
|
|
2115
|
+
defaultValue: PurchaseOrderItemStatus.PENDING,
|
|
2116
|
+
}),
|
|
2117
|
+
__metadata("design:type", String)
|
|
2118
|
+
], PurchaseOrderItem.prototype, "status", void 0);
|
|
2119
|
+
__decorate([
|
|
2120
|
+
(0, sequelize_typescript_1.Column)({ allowNull: true }),
|
|
2121
|
+
__metadata("design:type", Number)
|
|
2122
|
+
], PurchaseOrderItem.prototype, "triggerOrderId", void 0);
|
|
2123
|
+
__decorate([
|
|
2124
|
+
(0, sequelize_typescript_1.BelongsTo)(() => purchase_order_entity_1.PurchaseOrder),
|
|
2125
|
+
__metadata("design:type", typeof (_a = typeof purchase_order_entity_1.PurchaseOrder !== "undefined" && purchase_order_entity_1.PurchaseOrder) === "function" ? _a : Object)
|
|
2126
|
+
], PurchaseOrderItem.prototype, "purchaseOrder", void 0);
|
|
2127
|
+
__decorate([
|
|
2128
|
+
(0, sequelize_typescript_1.BelongsTo)(() => product_entity_1.Product),
|
|
2129
|
+
__metadata("design:type", typeof (_b = typeof product_entity_1.Product !== "undefined" && product_entity_1.Product) === "function" ? _b : Object)
|
|
2130
|
+
], PurchaseOrderItem.prototype, "product", void 0);
|
|
2131
|
+
__decorate([
|
|
2132
|
+
(0, sequelize_typescript_1.BelongsTo)(() => product_variant_entity_1.ProductVariant),
|
|
2133
|
+
__metadata("design:type", typeof (_c = typeof product_variant_entity_1.ProductVariant !== "undefined" && product_variant_entity_1.ProductVariant) === "function" ? _c : Object)
|
|
2134
|
+
], PurchaseOrderItem.prototype, "variant", void 0);
|
|
2135
|
+
exports.PurchaseOrderItem = PurchaseOrderItem = __decorate([
|
|
2136
|
+
sequelize_typescript_1.Table
|
|
2137
|
+
], PurchaseOrderItem);
|
|
2138
|
+
|
|
2139
|
+
|
|
2140
|
+
/***/ }),
|
|
2141
|
+
/* 42 */
|
|
2142
|
+
/***/ ((__unused_webpack_module, exports) => {
|
|
2143
|
+
|
|
2144
|
+
|
|
2145
|
+
Object.defineProperty(exports, "__esModule", ({ value: true }));
|
|
2146
|
+
exports.PurchaseOrderStatus = void 0;
|
|
2147
|
+
var PurchaseOrderStatus;
|
|
2148
|
+
(function (PurchaseOrderStatus) {
|
|
2149
|
+
PurchaseOrderStatus["DRAFT"] = "draft";
|
|
2150
|
+
PurchaseOrderStatus["SENT_TO_VENDOR"] = "sent_to_vendor";
|
|
2151
|
+
PurchaseOrderStatus["PARTIALLY_RECEIVED"] = "partially_received";
|
|
2152
|
+
PurchaseOrderStatus["FULLY_RECEIVED"] = "fully_received";
|
|
2153
|
+
PurchaseOrderStatus["CLOSED"] = "closed";
|
|
2154
|
+
PurchaseOrderStatus["CANCELLED"] = "cancelled";
|
|
2155
|
+
})(PurchaseOrderStatus || (exports.PurchaseOrderStatus = PurchaseOrderStatus = {}));
|
|
2156
|
+
|
|
2157
|
+
|
|
722
2158
|
/***/ })
|
|
723
2159
|
/******/ ]);
|
|
724
2160
|
/************************************************************************/
|