tt-entities 0.0.18 → 0.0.20

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.
Files changed (165) hide show
  1. package/dist/libs/tatayab-entities-library/entities/apikey.entity.js.map +1 -0
  2. package/dist/libs/tatayab-entities-library/entities/area.entity.js.map +1 -0
  3. package/dist/libs/tatayab-entities-library/entities/brand.entity.js.map +1 -0
  4. package/dist/libs/tatayab-entities-library/entities/category.entity.js.map +1 -0
  5. package/dist/libs/tatayab-entities-library/entities/country.entity.js.map +1 -0
  6. package/dist/libs/tatayab-entities-library/entities/inventory-stock.entity.js.map +1 -0
  7. package/dist/libs/tatayab-entities-library/entities/inventory.entity.js.map +1 -0
  8. package/dist/libs/tatayab-entities-library/entities/permission.entity.js.map +1 -0
  9. package/dist/libs/tatayab-entities-library/entities/product-media.entity.js.map +1 -0
  10. package/dist/libs/tatayab-entities-library/entities/product-store.entity.js.map +1 -0
  11. package/dist/libs/tatayab-entities-library/entities/product-tag.entity.js.map +1 -0
  12. package/dist/libs/tatayab-entities-library/entities/product-variant-option.entity.js.map +1 -0
  13. package/dist/libs/tatayab-entities-library/entities/product-variant.entity.js.map +1 -0
  14. package/dist/libs/tatayab-entities-library/entities/product.entity.js.map +1 -0
  15. package/dist/libs/tatayab-entities-library/entities/purchase-order-item.entity.js.map +1 -0
  16. package/dist/libs/tatayab-entities-library/entities/purchase-order.entity.js.map +1 -0
  17. package/dist/libs/tatayab-entities-library/entities/role-permission.entity.js.map +1 -0
  18. package/dist/libs/tatayab-entities-library/entities/stock-movement.entity.js.map +1 -0
  19. package/dist/libs/tatayab-entities-library/entities/store-inventory.entity.js.map +1 -0
  20. package/dist/libs/tatayab-entities-library/entities/store.entity.js.map +1 -0
  21. package/dist/libs/tatayab-entities-library/entities/sys.role.entity.js.map +1 -0
  22. package/dist/libs/tatayab-entities-library/entities/sys.user.entity.js.map +1 -0
  23. package/dist/libs/tatayab-entities-library/entities/tag.entity.js.map +1 -0
  24. package/dist/libs/tatayab-entities-library/entities/user.entity.js.map +1 -0
  25. package/dist/libs/tatayab-entities-library/entities/userDevice.entity.js.map +1 -0
  26. package/dist/libs/tatayab-entities-library/entities/variant-option.entity.js.map +1 -0
  27. package/dist/libs/tatayab-entities-library/entities/variant-type.entity.js.map +1 -0
  28. package/dist/libs/tatayab-entities-library/entities/vendor-product.entity.js.map +1 -0
  29. package/dist/libs/tatayab-entities-library/entities/vendor.entity.js.map +1 -0
  30. package/dist/libs/tatayab-entities-library/index.js.map +1 -0
  31. package/dist/libs/tatayab-entities-library/utils/enums/gender.js.map +1 -0
  32. package/dist/libs/tatayab-entities-library/utils/enums/language.js.map +1 -0
  33. package/dist/libs/tatayab-entities-library/utils/enums/osName.js.map +1 -0
  34. package/dist/libs/tatayab-entities-library/utils/enums/productApp.js.map +1 -0
  35. package/dist/libs/tatayab-entities-library/utils/enums/purchaseOrderStatus.js.map +1 -0
  36. package/dist/libs/tatayab-entities-library/utils/enums/status.js.map +1 -0
  37. package/dist/libs/tatayab-entities-library/utils/enums/stockMovementType.js.map +1 -0
  38. package/dist/libs/tatayab-entities-library/utils/enums/versiontype.js.map +1 -0
  39. package/package.json +3 -3
  40. package/dist/libs/tatayab-entities-library/src/entities/apikey.entity.js.map +0 -1
  41. package/dist/libs/tatayab-entities-library/src/entities/area.entity.js.map +0 -1
  42. package/dist/libs/tatayab-entities-library/src/entities/brand.entity.js.map +0 -1
  43. package/dist/libs/tatayab-entities-library/src/entities/category.entity.js.map +0 -1
  44. package/dist/libs/tatayab-entities-library/src/entities/country.entity.js.map +0 -1
  45. package/dist/libs/tatayab-entities-library/src/entities/inventory-stock.entity.js.map +0 -1
  46. package/dist/libs/tatayab-entities-library/src/entities/inventory.entity.js.map +0 -1
  47. package/dist/libs/tatayab-entities-library/src/entities/permission.entity.js.map +0 -1
  48. package/dist/libs/tatayab-entities-library/src/entities/product-media.entity.js.map +0 -1
  49. package/dist/libs/tatayab-entities-library/src/entities/product-store.entity.js.map +0 -1
  50. package/dist/libs/tatayab-entities-library/src/entities/product-tag.entity.js.map +0 -1
  51. package/dist/libs/tatayab-entities-library/src/entities/product-variant-option.entity.js.map +0 -1
  52. package/dist/libs/tatayab-entities-library/src/entities/product-variant.entity.js.map +0 -1
  53. package/dist/libs/tatayab-entities-library/src/entities/product.entity.js.map +0 -1
  54. package/dist/libs/tatayab-entities-library/src/entities/purchase-order-item.entity.js.map +0 -1
  55. package/dist/libs/tatayab-entities-library/src/entities/purchase-order.entity.js.map +0 -1
  56. package/dist/libs/tatayab-entities-library/src/entities/role-permission.entity.js.map +0 -1
  57. package/dist/libs/tatayab-entities-library/src/entities/stock-movement.entity.js.map +0 -1
  58. package/dist/libs/tatayab-entities-library/src/entities/store-inventory.entity.js.map +0 -1
  59. package/dist/libs/tatayab-entities-library/src/entities/store.entity.js.map +0 -1
  60. package/dist/libs/tatayab-entities-library/src/entities/sys.role.entity.js.map +0 -1
  61. package/dist/libs/tatayab-entities-library/src/entities/sys.user.entity.js.map +0 -1
  62. package/dist/libs/tatayab-entities-library/src/entities/tag.entity.js.map +0 -1
  63. package/dist/libs/tatayab-entities-library/src/entities/translation.entity.d.ts +0 -9
  64. package/dist/libs/tatayab-entities-library/src/entities/translation.entity.js +0 -44
  65. package/dist/libs/tatayab-entities-library/src/entities/translation.entity.js.map +0 -1
  66. package/dist/libs/tatayab-entities-library/src/entities/user.entity.js.map +0 -1
  67. package/dist/libs/tatayab-entities-library/src/entities/userDevice.entity.js.map +0 -1
  68. package/dist/libs/tatayab-entities-library/src/entities/variant-option.entity.js.map +0 -1
  69. package/dist/libs/tatayab-entities-library/src/entities/variant-type.entity.js.map +0 -1
  70. package/dist/libs/tatayab-entities-library/src/entities/vendor-product.entity.js.map +0 -1
  71. package/dist/libs/tatayab-entities-library/src/entities/vendor.entity.js.map +0 -1
  72. package/dist/libs/tatayab-entities-library/src/index.js.map +0 -1
  73. package/dist/libs/tatayab-entities-library/src/utils/enums/gender.js.map +0 -1
  74. package/dist/libs/tatayab-entities-library/src/utils/enums/language.js.map +0 -1
  75. package/dist/libs/tatayab-entities-library/src/utils/enums/osName.js.map +0 -1
  76. package/dist/libs/tatayab-entities-library/src/utils/enums/productApp.js.map +0 -1
  77. package/dist/libs/tatayab-entities-library/src/utils/enums/purchaseOrderStatus.js.map +0 -1
  78. package/dist/libs/tatayab-entities-library/src/utils/enums/status.js.map +0 -1
  79. package/dist/libs/tatayab-entities-library/src/utils/enums/stockMovementType.js.map +0 -1
  80. package/dist/libs/tatayab-entities-library/src/utils/enums/versiontype.js.map +0 -1
  81. package/dist/src/app.module.d.ts +0 -2
  82. package/dist/src/app.module.js +0 -43
  83. package/dist/src/app.module.js.map +0 -1
  84. package/dist/src/main.d.ts +0 -1
  85. package/dist/src/main.js +0 -2372
  86. package/dist/src/main.js.map +0 -1
  87. package/dist/test/app.e2e-spec.d.ts +0 -1
  88. package/dist/test/app.e2e-spec.js +0 -22
  89. package/dist/test/app.e2e-spec.js.map +0 -1
  90. /package/dist/libs/tatayab-entities-library/{src/entities → entities}/apikey.entity.d.ts +0 -0
  91. /package/dist/libs/tatayab-entities-library/{src/entities → entities}/apikey.entity.js +0 -0
  92. /package/dist/libs/tatayab-entities-library/{src/entities → entities}/area.entity.d.ts +0 -0
  93. /package/dist/libs/tatayab-entities-library/{src/entities → entities}/area.entity.js +0 -0
  94. /package/dist/libs/tatayab-entities-library/{src/entities → entities}/brand.entity.d.ts +0 -0
  95. /package/dist/libs/tatayab-entities-library/{src/entities → entities}/brand.entity.js +0 -0
  96. /package/dist/libs/tatayab-entities-library/{src/entities → entities}/category.entity.d.ts +0 -0
  97. /package/dist/libs/tatayab-entities-library/{src/entities → entities}/category.entity.js +0 -0
  98. /package/dist/libs/tatayab-entities-library/{src/entities → entities}/country.entity.d.ts +0 -0
  99. /package/dist/libs/tatayab-entities-library/{src/entities → entities}/country.entity.js +0 -0
  100. /package/dist/libs/tatayab-entities-library/{src/entities → entities}/inventory-stock.entity.d.ts +0 -0
  101. /package/dist/libs/tatayab-entities-library/{src/entities → entities}/inventory-stock.entity.js +0 -0
  102. /package/dist/libs/tatayab-entities-library/{src/entities → entities}/inventory.entity.d.ts +0 -0
  103. /package/dist/libs/tatayab-entities-library/{src/entities → entities}/inventory.entity.js +0 -0
  104. /package/dist/libs/tatayab-entities-library/{src/entities → entities}/permission.entity.d.ts +0 -0
  105. /package/dist/libs/tatayab-entities-library/{src/entities → entities}/permission.entity.js +0 -0
  106. /package/dist/libs/tatayab-entities-library/{src/entities → entities}/product-media.entity.d.ts +0 -0
  107. /package/dist/libs/tatayab-entities-library/{src/entities → entities}/product-media.entity.js +0 -0
  108. /package/dist/libs/tatayab-entities-library/{src/entities → entities}/product-store.entity.d.ts +0 -0
  109. /package/dist/libs/tatayab-entities-library/{src/entities → entities}/product-store.entity.js +0 -0
  110. /package/dist/libs/tatayab-entities-library/{src/entities → entities}/product-tag.entity.d.ts +0 -0
  111. /package/dist/libs/tatayab-entities-library/{src/entities → entities}/product-tag.entity.js +0 -0
  112. /package/dist/libs/tatayab-entities-library/{src/entities → entities}/product-variant-option.entity.d.ts +0 -0
  113. /package/dist/libs/tatayab-entities-library/{src/entities → entities}/product-variant-option.entity.js +0 -0
  114. /package/dist/libs/tatayab-entities-library/{src/entities → entities}/product-variant.entity.d.ts +0 -0
  115. /package/dist/libs/tatayab-entities-library/{src/entities → entities}/product-variant.entity.js +0 -0
  116. /package/dist/libs/tatayab-entities-library/{src/entities → entities}/product.entity.d.ts +0 -0
  117. /package/dist/libs/tatayab-entities-library/{src/entities → entities}/product.entity.js +0 -0
  118. /package/dist/libs/tatayab-entities-library/{src/entities → entities}/purchase-order-item.entity.d.ts +0 -0
  119. /package/dist/libs/tatayab-entities-library/{src/entities → entities}/purchase-order-item.entity.js +0 -0
  120. /package/dist/libs/tatayab-entities-library/{src/entities → entities}/purchase-order.entity.d.ts +0 -0
  121. /package/dist/libs/tatayab-entities-library/{src/entities → entities}/purchase-order.entity.js +0 -0
  122. /package/dist/libs/tatayab-entities-library/{src/entities → entities}/role-permission.entity.d.ts +0 -0
  123. /package/dist/libs/tatayab-entities-library/{src/entities → entities}/role-permission.entity.js +0 -0
  124. /package/dist/libs/tatayab-entities-library/{src/entities → entities}/stock-movement.entity.d.ts +0 -0
  125. /package/dist/libs/tatayab-entities-library/{src/entities → entities}/stock-movement.entity.js +0 -0
  126. /package/dist/libs/tatayab-entities-library/{src/entities → entities}/store-inventory.entity.d.ts +0 -0
  127. /package/dist/libs/tatayab-entities-library/{src/entities → entities}/store-inventory.entity.js +0 -0
  128. /package/dist/libs/tatayab-entities-library/{src/entities → entities}/store.entity.d.ts +0 -0
  129. /package/dist/libs/tatayab-entities-library/{src/entities → entities}/store.entity.js +0 -0
  130. /package/dist/libs/tatayab-entities-library/{src/entities → entities}/sys.role.entity.d.ts +0 -0
  131. /package/dist/libs/tatayab-entities-library/{src/entities → entities}/sys.role.entity.js +0 -0
  132. /package/dist/libs/tatayab-entities-library/{src/entities → entities}/sys.user.entity.d.ts +0 -0
  133. /package/dist/libs/tatayab-entities-library/{src/entities → entities}/sys.user.entity.js +0 -0
  134. /package/dist/libs/tatayab-entities-library/{src/entities → entities}/tag.entity.d.ts +0 -0
  135. /package/dist/libs/tatayab-entities-library/{src/entities → entities}/tag.entity.js +0 -0
  136. /package/dist/libs/tatayab-entities-library/{src/entities → entities}/user.entity.d.ts +0 -0
  137. /package/dist/libs/tatayab-entities-library/{src/entities → entities}/user.entity.js +0 -0
  138. /package/dist/libs/tatayab-entities-library/{src/entities → entities}/userDevice.entity.d.ts +0 -0
  139. /package/dist/libs/tatayab-entities-library/{src/entities → entities}/userDevice.entity.js +0 -0
  140. /package/dist/libs/tatayab-entities-library/{src/entities → entities}/variant-option.entity.d.ts +0 -0
  141. /package/dist/libs/tatayab-entities-library/{src/entities → entities}/variant-option.entity.js +0 -0
  142. /package/dist/libs/tatayab-entities-library/{src/entities → entities}/variant-type.entity.d.ts +0 -0
  143. /package/dist/libs/tatayab-entities-library/{src/entities → entities}/variant-type.entity.js +0 -0
  144. /package/dist/libs/tatayab-entities-library/{src/entities → entities}/vendor-product.entity.d.ts +0 -0
  145. /package/dist/libs/tatayab-entities-library/{src/entities → entities}/vendor-product.entity.js +0 -0
  146. /package/dist/libs/tatayab-entities-library/{src/entities → entities}/vendor.entity.d.ts +0 -0
  147. /package/dist/libs/tatayab-entities-library/{src/entities → entities}/vendor.entity.js +0 -0
  148. /package/dist/libs/tatayab-entities-library/{src/index.d.ts → index.d.ts} +0 -0
  149. /package/dist/libs/tatayab-entities-library/{src/index.js → index.js} +0 -0
  150. /package/dist/libs/tatayab-entities-library/{src/utils → utils}/enums/gender.d.ts +0 -0
  151. /package/dist/libs/tatayab-entities-library/{src/utils → utils}/enums/gender.js +0 -0
  152. /package/dist/libs/tatayab-entities-library/{src/utils → utils}/enums/language.d.ts +0 -0
  153. /package/dist/libs/tatayab-entities-library/{src/utils → utils}/enums/language.js +0 -0
  154. /package/dist/libs/tatayab-entities-library/{src/utils → utils}/enums/osName.d.ts +0 -0
  155. /package/dist/libs/tatayab-entities-library/{src/utils → utils}/enums/osName.js +0 -0
  156. /package/dist/libs/tatayab-entities-library/{src/utils → utils}/enums/productApp.d.ts +0 -0
  157. /package/dist/libs/tatayab-entities-library/{src/utils → utils}/enums/productApp.js +0 -0
  158. /package/dist/libs/tatayab-entities-library/{src/utils → utils}/enums/purchaseOrderStatus.d.ts +0 -0
  159. /package/dist/libs/tatayab-entities-library/{src/utils → utils}/enums/purchaseOrderStatus.js +0 -0
  160. /package/dist/libs/tatayab-entities-library/{src/utils → utils}/enums/status.d.ts +0 -0
  161. /package/dist/libs/tatayab-entities-library/{src/utils → utils}/enums/status.js +0 -0
  162. /package/dist/libs/tatayab-entities-library/{src/utils → utils}/enums/stockMovementType.d.ts +0 -0
  163. /package/dist/libs/tatayab-entities-library/{src/utils → utils}/enums/stockMovementType.js +0 -0
  164. /package/dist/libs/tatayab-entities-library/{src/utils → utils}/enums/versiontype.d.ts +0 -0
  165. /package/dist/libs/tatayab-entities-library/{src/utils → utils}/enums/versiontype.js +0 -0
package/dist/src/main.js DELETED
@@ -1,2372 +0,0 @@
1
- /******/ (() => { // webpackBootstrap
2
- /******/ "use strict";
3
- /******/ var __webpack_modules__ = ([
4
- /* 0 */,
5
- /* 1 */
6
- /***/ ((module) => {
7
-
8
- module.exports = require("tsconfig-paths/register");
9
-
10
- /***/ }),
11
- /* 2 */
12
- /***/ ((module) => {
13
-
14
- module.exports = require("@nestjs/core");
15
-
16
- /***/ }),
17
- /* 3 */
18
- /***/ (function(__unused_webpack_module, exports, __webpack_require__) {
19
-
20
-
21
- var __decorate = (this && this.__decorate) || function (decorators, target, key, desc) {
22
- var c = arguments.length, r = c < 3 ? target : desc === null ? desc = Object.getOwnPropertyDescriptor(target, key) : desc, d;
23
- if (typeof Reflect === "object" && typeof Reflect.decorate === "function") r = Reflect.decorate(decorators, target, key, desc);
24
- 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;
25
- return c > 3 && r && Object.defineProperty(target, key, r), r;
26
- };
27
- Object.defineProperty(exports, "__esModule", ({ value: true }));
28
- exports.AppModule = void 0;
29
- const common_1 = __webpack_require__(4);
30
- const sequelize_1 = __webpack_require__(5);
31
- const config_1 = __webpack_require__(6);
32
- const tatayab_entities_library_1 = __webpack_require__(7);
33
- let AppModule = class AppModule {
34
- };
35
- exports.AppModule = AppModule;
36
- exports.AppModule = AppModule = __decorate([
37
- (0, common_1.Module)({
38
- imports: [
39
- config_1.ConfigModule.forRoot({
40
- isGlobal: true,
41
- }),
42
- sequelize_1.SequelizeModule.forRoot({
43
- dialect: 'mysql',
44
- host: process.env.MYSQL_HOST,
45
- database: process.env.MYSQL_DATABASE,
46
- username: process.env.MYSQL_USER,
47
- password: process.env.MYSQL_PASSWORD,
48
- port: 3306,
49
- models: (0, tatayab_entities_library_1.getDbModels)(),
50
- autoLoadModels: true,
51
- synchronize: true,
52
- logging: false,
53
- define: {
54
- timestamps: true,
55
- paranoid: true,
56
- },
57
- }),
58
- ],
59
- providers: [],
60
- })
61
- ], AppModule);
62
-
63
-
64
- /***/ }),
65
- /* 4 */
66
- /***/ ((module) => {
67
-
68
- module.exports = require("@nestjs/common");
69
-
70
- /***/ }),
71
- /* 5 */
72
- /***/ ((module) => {
73
-
74
- module.exports = require("@nestjs/sequelize");
75
-
76
- /***/ }),
77
- /* 6 */
78
- /***/ ((module) => {
79
-
80
- module.exports = require("@nestjs/config");
81
-
82
- /***/ }),
83
- /* 7 */
84
- /***/ ((__unused_webpack_module, exports, __webpack_require__) => {
85
-
86
-
87
- Object.defineProperty(exports, "__esModule", ({ value: true }));
88
- exports.StockMovementType = exports.PurchaseOrderStatus = exports.Gender = exports.Status = exports.Language = exports.VersionType = exports.ProductApp = exports.OsName = exports.RolePermission = exports.Permission = exports.PurchaseOrderItemStatus = exports.PurchaseOrderItem = exports.PurchaseOrder = exports.VendorProduct = exports.Vendor = exports.StockMovement = exports.InventoryStock = exports.StoreInventory = exports.Inventory = exports.ProductStore = exports.Store = exports.ProductTag = exports.Tag = 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.Country = exports.ApiKey = void 0;
89
- exports.getDbModels = getDbModels;
90
- const country_entity_1 = __webpack_require__(8);
91
- const area_entity_1 = __webpack_require__(10);
92
- const sys_role_entity_1 = __webpack_require__(11);
93
- const sys_user_entity_1 = __webpack_require__(14);
94
- const user_entity_1 = __webpack_require__(16);
95
- const userDevice_entity_1 = __webpack_require__(19);
96
- const apikey_entity_1 = __webpack_require__(21);
97
- const category_entity_1 = __webpack_require__(24);
98
- const brand_entity_1 = __webpack_require__(25);
99
- const variant_type_entity_1 = __webpack_require__(26);
100
- const variant_option_entity_1 = __webpack_require__(27);
101
- const product_entity_1 = __webpack_require__(28);
102
- const product_media_entity_1 = __webpack_require__(29);
103
- const product_variant_entity_1 = __webpack_require__(30);
104
- const product_variant_option_entity_1 = __webpack_require__(31);
105
- const tag_entity_1 = __webpack_require__(38);
106
- const product_tag_entity_1 = __webpack_require__(37);
107
- const store_entity_1 = __webpack_require__(33);
108
- const product_store_entity_1 = __webpack_require__(32);
109
- const inventory_entity_1 = __webpack_require__(35);
110
- const store_inventory_entity_1 = __webpack_require__(34);
111
- const inventory_stock_entity_1 = __webpack_require__(36);
112
- const stock_movement_entity_1 = __webpack_require__(39);
113
- const vendor_entity_1 = __webpack_require__(41);
114
- const vendor_product_entity_1 = __webpack_require__(42);
115
- const purchase_order_entity_1 = __webpack_require__(43);
116
- const purchase_order_item_entity_1 = __webpack_require__(44);
117
- const permission_entity_1 = __webpack_require__(12);
118
- const role_permission_entity_1 = __webpack_require__(13);
119
- var apikey_entity_2 = __webpack_require__(21);
120
- Object.defineProperty(exports, "ApiKey", ({ enumerable: true, get: function () { return apikey_entity_2.ApiKey; } }));
121
- var country_entity_2 = __webpack_require__(8);
122
- Object.defineProperty(exports, "Country", ({ enumerable: true, get: function () { return country_entity_2.Country; } }));
123
- var area_entity_2 = __webpack_require__(10);
124
- Object.defineProperty(exports, "Area", ({ enumerable: true, get: function () { return area_entity_2.Area; } }));
125
- var sys_role_entity_2 = __webpack_require__(11);
126
- Object.defineProperty(exports, "SysRole", ({ enumerable: true, get: function () { return sys_role_entity_2.SysRole; } }));
127
- var sys_user_entity_2 = __webpack_require__(14);
128
- Object.defineProperty(exports, "SysUser", ({ enumerable: true, get: function () { return sys_user_entity_2.SysUser; } }));
129
- var user_entity_2 = __webpack_require__(16);
130
- Object.defineProperty(exports, "User", ({ enumerable: true, get: function () { return user_entity_2.User; } }));
131
- var userDevice_entity_2 = __webpack_require__(19);
132
- Object.defineProperty(exports, "UserDevice", ({ enumerable: true, get: function () { return userDevice_entity_2.UserDevice; } }));
133
- var category_entity_2 = __webpack_require__(24);
134
- Object.defineProperty(exports, "Category", ({ enumerable: true, get: function () { return category_entity_2.Category; } }));
135
- var brand_entity_2 = __webpack_require__(25);
136
- Object.defineProperty(exports, "Brand", ({ enumerable: true, get: function () { return brand_entity_2.Brand; } }));
137
- var variant_type_entity_2 = __webpack_require__(26);
138
- Object.defineProperty(exports, "VariantType", ({ enumerable: true, get: function () { return variant_type_entity_2.VariantType; } }));
139
- var variant_option_entity_2 = __webpack_require__(27);
140
- Object.defineProperty(exports, "VariantOption", ({ enumerable: true, get: function () { return variant_option_entity_2.VariantOption; } }));
141
- var product_entity_2 = __webpack_require__(28);
142
- Object.defineProperty(exports, "Product", ({ enumerable: true, get: function () { return product_entity_2.Product; } }));
143
- var product_media_entity_2 = __webpack_require__(29);
144
- Object.defineProperty(exports, "ProductMedia", ({ enumerable: true, get: function () { return product_media_entity_2.ProductMedia; } }));
145
- Object.defineProperty(exports, "MediaType", ({ enumerable: true, get: function () { return product_media_entity_2.MediaType; } }));
146
- var product_variant_entity_2 = __webpack_require__(30);
147
- Object.defineProperty(exports, "ProductVariant", ({ enumerable: true, get: function () { return product_variant_entity_2.ProductVariant; } }));
148
- var product_variant_option_entity_2 = __webpack_require__(31);
149
- Object.defineProperty(exports, "ProductVariantOption", ({ enumerable: true, get: function () { return product_variant_option_entity_2.ProductVariantOption; } }));
150
- var tag_entity_2 = __webpack_require__(38);
151
- Object.defineProperty(exports, "Tag", ({ enumerable: true, get: function () { return tag_entity_2.Tag; } }));
152
- var product_tag_entity_2 = __webpack_require__(37);
153
- Object.defineProperty(exports, "ProductTag", ({ enumerable: true, get: function () { return product_tag_entity_2.ProductTag; } }));
154
- var store_entity_2 = __webpack_require__(33);
155
- Object.defineProperty(exports, "Store", ({ enumerable: true, get: function () { return store_entity_2.Store; } }));
156
- var product_store_entity_2 = __webpack_require__(32);
157
- Object.defineProperty(exports, "ProductStore", ({ enumerable: true, get: function () { return product_store_entity_2.ProductStore; } }));
158
- var inventory_entity_2 = __webpack_require__(35);
159
- Object.defineProperty(exports, "Inventory", ({ enumerable: true, get: function () { return inventory_entity_2.Inventory; } }));
160
- var store_inventory_entity_2 = __webpack_require__(34);
161
- Object.defineProperty(exports, "StoreInventory", ({ enumerable: true, get: function () { return store_inventory_entity_2.StoreInventory; } }));
162
- var inventory_stock_entity_2 = __webpack_require__(36);
163
- Object.defineProperty(exports, "InventoryStock", ({ enumerable: true, get: function () { return inventory_stock_entity_2.InventoryStock; } }));
164
- var stock_movement_entity_2 = __webpack_require__(39);
165
- Object.defineProperty(exports, "StockMovement", ({ enumerable: true, get: function () { return stock_movement_entity_2.StockMovement; } }));
166
- var vendor_entity_2 = __webpack_require__(41);
167
- Object.defineProperty(exports, "Vendor", ({ enumerable: true, get: function () { return vendor_entity_2.Vendor; } }));
168
- var vendor_product_entity_2 = __webpack_require__(42);
169
- Object.defineProperty(exports, "VendorProduct", ({ enumerable: true, get: function () { return vendor_product_entity_2.VendorProduct; } }));
170
- var purchase_order_entity_2 = __webpack_require__(43);
171
- Object.defineProperty(exports, "PurchaseOrder", ({ enumerable: true, get: function () { return purchase_order_entity_2.PurchaseOrder; } }));
172
- var purchase_order_item_entity_2 = __webpack_require__(44);
173
- Object.defineProperty(exports, "PurchaseOrderItem", ({ enumerable: true, get: function () { return purchase_order_item_entity_2.PurchaseOrderItem; } }));
174
- Object.defineProperty(exports, "PurchaseOrderItemStatus", ({ enumerable: true, get: function () { return purchase_order_item_entity_2.PurchaseOrderItemStatus; } }));
175
- var permission_entity_2 = __webpack_require__(12);
176
- Object.defineProperty(exports, "Permission", ({ enumerable: true, get: function () { return permission_entity_2.Permission; } }));
177
- var role_permission_entity_2 = __webpack_require__(13);
178
- Object.defineProperty(exports, "RolePermission", ({ enumerable: true, get: function () { return role_permission_entity_2.RolePermission; } }));
179
- var osName_1 = __webpack_require__(20);
180
- Object.defineProperty(exports, "OsName", ({ enumerable: true, get: function () { return osName_1.OsName; } }));
181
- var productApp_1 = __webpack_require__(23);
182
- Object.defineProperty(exports, "ProductApp", ({ enumerable: true, get: function () { return productApp_1.ProductApp; } }));
183
- var versiontype_1 = __webpack_require__(22);
184
- Object.defineProperty(exports, "VersionType", ({ enumerable: true, get: function () { return versiontype_1.VersionType; } }));
185
- var language_1 = __webpack_require__(17);
186
- Object.defineProperty(exports, "Language", ({ enumerable: true, get: function () { return language_1.Language; } }));
187
- var status_1 = __webpack_require__(15);
188
- Object.defineProperty(exports, "Status", ({ enumerable: true, get: function () { return status_1.Status; } }));
189
- var gender_1 = __webpack_require__(18);
190
- Object.defineProperty(exports, "Gender", ({ enumerable: true, get: function () { return gender_1.Gender; } }));
191
- var purchaseOrderStatus_1 = __webpack_require__(45);
192
- Object.defineProperty(exports, "PurchaseOrderStatus", ({ enumerable: true, get: function () { return purchaseOrderStatus_1.PurchaseOrderStatus; } }));
193
- var stockMovementType_1 = __webpack_require__(40);
194
- Object.defineProperty(exports, "StockMovementType", ({ enumerable: true, get: function () { return stockMovementType_1.StockMovementType; } }));
195
- function getDbModels() {
196
- return [
197
- apikey_entity_1.ApiKey,
198
- area_entity_1.Area,
199
- country_entity_1.Country,
200
- sys_role_entity_1.SysRole,
201
- sys_user_entity_1.SysUser,
202
- user_entity_1.User,
203
- userDevice_entity_1.UserDevice,
204
- category_entity_1.Category,
205
- brand_entity_1.Brand,
206
- variant_type_entity_1.VariantType,
207
- variant_option_entity_1.VariantOption,
208
- product_entity_1.Product,
209
- product_media_entity_1.ProductMedia,
210
- product_variant_entity_1.ProductVariant,
211
- product_variant_option_entity_1.ProductVariantOption,
212
- tag_entity_1.Tag,
213
- product_tag_entity_1.ProductTag,
214
- store_entity_1.Store,
215
- product_store_entity_1.ProductStore,
216
- inventory_entity_1.Inventory,
217
- store_inventory_entity_1.StoreInventory,
218
- inventory_stock_entity_1.InventoryStock,
219
- stock_movement_entity_1.StockMovement,
220
- vendor_entity_1.Vendor,
221
- vendor_product_entity_1.VendorProduct,
222
- purchase_order_entity_1.PurchaseOrder,
223
- purchase_order_item_entity_1.PurchaseOrderItem,
224
- permission_entity_1.Permission,
225
- role_permission_entity_1.RolePermission,
226
- ];
227
- }
228
-
229
-
230
- /***/ }),
231
- /* 8 */
232
- /***/ (function(__unused_webpack_module, exports, __webpack_require__) {
233
-
234
-
235
- var __decorate = (this && this.__decorate) || function (decorators, target, key, desc) {
236
- var c = arguments.length, r = c < 3 ? target : desc === null ? desc = Object.getOwnPropertyDescriptor(target, key) : desc, d;
237
- if (typeof Reflect === "object" && typeof Reflect.decorate === "function") r = Reflect.decorate(decorators, target, key, desc);
238
- 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;
239
- return c > 3 && r && Object.defineProperty(target, key, r), r;
240
- };
241
- var __metadata = (this && this.__metadata) || function (k, v) {
242
- if (typeof Reflect === "object" && typeof Reflect.metadata === "function") return Reflect.metadata(k, v);
243
- };
244
- Object.defineProperty(exports, "__esModule", ({ value: true }));
245
- exports.Country = void 0;
246
- const sequelize_typescript_1 = __webpack_require__(9);
247
- let Country = class Country extends sequelize_typescript_1.Model {
248
- };
249
- exports.Country = Country;
250
- __decorate([
251
- sequelize_typescript_1.Column,
252
- __metadata("design:type", String)
253
- ], Country.prototype, "flagIcon", void 0);
254
- __decorate([
255
- sequelize_typescript_1.Column,
256
- __metadata("design:type", String)
257
- ], Country.prototype, "isoCode", void 0);
258
- __decorate([
259
- sequelize_typescript_1.Column,
260
- __metadata("design:type", String)
261
- ], Country.prototype, "phoneExt", void 0);
262
- __decorate([
263
- sequelize_typescript_1.Column,
264
- __metadata("design:type", String)
265
- ], Country.prototype, "currency", void 0);
266
- __decorate([
267
- sequelize_typescript_1.Column,
268
- __metadata("design:type", Number)
269
- ], Country.prototype, "exchangeRateToKwd", void 0);
270
- exports.Country = Country = __decorate([
271
- sequelize_typescript_1.Table
272
- ], Country);
273
-
274
-
275
- /***/ }),
276
- /* 9 */
277
- /***/ ((module) => {
278
-
279
- module.exports = require("sequelize-typescript");
280
-
281
- /***/ }),
282
- /* 10 */
283
- /***/ (function(__unused_webpack_module, exports, __webpack_require__) {
284
-
285
-
286
- var __decorate = (this && this.__decorate) || function (decorators, target, key, desc) {
287
- var c = arguments.length, r = c < 3 ? target : desc === null ? desc = Object.getOwnPropertyDescriptor(target, key) : desc, d;
288
- if (typeof Reflect === "object" && typeof Reflect.decorate === "function") r = Reflect.decorate(decorators, target, key, desc);
289
- 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;
290
- return c > 3 && r && Object.defineProperty(target, key, r), r;
291
- };
292
- var __metadata = (this && this.__metadata) || function (k, v) {
293
- if (typeof Reflect === "object" && typeof Reflect.metadata === "function") return Reflect.metadata(k, v);
294
- };
295
- var _a;
296
- Object.defineProperty(exports, "__esModule", ({ value: true }));
297
- exports.Area = void 0;
298
- const sequelize_typescript_1 = __webpack_require__(9);
299
- const country_entity_1 = __webpack_require__(8);
300
- let Area = class Area extends sequelize_typescript_1.Model {
301
- };
302
- exports.Area = Area;
303
- __decorate([
304
- (0, sequelize_typescript_1.ForeignKey)(() => country_entity_1.Country),
305
- (0, sequelize_typescript_1.Column)({
306
- allowNull: false,
307
- validate: { notNull: { msg: 'County Id Required' } },
308
- }),
309
- __metadata("design:type", Number)
310
- ], Area.prototype, "countryId", void 0);
311
- __decorate([
312
- sequelize_typescript_1.Column,
313
- __metadata("design:type", Number)
314
- ], Area.prototype, "parentId", void 0);
315
- __decorate([
316
- (0, sequelize_typescript_1.BelongsTo)(() => country_entity_1.Country),
317
- __metadata("design:type", typeof (_a = typeof country_entity_1.Country !== "undefined" && country_entity_1.Country) === "function" ? _a : Object)
318
- ], Area.prototype, "country", void 0);
319
- exports.Area = Area = __decorate([
320
- sequelize_typescript_1.Table
321
- ], Area);
322
-
323
-
324
- /***/ }),
325
- /* 11 */
326
- /***/ (function(__unused_webpack_module, exports, __webpack_require__) {
327
-
328
-
329
- var __decorate = (this && this.__decorate) || function (decorators, target, key, desc) {
330
- var c = arguments.length, r = c < 3 ? target : desc === null ? desc = Object.getOwnPropertyDescriptor(target, key) : desc, d;
331
- if (typeof Reflect === "object" && typeof Reflect.decorate === "function") r = Reflect.decorate(decorators, target, key, desc);
332
- 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;
333
- return c > 3 && r && Object.defineProperty(target, key, r), r;
334
- };
335
- var __metadata = (this && this.__metadata) || function (k, v) {
336
- if (typeof Reflect === "object" && typeof Reflect.metadata === "function") return Reflect.metadata(k, v);
337
- };
338
- Object.defineProperty(exports, "__esModule", ({ value: true }));
339
- exports.SysRole = void 0;
340
- const sequelize_typescript_1 = __webpack_require__(9);
341
- const permission_entity_1 = __webpack_require__(12);
342
- const role_permission_entity_1 = __webpack_require__(13);
343
- let SysRole = class SysRole extends sequelize_typescript_1.Model {
344
- };
345
- exports.SysRole = SysRole;
346
- __decorate([
347
- (0, sequelize_typescript_1.Column)({ allowNull: false, unique: true }),
348
- __metadata("design:type", String)
349
- ], SysRole.prototype, "name", void 0);
350
- __decorate([
351
- (0, sequelize_typescript_1.Column)({ allowNull: true }),
352
- __metadata("design:type", String)
353
- ], SysRole.prototype, "displayName", void 0);
354
- __decorate([
355
- (0, sequelize_typescript_1.BelongsToMany)(() => permission_entity_1.Permission, () => role_permission_entity_1.RolePermission),
356
- __metadata("design:type", Array)
357
- ], SysRole.prototype, "permissions", void 0);
358
- exports.SysRole = SysRole = __decorate([
359
- sequelize_typescript_1.Table
360
- ], SysRole);
361
-
362
-
363
- /***/ }),
364
- /* 12 */
365
- /***/ (function(__unused_webpack_module, exports, __webpack_require__) {
366
-
367
-
368
- var __decorate = (this && this.__decorate) || function (decorators, target, key, desc) {
369
- var c = arguments.length, r = c < 3 ? target : desc === null ? desc = Object.getOwnPropertyDescriptor(target, key) : desc, d;
370
- if (typeof Reflect === "object" && typeof Reflect.decorate === "function") r = Reflect.decorate(decorators, target, key, desc);
371
- 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;
372
- return c > 3 && r && Object.defineProperty(target, key, r), r;
373
- };
374
- var __metadata = (this && this.__metadata) || function (k, v) {
375
- if (typeof Reflect === "object" && typeof Reflect.metadata === "function") return Reflect.metadata(k, v);
376
- };
377
- Object.defineProperty(exports, "__esModule", ({ value: true }));
378
- exports.Permission = void 0;
379
- const sequelize_typescript_1 = __webpack_require__(9);
380
- const sys_role_entity_1 = __webpack_require__(11);
381
- const role_permission_entity_1 = __webpack_require__(13);
382
- let Permission = class Permission extends sequelize_typescript_1.Model {
383
- };
384
- exports.Permission = Permission;
385
- __decorate([
386
- (0, sequelize_typescript_1.Column)({ allowNull: false, unique: true }),
387
- __metadata("design:type", String)
388
- ], Permission.prototype, "name", void 0);
389
- __decorate([
390
- (0, sequelize_typescript_1.Column)({ allowNull: false }),
391
- __metadata("design:type", String)
392
- ], Permission.prototype, "displayName", void 0);
393
- __decorate([
394
- (0, sequelize_typescript_1.Column)({ allowNull: false }),
395
- __metadata("design:type", String)
396
- ], Permission.prototype, "group", void 0);
397
- __decorate([
398
- (0, sequelize_typescript_1.BelongsToMany)(() => sys_role_entity_1.SysRole, () => role_permission_entity_1.RolePermission),
399
- __metadata("design:type", Array)
400
- ], Permission.prototype, "roles", void 0);
401
- exports.Permission = Permission = __decorate([
402
- sequelize_typescript_1.Table
403
- ], Permission);
404
-
405
-
406
- /***/ }),
407
- /* 13 */
408
- /***/ (function(__unused_webpack_module, exports, __webpack_require__) {
409
-
410
-
411
- var __decorate = (this && this.__decorate) || function (decorators, target, key, desc) {
412
- var c = arguments.length, r = c < 3 ? target : desc === null ? desc = Object.getOwnPropertyDescriptor(target, key) : desc, d;
413
- if (typeof Reflect === "object" && typeof Reflect.decorate === "function") r = Reflect.decorate(decorators, target, key, desc);
414
- 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;
415
- return c > 3 && r && Object.defineProperty(target, key, r), r;
416
- };
417
- var __metadata = (this && this.__metadata) || function (k, v) {
418
- if (typeof Reflect === "object" && typeof Reflect.metadata === "function") return Reflect.metadata(k, v);
419
- };
420
- Object.defineProperty(exports, "__esModule", ({ value: true }));
421
- exports.RolePermission = void 0;
422
- const sequelize_typescript_1 = __webpack_require__(9);
423
- const sys_role_entity_1 = __webpack_require__(11);
424
- const permission_entity_1 = __webpack_require__(12);
425
- let RolePermission = class RolePermission extends sequelize_typescript_1.Model {
426
- };
427
- exports.RolePermission = RolePermission;
428
- __decorate([
429
- (0, sequelize_typescript_1.ForeignKey)(() => sys_role_entity_1.SysRole),
430
- (0, sequelize_typescript_1.Column)({ allowNull: false }),
431
- __metadata("design:type", Number)
432
- ], RolePermission.prototype, "sysRoleId", void 0);
433
- __decorate([
434
- (0, sequelize_typescript_1.ForeignKey)(() => permission_entity_1.Permission),
435
- (0, sequelize_typescript_1.Column)({ allowNull: false }),
436
- __metadata("design:type", Number)
437
- ], RolePermission.prototype, "permissionId", void 0);
438
- exports.RolePermission = RolePermission = __decorate([
439
- sequelize_typescript_1.Table
440
- ], RolePermission);
441
-
442
-
443
- /***/ }),
444
- /* 14 */
445
- /***/ (function(__unused_webpack_module, exports, __webpack_require__) {
446
-
447
-
448
- var __decorate = (this && this.__decorate) || function (decorators, target, key, desc) {
449
- var c = arguments.length, r = c < 3 ? target : desc === null ? desc = Object.getOwnPropertyDescriptor(target, key) : desc, d;
450
- if (typeof Reflect === "object" && typeof Reflect.decorate === "function") r = Reflect.decorate(decorators, target, key, desc);
451
- 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;
452
- return c > 3 && r && Object.defineProperty(target, key, r), r;
453
- };
454
- var __metadata = (this && this.__metadata) || function (k, v) {
455
- if (typeof Reflect === "object" && typeof Reflect.metadata === "function") return Reflect.metadata(k, v);
456
- };
457
- var _a, _b, _c;
458
- Object.defineProperty(exports, "__esModule", ({ value: true }));
459
- exports.SysUser = void 0;
460
- const sequelize_typescript_1 = __webpack_require__(9);
461
- const sys_role_entity_1 = __webpack_require__(11);
462
- const status_1 = __webpack_require__(15);
463
- let SysUser = class SysUser extends sequelize_typescript_1.Model {
464
- };
465
- exports.SysUser = SysUser;
466
- __decorate([
467
- sequelize_typescript_1.Column,
468
- __metadata("design:type", String)
469
- ], SysUser.prototype, "name", void 0);
470
- __decorate([
471
- (0, sequelize_typescript_1.Column)({ allowNull: false }),
472
- __metadata("design:type", String)
473
- ], SysUser.prototype, "username", void 0);
474
- __decorate([
475
- (0, sequelize_typescript_1.Column)({ allowNull: false, unique: true }),
476
- __metadata("design:type", String)
477
- ], SysUser.prototype, "email", void 0);
478
- __decorate([
479
- (0, sequelize_typescript_1.Column)({ allowNull: false }),
480
- __metadata("design:type", String)
481
- ], SysUser.prototype, "phoneExt", void 0);
482
- __decorate([
483
- (0, sequelize_typescript_1.Column)({ allowNull: false }),
484
- __metadata("design:type", String)
485
- ], SysUser.prototype, "phone", void 0);
486
- __decorate([
487
- (0, sequelize_typescript_1.Column)({ allowNull: false }),
488
- __metadata("design:type", String)
489
- ], SysUser.prototype, "password", void 0);
490
- __decorate([
491
- sequelize_typescript_1.Column,
492
- __metadata("design:type", String)
493
- ], SysUser.prototype, "profilePicture", void 0);
494
- __decorate([
495
- (0, sequelize_typescript_1.ForeignKey)(() => sys_role_entity_1.SysRole),
496
- (0, sequelize_typescript_1.Column)({ allowNull: true }),
497
- __metadata("design:type", Number)
498
- ], SysUser.prototype, "roleId", void 0);
499
- __decorate([
500
- (0, sequelize_typescript_1.Column)({
501
- type: sequelize_typescript_1.DataType.ENUM(...Object.values(status_1.Status)),
502
- defaultValue: status_1.Status.ACTIVE,
503
- }),
504
- __metadata("design:type", typeof (_a = typeof status_1.Status !== "undefined" && status_1.Status) === "function" ? _a : Object)
505
- ], SysUser.prototype, "status", void 0);
506
- __decorate([
507
- (0, sequelize_typescript_1.Column)({ allowNull: true }),
508
- __metadata("design:type", typeof (_b = typeof Date !== "undefined" && Date) === "function" ? _b : Object)
509
- ], SysUser.prototype, "lastLogin", void 0);
510
- __decorate([
511
- (0, sequelize_typescript_1.BelongsTo)(() => sys_role_entity_1.SysRole),
512
- __metadata("design:type", typeof (_c = typeof sys_role_entity_1.SysRole !== "undefined" && sys_role_entity_1.SysRole) === "function" ? _c : Object)
513
- ], SysUser.prototype, "role", void 0);
514
- exports.SysUser = SysUser = __decorate([
515
- sequelize_typescript_1.Table
516
- ], SysUser);
517
-
518
-
519
- /***/ }),
520
- /* 15 */
521
- /***/ ((__unused_webpack_module, exports) => {
522
-
523
-
524
- Object.defineProperty(exports, "__esModule", ({ value: true }));
525
- exports.Status = void 0;
526
- var Status;
527
- (function (Status) {
528
- Status["ACTIVE"] = "active";
529
- Status["IN_ACTIVE"] = "inactive";
530
- })(Status || (exports.Status = Status = {}));
531
-
532
-
533
- /***/ }),
534
- /* 16 */
535
- /***/ (function(__unused_webpack_module, exports, __webpack_require__) {
536
-
537
-
538
- var __decorate = (this && this.__decorate) || function (decorators, target, key, desc) {
539
- var c = arguments.length, r = c < 3 ? target : desc === null ? desc = Object.getOwnPropertyDescriptor(target, key) : desc, d;
540
- if (typeof Reflect === "object" && typeof Reflect.decorate === "function") r = Reflect.decorate(decorators, target, key, desc);
541
- 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;
542
- return c > 3 && r && Object.defineProperty(target, key, r), r;
543
- };
544
- var __metadata = (this && this.__metadata) || function (k, v) {
545
- if (typeof Reflect === "object" && typeof Reflect.metadata === "function") return Reflect.metadata(k, v);
546
- };
547
- var _a, _b, _c, _d, _e, _f;
548
- Object.defineProperty(exports, "__esModule", ({ value: true }));
549
- exports.User = void 0;
550
- const sequelize_typescript_1 = __webpack_require__(9);
551
- const status_1 = __webpack_require__(15);
552
- const language_1 = __webpack_require__(17);
553
- const country_entity_1 = __webpack_require__(8);
554
- const gender_1 = __webpack_require__(18);
555
- let User = class User extends sequelize_typescript_1.Model {
556
- };
557
- exports.User = User;
558
- __decorate([
559
- sequelize_typescript_1.Column,
560
- __metadata("design:type", String)
561
- ], User.prototype, "firstName", void 0);
562
- __decorate([
563
- sequelize_typescript_1.Column,
564
- __metadata("design:type", String)
565
- ], User.prototype, "lastName", void 0);
566
- __decorate([
567
- sequelize_typescript_1.Column,
568
- __metadata("design:type", String)
569
- ], User.prototype, "password", void 0);
570
- __decorate([
571
- (0, sequelize_typescript_1.Column)({
572
- type: sequelize_typescript_1.DataType.ENUM(...Object.values(status_1.Status)),
573
- defaultValue: status_1.Status.ACTIVE,
574
- }),
575
- __metadata("design:type", typeof (_a = typeof status_1.Status !== "undefined" && status_1.Status) === "function" ? _a : Object)
576
- ], User.prototype, "status", void 0);
577
- __decorate([
578
- (0, sequelize_typescript_1.Column)({ allowNull: false, validate: { isEmail: { msg: 'Invalid Email' } } }),
579
- __metadata("design:type", String)
580
- ], User.prototype, "email", void 0);
581
- __decorate([
582
- sequelize_typescript_1.Column,
583
- __metadata("design:type", String)
584
- ], User.prototype, "phone", void 0);
585
- __decorate([
586
- sequelize_typescript_1.Column,
587
- __metadata("design:type", String)
588
- ], User.prototype, "phoneExt", void 0);
589
- __decorate([
590
- sequelize_typescript_1.Column,
591
- __metadata("design:type", typeof (_b = typeof Date !== "undefined" && Date) === "function" ? _b : Object)
592
- ], User.prototype, "birthday", void 0);
593
- __decorate([
594
- sequelize_typescript_1.Column,
595
- __metadata("design:type", String)
596
- ], User.prototype, "facebookId", void 0);
597
- __decorate([
598
- sequelize_typescript_1.Column,
599
- __metadata("design:type", String)
600
- ], User.prototype, "googleId", void 0);
601
- __decorate([
602
- sequelize_typescript_1.Column,
603
- __metadata("design:type", String)
604
- ], User.prototype, "appleId", void 0);
605
- __decorate([
606
- (0, sequelize_typescript_1.Column)({
607
- type: sequelize_typescript_1.DataType.ENUM(...Object.values(language_1.Language)),
608
- defaultValue: language_1.Language.ENGLISH,
609
- }),
610
- __metadata("design:type", typeof (_c = typeof language_1.Language !== "undefined" && language_1.Language) === "function" ? _c : Object)
611
- ], User.prototype, "preferredLanguage", void 0);
612
- __decorate([
613
- (0, sequelize_typescript_1.ForeignKey)(() => country_entity_1.Country),
614
- sequelize_typescript_1.Column,
615
- __metadata("design:type", Number)
616
- ], User.prototype, "preferredCountryId", void 0);
617
- __decorate([
618
- sequelize_typescript_1.Column,
619
- __metadata("design:type", String)
620
- ], User.prototype, "profilePic", void 0);
621
- __decorate([
622
- sequelize_typescript_1.Column,
623
- __metadata("design:type", typeof (_d = typeof Date !== "undefined" && Date) === "function" ? _d : Object)
624
- ], User.prototype, "lastLogin", void 0);
625
- __decorate([
626
- (0, sequelize_typescript_1.Column)({ allowNull: false, defaultValue: false }),
627
- __metadata("design:type", Boolean)
628
- ], User.prototype, "isBlocked", void 0);
629
- __decorate([
630
- (0, sequelize_typescript_1.Column)({ defaultValue: false }),
631
- __metadata("design:type", Boolean)
632
- ], User.prototype, "isVerified", void 0);
633
- __decorate([
634
- sequelize_typescript_1.Column,
635
- __metadata("design:type", String)
636
- ], User.prototype, "refCode", void 0);
637
- __decorate([
638
- (0, sequelize_typescript_1.Column)({
639
- type: sequelize_typescript_1.DataType.ENUM(...Object.values(gender_1.Gender)),
640
- defaultValue: gender_1.Gender.PREFER_NOT_TO_SAY,
641
- }),
642
- __metadata("design:type", typeof (_e = typeof gender_1.Gender !== "undefined" && gender_1.Gender) === "function" ? _e : Object)
643
- ], User.prototype, "gender", void 0);
644
- __decorate([
645
- (0, sequelize_typescript_1.BelongsTo)(() => country_entity_1.Country),
646
- __metadata("design:type", typeof (_f = typeof country_entity_1.Country !== "undefined" && country_entity_1.Country) === "function" ? _f : Object)
647
- ], User.prototype, "country", void 0);
648
- exports.User = User = __decorate([
649
- sequelize_typescript_1.Table
650
- ], User);
651
-
652
-
653
- /***/ }),
654
- /* 17 */
655
- /***/ ((__unused_webpack_module, exports) => {
656
-
657
-
658
- Object.defineProperty(exports, "__esModule", ({ value: true }));
659
- exports.Language = void 0;
660
- var Language;
661
- (function (Language) {
662
- Language["ENGLISH"] = "en";
663
- Language["ARABIC"] = "ar";
664
- })(Language || (exports.Language = Language = {}));
665
-
666
-
667
- /***/ }),
668
- /* 18 */
669
- /***/ ((__unused_webpack_module, exports) => {
670
-
671
-
672
- Object.defineProperty(exports, "__esModule", ({ value: true }));
673
- exports.Gender = void 0;
674
- var Gender;
675
- (function (Gender) {
676
- Gender["MALE"] = "Male";
677
- Gender["FEMALE"] = "Female";
678
- Gender["PREFER_NOT_TO_SAY"] = "Prefer not to say";
679
- })(Gender || (exports.Gender = Gender = {}));
680
-
681
-
682
- /***/ }),
683
- /* 19 */
684
- /***/ (function(__unused_webpack_module, exports, __webpack_require__) {
685
-
686
-
687
- var __decorate = (this && this.__decorate) || function (decorators, target, key, desc) {
688
- var c = arguments.length, r = c < 3 ? target : desc === null ? desc = Object.getOwnPropertyDescriptor(target, key) : desc, d;
689
- if (typeof Reflect === "object" && typeof Reflect.decorate === "function") r = Reflect.decorate(decorators, target, key, desc);
690
- 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;
691
- return c > 3 && r && Object.defineProperty(target, key, r), r;
692
- };
693
- var __metadata = (this && this.__metadata) || function (k, v) {
694
- if (typeof Reflect === "object" && typeof Reflect.metadata === "function") return Reflect.metadata(k, v);
695
- };
696
- var _a, _b;
697
- Object.defineProperty(exports, "__esModule", ({ value: true }));
698
- exports.UserDevice = void 0;
699
- const sequelize_typescript_1 = __webpack_require__(9);
700
- const user_entity_1 = __webpack_require__(16);
701
- const status_1 = __webpack_require__(15);
702
- const osName_1 = __webpack_require__(20);
703
- let UserDevice = class UserDevice extends sequelize_typescript_1.Model {
704
- };
705
- exports.UserDevice = UserDevice;
706
- __decorate([
707
- (0, sequelize_typescript_1.ForeignKey)(() => user_entity_1.User),
708
- sequelize_typescript_1.Column,
709
- __metadata("design:type", Number)
710
- ], UserDevice.prototype, "userId", void 0);
711
- __decorate([
712
- sequelize_typescript_1.Column,
713
- __metadata("design:type", String)
714
- ], UserDevice.prototype, "deviceId", void 0);
715
- __decorate([
716
- sequelize_typescript_1.Column,
717
- __metadata("design:type", String)
718
- ], UserDevice.prototype, "fcmToken", void 0);
719
- __decorate([
720
- (0, sequelize_typescript_1.Column)({
721
- type: sequelize_typescript_1.DataType.ENUM(...Object.values(status_1.Status)),
722
- defaultValue: status_1.Status.ACTIVE,
723
- }),
724
- __metadata("design:type", typeof (_a = typeof status_1.Status !== "undefined" && status_1.Status) === "function" ? _a : Object)
725
- ], UserDevice.prototype, "status", void 0);
726
- __decorate([
727
- (0, sequelize_typescript_1.Column)({
728
- type: sequelize_typescript_1.DataType.ENUM(...Object.values(osName_1.OsName)),
729
- allowNull: true,
730
- }),
731
- __metadata("design:type", String)
732
- ], UserDevice.prototype, "osSystem", void 0);
733
- __decorate([
734
- (0, sequelize_typescript_1.BelongsTo)(() => user_entity_1.User),
735
- __metadata("design:type", typeof (_b = typeof user_entity_1.User !== "undefined" && user_entity_1.User) === "function" ? _b : Object)
736
- ], UserDevice.prototype, "user", void 0);
737
- exports.UserDevice = UserDevice = __decorate([
738
- sequelize_typescript_1.Table
739
- ], UserDevice);
740
-
741
-
742
- /***/ }),
743
- /* 20 */
744
- /***/ ((__unused_webpack_module, exports) => {
745
-
746
-
747
- Object.defineProperty(exports, "__esModule", ({ value: true }));
748
- exports.OsName = void 0;
749
- var OsName;
750
- (function (OsName) {
751
- OsName["ANDROID"] = "android";
752
- OsName["IOS"] = "iOS";
753
- OsName["WEB"] = "web";
754
- })(OsName || (exports.OsName = OsName = {}));
755
-
756
-
757
- /***/ }),
758
- /* 21 */
759
- /***/ (function(__unused_webpack_module, exports, __webpack_require__) {
760
-
761
-
762
- var __decorate = (this && this.__decorate) || function (decorators, target, key, desc) {
763
- var c = arguments.length, r = c < 3 ? target : desc === null ? desc = Object.getOwnPropertyDescriptor(target, key) : desc, d;
764
- if (typeof Reflect === "object" && typeof Reflect.decorate === "function") r = Reflect.decorate(decorators, target, key, desc);
765
- 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;
766
- return c > 3 && r && Object.defineProperty(target, key, r), r;
767
- };
768
- var __metadata = (this && this.__metadata) || function (k, v) {
769
- if (typeof Reflect === "object" && typeof Reflect.metadata === "function") return Reflect.metadata(k, v);
770
- };
771
- var _a, _b, _c, _d, _e;
772
- Object.defineProperty(exports, "__esModule", ({ value: true }));
773
- exports.ApiKey = void 0;
774
- const sequelize_typescript_1 = __webpack_require__(9);
775
- const status_1 = __webpack_require__(15);
776
- const versiontype_1 = __webpack_require__(22);
777
- const osName_1 = __webpack_require__(20);
778
- const productApp_1 = __webpack_require__(23);
779
- let ApiKey = class ApiKey extends sequelize_typescript_1.Model {
780
- };
781
- exports.ApiKey = ApiKey;
782
- __decorate([
783
- sequelize_typescript_1.Column,
784
- __metadata("design:type", String)
785
- ], ApiKey.prototype, "hashedApiKey", void 0);
786
- __decorate([
787
- (0, sequelize_typescript_1.Column)({ type: sequelize_typescript_1.DataType.ENUM(...Object.values(osName_1.OsName)) }),
788
- __metadata("design:type", typeof (_a = typeof osName_1.OsName !== "undefined" && osName_1.OsName) === "function" ? _a : Object)
789
- ], ApiKey.prototype, "osName", void 0);
790
- __decorate([
791
- (0, sequelize_typescript_1.Column)({ type: sequelize_typescript_1.DataType.ENUM(...Object.values(productApp_1.ProductApp)) }),
792
- __metadata("design:type", typeof (_b = typeof productApp_1.ProductApp !== "undefined" && productApp_1.ProductApp) === "function" ? _b : Object)
793
- ], ApiKey.prototype, "appName", void 0);
794
- __decorate([
795
- sequelize_typescript_1.Column,
796
- __metadata("design:type", String)
797
- ], ApiKey.prototype, "appVersion", void 0);
798
- __decorate([
799
- sequelize_typescript_1.Column,
800
- __metadata("design:type", typeof (_c = typeof Date !== "undefined" && Date) === "function" ? _c : Object)
801
- ], ApiKey.prototype, "expiryDate", void 0);
802
- __decorate([
803
- (0, sequelize_typescript_1.Column)({
804
- type: sequelize_typescript_1.DataType.ENUM(...Object.values(status_1.Status)),
805
- defaultValue: status_1.Status.ACTIVE,
806
- }),
807
- __metadata("design:type", typeof (_d = typeof status_1.Status !== "undefined" && status_1.Status) === "function" ? _d : Object)
808
- ], ApiKey.prototype, "status", void 0);
809
- __decorate([
810
- (0, sequelize_typescript_1.Column)({ allowNull: false, defaultValue: false }),
811
- __metadata("design:type", Boolean)
812
- ], ApiKey.prototype, "isReleased", void 0);
813
- __decorate([
814
- (0, sequelize_typescript_1.Column)({
815
- type: sequelize_typescript_1.DataType.ENUM(...Object.values(versiontype_1.VersionType)),
816
- defaultValue: versiontype_1.VersionType.OPTIONAL,
817
- }),
818
- __metadata("design:type", typeof (_e = typeof versiontype_1.VersionType !== "undefined" && versiontype_1.VersionType) === "function" ? _e : Object)
819
- ], ApiKey.prototype, "versionType", void 0);
820
- exports.ApiKey = ApiKey = __decorate([
821
- sequelize_typescript_1.Table
822
- ], ApiKey);
823
-
824
-
825
- /***/ }),
826
- /* 22 */
827
- /***/ ((__unused_webpack_module, exports) => {
828
-
829
-
830
- Object.defineProperty(exports, "__esModule", ({ value: true }));
831
- exports.VersionType = void 0;
832
- var VersionType;
833
- (function (VersionType) {
834
- VersionType["OPTIONAL"] = "optional";
835
- VersionType["MANDATORY"] = "mandatory";
836
- })(VersionType || (exports.VersionType = VersionType = {}));
837
-
838
-
839
- /***/ }),
840
- /* 23 */
841
- /***/ ((__unused_webpack_module, exports) => {
842
-
843
-
844
- Object.defineProperty(exports, "__esModule", ({ value: true }));
845
- exports.ProductApp = void 0;
846
- var ProductApp;
847
- (function (ProductApp) {
848
- ProductApp["DASHBOARD"] = "dashboard";
849
- ProductApp["USER_APP"] = "userapp";
850
- })(ProductApp || (exports.ProductApp = ProductApp = {}));
851
-
852
-
853
- /***/ }),
854
- /* 24 */
855
- /***/ (function(__unused_webpack_module, exports, __webpack_require__) {
856
-
857
-
858
- var __decorate = (this && this.__decorate) || function (decorators, target, key, desc) {
859
- var c = arguments.length, r = c < 3 ? target : desc === null ? desc = Object.getOwnPropertyDescriptor(target, key) : desc, d;
860
- if (typeof Reflect === "object" && typeof Reflect.decorate === "function") r = Reflect.decorate(decorators, target, key, desc);
861
- 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;
862
- return c > 3 && r && Object.defineProperty(target, key, r), r;
863
- };
864
- var __metadata = (this && this.__metadata) || function (k, v) {
865
- if (typeof Reflect === "object" && typeof Reflect.metadata === "function") return Reflect.metadata(k, v);
866
- };
867
- var _a;
868
- Object.defineProperty(exports, "__esModule", ({ value: true }));
869
- exports.Category = void 0;
870
- const sequelize_typescript_1 = __webpack_require__(9);
871
- const status_1 = __webpack_require__(15);
872
- let Category = class Category extends sequelize_typescript_1.Model {
873
- };
874
- exports.Category = Category;
875
- __decorate([
876
- (0, sequelize_typescript_1.Column)({ allowNull: false }),
877
- __metadata("design:type", String)
878
- ], Category.prototype, "nameEn", void 0);
879
- __decorate([
880
- (0, sequelize_typescript_1.Column)({ allowNull: false }),
881
- __metadata("design:type", String)
882
- ], Category.prototype, "nameAr", void 0);
883
- __decorate([
884
- (0, sequelize_typescript_1.Column)({ type: sequelize_typescript_1.DataType.TEXT, allowNull: true }),
885
- __metadata("design:type", String)
886
- ], Category.prototype, "descriptionEn", void 0);
887
- __decorate([
888
- (0, sequelize_typescript_1.Column)({ type: sequelize_typescript_1.DataType.TEXT, allowNull: true }),
889
- __metadata("design:type", String)
890
- ], Category.prototype, "descriptionAr", void 0);
891
- __decorate([
892
- (0, sequelize_typescript_1.Column)({ allowNull: true }),
893
- __metadata("design:type", String)
894
- ], Category.prototype, "image", void 0);
895
- __decorate([
896
- (0, sequelize_typescript_1.Column)({ defaultValue: 0 }),
897
- __metadata("design:type", Number)
898
- ], Category.prototype, "sortOrder", void 0);
899
- __decorate([
900
- (0, sequelize_typescript_1.Column)({
901
- type: sequelize_typescript_1.DataType.ENUM(...Object.values(status_1.Status)),
902
- defaultValue: status_1.Status.ACTIVE,
903
- }),
904
- __metadata("design:type", typeof (_a = typeof status_1.Status !== "undefined" && status_1.Status) === "function" ? _a : Object)
905
- ], Category.prototype, "status", void 0);
906
- __decorate([
907
- (0, sequelize_typescript_1.ForeignKey)(() => Category),
908
- (0, sequelize_typescript_1.Column)({ allowNull: true }),
909
- __metadata("design:type", Number)
910
- ], Category.prototype, "parentId", void 0);
911
- __decorate([
912
- (0, sequelize_typescript_1.BelongsTo)(() => Category, { foreignKey: 'parentId', as: 'parent' }),
913
- __metadata("design:type", Category)
914
- ], Category.prototype, "parent", void 0);
915
- __decorate([
916
- (0, sequelize_typescript_1.HasMany)(() => Category, { foreignKey: 'parentId', as: 'children' }),
917
- __metadata("design:type", Array)
918
- ], Category.prototype, "children", void 0);
919
- exports.Category = Category = __decorate([
920
- sequelize_typescript_1.Table
921
- ], Category);
922
-
923
-
924
- /***/ }),
925
- /* 25 */
926
- /***/ (function(__unused_webpack_module, exports, __webpack_require__) {
927
-
928
-
929
- var __decorate = (this && this.__decorate) || function (decorators, target, key, desc) {
930
- var c = arguments.length, r = c < 3 ? target : desc === null ? desc = Object.getOwnPropertyDescriptor(target, key) : desc, d;
931
- if (typeof Reflect === "object" && typeof Reflect.decorate === "function") r = Reflect.decorate(decorators, target, key, desc);
932
- 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;
933
- return c > 3 && r && Object.defineProperty(target, key, r), r;
934
- };
935
- var __metadata = (this && this.__metadata) || function (k, v) {
936
- if (typeof Reflect === "object" && typeof Reflect.metadata === "function") return Reflect.metadata(k, v);
937
- };
938
- var _a;
939
- Object.defineProperty(exports, "__esModule", ({ value: true }));
940
- exports.Brand = void 0;
941
- const sequelize_typescript_1 = __webpack_require__(9);
942
- const status_1 = __webpack_require__(15);
943
- let Brand = class Brand extends sequelize_typescript_1.Model {
944
- };
945
- exports.Brand = Brand;
946
- __decorate([
947
- (0, sequelize_typescript_1.Column)({ allowNull: false }),
948
- __metadata("design:type", String)
949
- ], Brand.prototype, "nameEn", void 0);
950
- __decorate([
951
- (0, sequelize_typescript_1.Column)({ allowNull: false }),
952
- __metadata("design:type", String)
953
- ], Brand.prototype, "nameAr", void 0);
954
- __decorate([
955
- (0, sequelize_typescript_1.Column)({ type: sequelize_typescript_1.DataType.TEXT, allowNull: true }),
956
- __metadata("design:type", String)
957
- ], Brand.prototype, "descriptionEn", void 0);
958
- __decorate([
959
- (0, sequelize_typescript_1.Column)({ type: sequelize_typescript_1.DataType.TEXT, allowNull: true }),
960
- __metadata("design:type", String)
961
- ], Brand.prototype, "descriptionAr", void 0);
962
- __decorate([
963
- (0, sequelize_typescript_1.Column)({ allowNull: true }),
964
- __metadata("design:type", String)
965
- ], Brand.prototype, "logo", void 0);
966
- __decorate([
967
- (0, sequelize_typescript_1.Column)({ allowNull: true }),
968
- __metadata("design:type", String)
969
- ], Brand.prototype, "website", void 0);
970
- __decorate([
971
- (0, sequelize_typescript_1.Column)({ defaultValue: 0 }),
972
- __metadata("design:type", Number)
973
- ], Brand.prototype, "sortOrder", void 0);
974
- __decorate([
975
- (0, sequelize_typescript_1.Column)({
976
- type: sequelize_typescript_1.DataType.ENUM(...Object.values(status_1.Status)),
977
- defaultValue: status_1.Status.ACTIVE,
978
- }),
979
- __metadata("design:type", typeof (_a = typeof status_1.Status !== "undefined" && status_1.Status) === "function" ? _a : Object)
980
- ], Brand.prototype, "status", void 0);
981
- exports.Brand = Brand = __decorate([
982
- sequelize_typescript_1.Table
983
- ], Brand);
984
-
985
-
986
- /***/ }),
987
- /* 26 */
988
- /***/ (function(__unused_webpack_module, exports, __webpack_require__) {
989
-
990
-
991
- var __decorate = (this && this.__decorate) || function (decorators, target, key, desc) {
992
- var c = arguments.length, r = c < 3 ? target : desc === null ? desc = Object.getOwnPropertyDescriptor(target, key) : desc, d;
993
- if (typeof Reflect === "object" && typeof Reflect.decorate === "function") r = Reflect.decorate(decorators, target, key, desc);
994
- 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;
995
- return c > 3 && r && Object.defineProperty(target, key, r), r;
996
- };
997
- var __metadata = (this && this.__metadata) || function (k, v) {
998
- if (typeof Reflect === "object" && typeof Reflect.metadata === "function") return Reflect.metadata(k, v);
999
- };
1000
- var _a;
1001
- Object.defineProperty(exports, "__esModule", ({ value: true }));
1002
- exports.VariantType = void 0;
1003
- const sequelize_typescript_1 = __webpack_require__(9);
1004
- const status_1 = __webpack_require__(15);
1005
- const sequelize_typescript_2 = __webpack_require__(9);
1006
- let VariantType = class VariantType extends sequelize_typescript_1.Model {
1007
- };
1008
- exports.VariantType = VariantType;
1009
- __decorate([
1010
- (0, sequelize_typescript_1.Column)({ allowNull: false }),
1011
- __metadata("design:type", String)
1012
- ], VariantType.prototype, "nameEn", void 0);
1013
- __decorate([
1014
- (0, sequelize_typescript_1.Column)({ allowNull: false }),
1015
- __metadata("design:type", String)
1016
- ], VariantType.prototype, "nameAr", void 0);
1017
- __decorate([
1018
- (0, sequelize_typescript_1.Column)({
1019
- type: sequelize_typescript_2.DataType.ENUM(...Object.values(status_1.Status)),
1020
- defaultValue: status_1.Status.ACTIVE,
1021
- }),
1022
- __metadata("design:type", typeof (_a = typeof status_1.Status !== "undefined" && status_1.Status) === "function" ? _a : Object)
1023
- ], VariantType.prototype, "status", void 0);
1024
- exports.VariantType = VariantType = __decorate([
1025
- sequelize_typescript_1.Table
1026
- ], VariantType);
1027
-
1028
-
1029
- /***/ }),
1030
- /* 27 */
1031
- /***/ (function(__unused_webpack_module, exports, __webpack_require__) {
1032
-
1033
-
1034
- var __decorate = (this && this.__decorate) || function (decorators, target, key, desc) {
1035
- var c = arguments.length, r = c < 3 ? target : desc === null ? desc = Object.getOwnPropertyDescriptor(target, key) : desc, d;
1036
- if (typeof Reflect === "object" && typeof Reflect.decorate === "function") r = Reflect.decorate(decorators, target, key, desc);
1037
- 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;
1038
- return c > 3 && r && Object.defineProperty(target, key, r), r;
1039
- };
1040
- var __metadata = (this && this.__metadata) || function (k, v) {
1041
- if (typeof Reflect === "object" && typeof Reflect.metadata === "function") return Reflect.metadata(k, v);
1042
- };
1043
- var _a, _b;
1044
- Object.defineProperty(exports, "__esModule", ({ value: true }));
1045
- exports.VariantOption = void 0;
1046
- const sequelize_typescript_1 = __webpack_require__(9);
1047
- const variant_type_entity_1 = __webpack_require__(26);
1048
- const status_1 = __webpack_require__(15);
1049
- let VariantOption = class VariantOption extends sequelize_typescript_1.Model {
1050
- };
1051
- exports.VariantOption = VariantOption;
1052
- __decorate([
1053
- (0, sequelize_typescript_1.ForeignKey)(() => variant_type_entity_1.VariantType),
1054
- (0, sequelize_typescript_1.Column)({ allowNull: false }),
1055
- __metadata("design:type", Number)
1056
- ], VariantOption.prototype, "variantTypeId", void 0);
1057
- __decorate([
1058
- (0, sequelize_typescript_1.Column)({ allowNull: false }),
1059
- __metadata("design:type", String)
1060
- ], VariantOption.prototype, "nameEn", void 0);
1061
- __decorate([
1062
- (0, sequelize_typescript_1.Column)({ allowNull: false }),
1063
- __metadata("design:type", String)
1064
- ], VariantOption.prototype, "nameAr", void 0);
1065
- __decorate([
1066
- (0, sequelize_typescript_1.Column)({ defaultValue: 0 }),
1067
- __metadata("design:type", Number)
1068
- ], VariantOption.prototype, "sortOrder", void 0);
1069
- __decorate([
1070
- (0, sequelize_typescript_1.Column)({
1071
- type: sequelize_typescript_1.DataType.ENUM(...Object.values(status_1.Status)),
1072
- defaultValue: status_1.Status.ACTIVE,
1073
- }),
1074
- __metadata("design:type", typeof (_a = typeof status_1.Status !== "undefined" && status_1.Status) === "function" ? _a : Object)
1075
- ], VariantOption.prototype, "status", void 0);
1076
- __decorate([
1077
- (0, sequelize_typescript_1.BelongsTo)(() => variant_type_entity_1.VariantType),
1078
- __metadata("design:type", typeof (_b = typeof variant_type_entity_1.VariantType !== "undefined" && variant_type_entity_1.VariantType) === "function" ? _b : Object)
1079
- ], VariantOption.prototype, "variantType", void 0);
1080
- exports.VariantOption = VariantOption = __decorate([
1081
- sequelize_typescript_1.Table
1082
- ], VariantOption);
1083
-
1084
-
1085
- /***/ }),
1086
- /* 28 */
1087
- /***/ (function(__unused_webpack_module, exports, __webpack_require__) {
1088
-
1089
-
1090
- var __decorate = (this && this.__decorate) || function (decorators, target, key, desc) {
1091
- var c = arguments.length, r = c < 3 ? target : desc === null ? desc = Object.getOwnPropertyDescriptor(target, key) : desc, d;
1092
- if (typeof Reflect === "object" && typeof Reflect.decorate === "function") r = Reflect.decorate(decorators, target, key, desc);
1093
- 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;
1094
- return c > 3 && r && Object.defineProperty(target, key, r), r;
1095
- };
1096
- var __metadata = (this && this.__metadata) || function (k, v) {
1097
- if (typeof Reflect === "object" && typeof Reflect.metadata === "function") return Reflect.metadata(k, v);
1098
- };
1099
- var _a, _b, _c;
1100
- Object.defineProperty(exports, "__esModule", ({ value: true }));
1101
- exports.Product = void 0;
1102
- const sequelize_typescript_1 = __webpack_require__(9);
1103
- const brand_entity_1 = __webpack_require__(25);
1104
- const category_entity_1 = __webpack_require__(24);
1105
- const product_media_entity_1 = __webpack_require__(29);
1106
- const product_variant_entity_1 = __webpack_require__(30);
1107
- const product_store_entity_1 = __webpack_require__(32);
1108
- const product_tag_entity_1 = __webpack_require__(37);
1109
- const store_entity_1 = __webpack_require__(33);
1110
- const tag_entity_1 = __webpack_require__(38);
1111
- const status_1 = __webpack_require__(15);
1112
- let Product = class Product extends sequelize_typescript_1.Model {
1113
- };
1114
- exports.Product = Product;
1115
- __decorate([
1116
- (0, sequelize_typescript_1.Column)({ allowNull: false }),
1117
- __metadata("design:type", String)
1118
- ], Product.prototype, "nameEn", void 0);
1119
- __decorate([
1120
- (0, sequelize_typescript_1.Column)({ allowNull: false }),
1121
- __metadata("design:type", String)
1122
- ], Product.prototype, "nameAr", void 0);
1123
- __decorate([
1124
- (0, sequelize_typescript_1.Column)({ type: sequelize_typescript_1.DataType.TEXT, allowNull: true }),
1125
- __metadata("design:type", String)
1126
- ], Product.prototype, "descriptionEn", void 0);
1127
- __decorate([
1128
- (0, sequelize_typescript_1.Column)({ type: sequelize_typescript_1.DataType.TEXT, allowNull: true }),
1129
- __metadata("design:type", String)
1130
- ], Product.prototype, "descriptionAr", void 0);
1131
- __decorate([
1132
- (0, sequelize_typescript_1.Column)({ allowNull: true }),
1133
- __metadata("design:type", String)
1134
- ], Product.prototype, "sku", void 0);
1135
- __decorate([
1136
- (0, sequelize_typescript_1.Column)({ allowNull: true }),
1137
- __metadata("design:type", String)
1138
- ], Product.prototype, "barcode", void 0);
1139
- __decorate([
1140
- (0, sequelize_typescript_1.Column)({ type: sequelize_typescript_1.DataType.DECIMAL(10, 3), allowNull: false, defaultValue: 0 }),
1141
- __metadata("design:type", Number)
1142
- ], Product.prototype, "defaultPrice", void 0);
1143
- __decorate([
1144
- (0, sequelize_typescript_1.ForeignKey)(() => brand_entity_1.Brand),
1145
- (0, sequelize_typescript_1.Column)({ allowNull: true }),
1146
- __metadata("design:type", Number)
1147
- ], Product.prototype, "brandId", void 0);
1148
- __decorate([
1149
- (0, sequelize_typescript_1.ForeignKey)(() => category_entity_1.Category),
1150
- (0, sequelize_typescript_1.Column)({ allowNull: true }),
1151
- __metadata("design:type", Number)
1152
- ], Product.prototype, "categoryId", void 0);
1153
- __decorate([
1154
- (0, sequelize_typescript_1.Column)({ defaultValue: 0 }),
1155
- __metadata("design:type", Number)
1156
- ], Product.prototype, "sortOrder", void 0);
1157
- __decorate([
1158
- (0, sequelize_typescript_1.Column)({ defaultValue: false }),
1159
- __metadata("design:type", Boolean)
1160
- ], Product.prototype, "isFeatured", void 0);
1161
- __decorate([
1162
- (0, sequelize_typescript_1.Column)({ defaultValue: false }),
1163
- __metadata("design:type", Boolean)
1164
- ], Product.prototype, "hasVariants", void 0);
1165
- __decorate([
1166
- (0, sequelize_typescript_1.Column)({
1167
- type: sequelize_typescript_1.DataType.ENUM(...Object.values(status_1.Status)),
1168
- defaultValue: status_1.Status.ACTIVE,
1169
- }),
1170
- __metadata("design:type", typeof (_a = typeof status_1.Status !== "undefined" && status_1.Status) === "function" ? _a : Object)
1171
- ], Product.prototype, "status", void 0);
1172
- __decorate([
1173
- (0, sequelize_typescript_1.BelongsTo)(() => brand_entity_1.Brand),
1174
- __metadata("design:type", typeof (_b = typeof brand_entity_1.Brand !== "undefined" && brand_entity_1.Brand) === "function" ? _b : Object)
1175
- ], Product.prototype, "brand", void 0);
1176
- __decorate([
1177
- (0, sequelize_typescript_1.BelongsTo)(() => category_entity_1.Category),
1178
- __metadata("design:type", typeof (_c = typeof category_entity_1.Category !== "undefined" && category_entity_1.Category) === "function" ? _c : Object)
1179
- ], Product.prototype, "category", void 0);
1180
- __decorate([
1181
- (0, sequelize_typescript_1.HasMany)(() => product_media_entity_1.ProductMedia),
1182
- __metadata("design:type", Array)
1183
- ], Product.prototype, "media", void 0);
1184
- __decorate([
1185
- (0, sequelize_typescript_1.HasMany)(() => product_variant_entity_1.ProductVariant),
1186
- __metadata("design:type", Array)
1187
- ], Product.prototype, "variants", void 0);
1188
- __decorate([
1189
- (0, sequelize_typescript_1.BelongsToMany)(() => store_entity_1.Store, () => product_store_entity_1.ProductStore),
1190
- __metadata("design:type", Array)
1191
- ], Product.prototype, "stores", void 0);
1192
- __decorate([
1193
- (0, sequelize_typescript_1.BelongsToMany)(() => tag_entity_1.Tag, () => product_tag_entity_1.ProductTag),
1194
- __metadata("design:type", Array)
1195
- ], Product.prototype, "tags", void 0);
1196
- exports.Product = Product = __decorate([
1197
- sequelize_typescript_1.Table
1198
- ], Product);
1199
-
1200
-
1201
- /***/ }),
1202
- /* 29 */
1203
- /***/ (function(__unused_webpack_module, exports, __webpack_require__) {
1204
-
1205
-
1206
- var __decorate = (this && this.__decorate) || function (decorators, target, key, desc) {
1207
- var c = arguments.length, r = c < 3 ? target : desc === null ? desc = Object.getOwnPropertyDescriptor(target, key) : desc, d;
1208
- if (typeof Reflect === "object" && typeof Reflect.decorate === "function") r = Reflect.decorate(decorators, target, key, desc);
1209
- 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;
1210
- return c > 3 && r && Object.defineProperty(target, key, r), r;
1211
- };
1212
- var __metadata = (this && this.__metadata) || function (k, v) {
1213
- if (typeof Reflect === "object" && typeof Reflect.metadata === "function") return Reflect.metadata(k, v);
1214
- };
1215
- var _a;
1216
- Object.defineProperty(exports, "__esModule", ({ value: true }));
1217
- exports.ProductMedia = exports.MediaType = void 0;
1218
- const sequelize_typescript_1 = __webpack_require__(9);
1219
- const product_entity_1 = __webpack_require__(28);
1220
- var MediaType;
1221
- (function (MediaType) {
1222
- MediaType["IMAGE"] = "image";
1223
- MediaType["VIDEO"] = "video";
1224
- })(MediaType || (exports.MediaType = MediaType = {}));
1225
- let ProductMedia = class ProductMedia extends sequelize_typescript_1.Model {
1226
- };
1227
- exports.ProductMedia = ProductMedia;
1228
- __decorate([
1229
- (0, sequelize_typescript_1.ForeignKey)(() => product_entity_1.Product),
1230
- (0, sequelize_typescript_1.Column)({ allowNull: false }),
1231
- __metadata("design:type", Number)
1232
- ], ProductMedia.prototype, "productId", void 0);
1233
- __decorate([
1234
- (0, sequelize_typescript_1.Column)({ allowNull: false }),
1235
- __metadata("design:type", String)
1236
- ], ProductMedia.prototype, "url", void 0);
1237
- __decorate([
1238
- (0, sequelize_typescript_1.Column)({
1239
- type: sequelize_typescript_1.DataType.ENUM(...Object.values(MediaType)),
1240
- defaultValue: MediaType.IMAGE,
1241
- }),
1242
- __metadata("design:type", String)
1243
- ], ProductMedia.prototype, "type", void 0);
1244
- __decorate([
1245
- (0, sequelize_typescript_1.Column)({ defaultValue: false }),
1246
- __metadata("design:type", Boolean)
1247
- ], ProductMedia.prototype, "isDefault", void 0);
1248
- __decorate([
1249
- (0, sequelize_typescript_1.Column)({ defaultValue: 0 }),
1250
- __metadata("design:type", Number)
1251
- ], ProductMedia.prototype, "sortOrder", void 0);
1252
- __decorate([
1253
- (0, sequelize_typescript_1.Column)({ allowNull: true }),
1254
- __metadata("design:type", String)
1255
- ], ProductMedia.prototype, "altEn", void 0);
1256
- __decorate([
1257
- (0, sequelize_typescript_1.Column)({ allowNull: true }),
1258
- __metadata("design:type", String)
1259
- ], ProductMedia.prototype, "altAr", void 0);
1260
- __decorate([
1261
- (0, sequelize_typescript_1.BelongsTo)(() => product_entity_1.Product),
1262
- __metadata("design:type", typeof (_a = typeof product_entity_1.Product !== "undefined" && product_entity_1.Product) === "function" ? _a : Object)
1263
- ], ProductMedia.prototype, "product", void 0);
1264
- exports.ProductMedia = ProductMedia = __decorate([
1265
- sequelize_typescript_1.Table
1266
- ], ProductMedia);
1267
-
1268
-
1269
- /***/ }),
1270
- /* 30 */
1271
- /***/ (function(__unused_webpack_module, exports, __webpack_require__) {
1272
-
1273
-
1274
- var __decorate = (this && this.__decorate) || function (decorators, target, key, desc) {
1275
- var c = arguments.length, r = c < 3 ? target : desc === null ? desc = Object.getOwnPropertyDescriptor(target, key) : desc, d;
1276
- if (typeof Reflect === "object" && typeof Reflect.decorate === "function") r = Reflect.decorate(decorators, target, key, desc);
1277
- 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;
1278
- return c > 3 && r && Object.defineProperty(target, key, r), r;
1279
- };
1280
- var __metadata = (this && this.__metadata) || function (k, v) {
1281
- if (typeof Reflect === "object" && typeof Reflect.metadata === "function") return Reflect.metadata(k, v);
1282
- };
1283
- var _a, _b;
1284
- Object.defineProperty(exports, "__esModule", ({ value: true }));
1285
- exports.ProductVariant = void 0;
1286
- const sequelize_typescript_1 = __webpack_require__(9);
1287
- const product_entity_1 = __webpack_require__(28);
1288
- const variant_option_entity_1 = __webpack_require__(27);
1289
- const product_variant_option_entity_1 = __webpack_require__(31);
1290
- const status_1 = __webpack_require__(15);
1291
- let ProductVariant = class ProductVariant extends sequelize_typescript_1.Model {
1292
- };
1293
- exports.ProductVariant = ProductVariant;
1294
- __decorate([
1295
- (0, sequelize_typescript_1.ForeignKey)(() => product_entity_1.Product),
1296
- (0, sequelize_typescript_1.Column)({ allowNull: false }),
1297
- __metadata("design:type", Number)
1298
- ], ProductVariant.prototype, "productId", void 0);
1299
- __decorate([
1300
- (0, sequelize_typescript_1.Column)({ allowNull: true }),
1301
- __metadata("design:type", String)
1302
- ], ProductVariant.prototype, "sku", void 0);
1303
- __decorate([
1304
- (0, sequelize_typescript_1.Column)({ allowNull: true }),
1305
- __metadata("design:type", String)
1306
- ], ProductVariant.prototype, "barcode", void 0);
1307
- __decorate([
1308
- (0, sequelize_typescript_1.Column)({ type: sequelize_typescript_1.DataType.DECIMAL(10, 3), allowNull: true }),
1309
- __metadata("design:type", Number)
1310
- ], ProductVariant.prototype, "priceOverride", void 0);
1311
- __decorate([
1312
- (0, sequelize_typescript_1.Column)({ allowNull: true }),
1313
- __metadata("design:type", String)
1314
- ], ProductVariant.prototype, "image", void 0);
1315
- __decorate([
1316
- (0, sequelize_typescript_1.Column)({ defaultValue: 0 }),
1317
- __metadata("design:type", Number)
1318
- ], ProductVariant.prototype, "sortOrder", void 0);
1319
- __decorate([
1320
- (0, sequelize_typescript_1.Column)({
1321
- type: sequelize_typescript_1.DataType.ENUM(...Object.values(status_1.Status)),
1322
- defaultValue: status_1.Status.ACTIVE,
1323
- }),
1324
- __metadata("design:type", typeof (_a = typeof status_1.Status !== "undefined" && status_1.Status) === "function" ? _a : Object)
1325
- ], ProductVariant.prototype, "status", void 0);
1326
- __decorate([
1327
- (0, sequelize_typescript_1.BelongsTo)(() => product_entity_1.Product),
1328
- __metadata("design:type", typeof (_b = typeof product_entity_1.Product !== "undefined" && product_entity_1.Product) === "function" ? _b : Object)
1329
- ], ProductVariant.prototype, "product", void 0);
1330
- __decorate([
1331
- (0, sequelize_typescript_1.BelongsToMany)(() => variant_option_entity_1.VariantOption, () => product_variant_option_entity_1.ProductVariantOption),
1332
- __metadata("design:type", Array)
1333
- ], ProductVariant.prototype, "options", void 0);
1334
- exports.ProductVariant = ProductVariant = __decorate([
1335
- sequelize_typescript_1.Table
1336
- ], ProductVariant);
1337
-
1338
-
1339
- /***/ }),
1340
- /* 31 */
1341
- /***/ (function(__unused_webpack_module, exports, __webpack_require__) {
1342
-
1343
-
1344
- var __decorate = (this && this.__decorate) || function (decorators, target, key, desc) {
1345
- var c = arguments.length, r = c < 3 ? target : desc === null ? desc = Object.getOwnPropertyDescriptor(target, key) : desc, d;
1346
- if (typeof Reflect === "object" && typeof Reflect.decorate === "function") r = Reflect.decorate(decorators, target, key, desc);
1347
- 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;
1348
- return c > 3 && r && Object.defineProperty(target, key, r), r;
1349
- };
1350
- var __metadata = (this && this.__metadata) || function (k, v) {
1351
- if (typeof Reflect === "object" && typeof Reflect.metadata === "function") return Reflect.metadata(k, v);
1352
- };
1353
- Object.defineProperty(exports, "__esModule", ({ value: true }));
1354
- exports.ProductVariantOption = void 0;
1355
- const sequelize_typescript_1 = __webpack_require__(9);
1356
- const product_variant_entity_1 = __webpack_require__(30);
1357
- const variant_option_entity_1 = __webpack_require__(27);
1358
- let ProductVariantOption = class ProductVariantOption extends sequelize_typescript_1.Model {
1359
- };
1360
- exports.ProductVariantOption = ProductVariantOption;
1361
- __decorate([
1362
- (0, sequelize_typescript_1.ForeignKey)(() => product_variant_entity_1.ProductVariant),
1363
- (0, sequelize_typescript_1.Column)({ allowNull: false }),
1364
- __metadata("design:type", Number)
1365
- ], ProductVariantOption.prototype, "productVariantId", void 0);
1366
- __decorate([
1367
- (0, sequelize_typescript_1.ForeignKey)(() => variant_option_entity_1.VariantOption),
1368
- (0, sequelize_typescript_1.Column)({ allowNull: false }),
1369
- __metadata("design:type", Number)
1370
- ], ProductVariantOption.prototype, "variantOptionId", void 0);
1371
- exports.ProductVariantOption = ProductVariantOption = __decorate([
1372
- sequelize_typescript_1.Table
1373
- ], ProductVariantOption);
1374
-
1375
-
1376
- /***/ }),
1377
- /* 32 */
1378
- /***/ (function(__unused_webpack_module, exports, __webpack_require__) {
1379
-
1380
-
1381
- var __decorate = (this && this.__decorate) || function (decorators, target, key, desc) {
1382
- var c = arguments.length, r = c < 3 ? target : desc === null ? desc = Object.getOwnPropertyDescriptor(target, key) : desc, d;
1383
- if (typeof Reflect === "object" && typeof Reflect.decorate === "function") r = Reflect.decorate(decorators, target, key, desc);
1384
- 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;
1385
- return c > 3 && r && Object.defineProperty(target, key, r), r;
1386
- };
1387
- var __metadata = (this && this.__metadata) || function (k, v) {
1388
- if (typeof Reflect === "object" && typeof Reflect.metadata === "function") return Reflect.metadata(k, v);
1389
- };
1390
- var _a, _b, _c;
1391
- Object.defineProperty(exports, "__esModule", ({ value: true }));
1392
- exports.ProductStore = void 0;
1393
- const sequelize_typescript_1 = __webpack_require__(9);
1394
- const product_entity_1 = __webpack_require__(28);
1395
- const store_entity_1 = __webpack_require__(33);
1396
- const status_1 = __webpack_require__(15);
1397
- let ProductStore = class ProductStore extends sequelize_typescript_1.Model {
1398
- };
1399
- exports.ProductStore = ProductStore;
1400
- __decorate([
1401
- (0, sequelize_typescript_1.ForeignKey)(() => product_entity_1.Product),
1402
- (0, sequelize_typescript_1.Column)({ allowNull: false }),
1403
- __metadata("design:type", Number)
1404
- ], ProductStore.prototype, "productId", void 0);
1405
- __decorate([
1406
- (0, sequelize_typescript_1.ForeignKey)(() => store_entity_1.Store),
1407
- (0, sequelize_typescript_1.Column)({ allowNull: false }),
1408
- __metadata("design:type", Number)
1409
- ], ProductStore.prototype, "storeId", void 0);
1410
- __decorate([
1411
- (0, sequelize_typescript_1.Column)({ type: sequelize_typescript_1.DataType.DECIMAL(10, 3), allowNull: true }),
1412
- __metadata("design:type", Number)
1413
- ], ProductStore.prototype, "price", void 0);
1414
- __decorate([
1415
- (0, sequelize_typescript_1.Column)({ type: sequelize_typescript_1.DataType.DECIMAL(10, 3), allowNull: true }),
1416
- __metadata("design:type", Number)
1417
- ], ProductStore.prototype, "salePrice", void 0);
1418
- __decorate([
1419
- (0, sequelize_typescript_1.Column)({ type: sequelize_typescript_1.DataType.DATE, allowNull: true }),
1420
- __metadata("design:type", typeof (_a = typeof Date !== "undefined" && Date) === "function" ? _a : Object)
1421
- ], ProductStore.prototype, "saleStartDate", void 0);
1422
- __decorate([
1423
- (0, sequelize_typescript_1.Column)({ type: sequelize_typescript_1.DataType.DATE, allowNull: true }),
1424
- __metadata("design:type", typeof (_b = typeof Date !== "undefined" && Date) === "function" ? _b : Object)
1425
- ], ProductStore.prototype, "saleEndDate", void 0);
1426
- __decorate([
1427
- (0, sequelize_typescript_1.Column)({
1428
- type: sequelize_typescript_1.DataType.ENUM(...Object.values(status_1.Status)),
1429
- defaultValue: status_1.Status.ACTIVE,
1430
- }),
1431
- __metadata("design:type", typeof (_c = typeof status_1.Status !== "undefined" && status_1.Status) === "function" ? _c : Object)
1432
- ], ProductStore.prototype, "status", void 0);
1433
- exports.ProductStore = ProductStore = __decorate([
1434
- sequelize_typescript_1.Table
1435
- ], ProductStore);
1436
-
1437
-
1438
- /***/ }),
1439
- /* 33 */
1440
- /***/ (function(__unused_webpack_module, exports, __webpack_require__) {
1441
-
1442
-
1443
- var __decorate = (this && this.__decorate) || function (decorators, target, key, desc) {
1444
- var c = arguments.length, r = c < 3 ? target : desc === null ? desc = Object.getOwnPropertyDescriptor(target, key) : desc, d;
1445
- if (typeof Reflect === "object" && typeof Reflect.decorate === "function") r = Reflect.decorate(decorators, target, key, desc);
1446
- 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;
1447
- return c > 3 && r && Object.defineProperty(target, key, r), r;
1448
- };
1449
- var __metadata = (this && this.__metadata) || function (k, v) {
1450
- if (typeof Reflect === "object" && typeof Reflect.metadata === "function") return Reflect.metadata(k, v);
1451
- };
1452
- var _a, _b;
1453
- Object.defineProperty(exports, "__esModule", ({ value: true }));
1454
- exports.Store = void 0;
1455
- const sequelize_typescript_1 = __webpack_require__(9);
1456
- const country_entity_1 = __webpack_require__(8);
1457
- const product_store_entity_1 = __webpack_require__(32);
1458
- const product_entity_1 = __webpack_require__(28);
1459
- const store_inventory_entity_1 = __webpack_require__(34);
1460
- const inventory_entity_1 = __webpack_require__(35);
1461
- const status_1 = __webpack_require__(15);
1462
- let Store = class Store extends sequelize_typescript_1.Model {
1463
- };
1464
- exports.Store = Store;
1465
- __decorate([
1466
- (0, sequelize_typescript_1.Column)({ allowNull: false }),
1467
- __metadata("design:type", String)
1468
- ], Store.prototype, "nameEn", void 0);
1469
- __decorate([
1470
- (0, sequelize_typescript_1.Column)({ allowNull: false }),
1471
- __metadata("design:type", String)
1472
- ], Store.prototype, "nameAr", void 0);
1473
- __decorate([
1474
- (0, sequelize_typescript_1.Column)({ type: sequelize_typescript_1.DataType.TEXT, allowNull: true }),
1475
- __metadata("design:type", String)
1476
- ], Store.prototype, "descriptionEn", void 0);
1477
- __decorate([
1478
- (0, sequelize_typescript_1.Column)({ type: sequelize_typescript_1.DataType.TEXT, allowNull: true }),
1479
- __metadata("design:type", String)
1480
- ], Store.prototype, "descriptionAr", void 0);
1481
- __decorate([
1482
- (0, sequelize_typescript_1.Column)({ allowNull: true }),
1483
- __metadata("design:type", String)
1484
- ], Store.prototype, "logo", void 0);
1485
- __decorate([
1486
- (0, sequelize_typescript_1.Column)({ allowNull: false, defaultValue: 'USD' }),
1487
- __metadata("design:type", String)
1488
- ], Store.prototype, "currency", void 0);
1489
- __decorate([
1490
- (0, sequelize_typescript_1.Column)({ allowNull: true }),
1491
- __metadata("design:type", String)
1492
- ], Store.prototype, "currencySymbolEn", void 0);
1493
- __decorate([
1494
- (0, sequelize_typescript_1.Column)({ allowNull: true }),
1495
- __metadata("design:type", String)
1496
- ], Store.prototype, "currencySymbolAr", void 0);
1497
- __decorate([
1498
- (0, sequelize_typescript_1.ForeignKey)(() => country_entity_1.Country),
1499
- (0, sequelize_typescript_1.Column)({ allowNull: true }),
1500
- __metadata("design:type", Number)
1501
- ], Store.prototype, "countryId", void 0);
1502
- __decorate([
1503
- (0, sequelize_typescript_1.Column)({ defaultValue: false }),
1504
- __metadata("design:type", Boolean)
1505
- ], Store.prototype, "isGlobal", void 0);
1506
- __decorate([
1507
- (0, sequelize_typescript_1.Column)({
1508
- type: sequelize_typescript_1.DataType.ENUM(...Object.values(status_1.Status)),
1509
- defaultValue: status_1.Status.ACTIVE,
1510
- }),
1511
- __metadata("design:type", typeof (_a = typeof status_1.Status !== "undefined" && status_1.Status) === "function" ? _a : Object)
1512
- ], Store.prototype, "status", void 0);
1513
- __decorate([
1514
- (0, sequelize_typescript_1.BelongsTo)(() => country_entity_1.Country),
1515
- __metadata("design:type", typeof (_b = typeof country_entity_1.Country !== "undefined" && country_entity_1.Country) === "function" ? _b : Object)
1516
- ], Store.prototype, "country", void 0);
1517
- __decorate([
1518
- (0, sequelize_typescript_1.BelongsToMany)(() => product_entity_1.Product, () => product_store_entity_1.ProductStore),
1519
- __metadata("design:type", Array)
1520
- ], Store.prototype, "products", void 0);
1521
- __decorate([
1522
- (0, sequelize_typescript_1.BelongsToMany)(() => inventory_entity_1.Inventory, () => store_inventory_entity_1.StoreInventory),
1523
- __metadata("design:type", Array)
1524
- ], Store.prototype, "inventories", void 0);
1525
- exports.Store = Store = __decorate([
1526
- sequelize_typescript_1.Table
1527
- ], Store);
1528
-
1529
-
1530
- /***/ }),
1531
- /* 34 */
1532
- /***/ (function(__unused_webpack_module, exports, __webpack_require__) {
1533
-
1534
-
1535
- var __decorate = (this && this.__decorate) || function (decorators, target, key, desc) {
1536
- var c = arguments.length, r = c < 3 ? target : desc === null ? desc = Object.getOwnPropertyDescriptor(target, key) : desc, d;
1537
- if (typeof Reflect === "object" && typeof Reflect.decorate === "function") r = Reflect.decorate(decorators, target, key, desc);
1538
- 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;
1539
- return c > 3 && r && Object.defineProperty(target, key, r), r;
1540
- };
1541
- var __metadata = (this && this.__metadata) || function (k, v) {
1542
- if (typeof Reflect === "object" && typeof Reflect.metadata === "function") return Reflect.metadata(k, v);
1543
- };
1544
- Object.defineProperty(exports, "__esModule", ({ value: true }));
1545
- exports.StoreInventory = void 0;
1546
- const sequelize_typescript_1 = __webpack_require__(9);
1547
- const store_entity_1 = __webpack_require__(33);
1548
- const inventory_entity_1 = __webpack_require__(35);
1549
- let StoreInventory = class StoreInventory extends sequelize_typescript_1.Model {
1550
- };
1551
- exports.StoreInventory = StoreInventory;
1552
- __decorate([
1553
- (0, sequelize_typescript_1.ForeignKey)(() => store_entity_1.Store),
1554
- (0, sequelize_typescript_1.Column)({ allowNull: false }),
1555
- __metadata("design:type", Number)
1556
- ], StoreInventory.prototype, "storeId", void 0);
1557
- __decorate([
1558
- (0, sequelize_typescript_1.ForeignKey)(() => inventory_entity_1.Inventory),
1559
- (0, sequelize_typescript_1.Column)({ allowNull: false }),
1560
- __metadata("design:type", Number)
1561
- ], StoreInventory.prototype, "inventoryId", void 0);
1562
- __decorate([
1563
- (0, sequelize_typescript_1.Column)({ defaultValue: 1 }),
1564
- __metadata("design:type", Number)
1565
- ], StoreInventory.prototype, "priority", void 0);
1566
- exports.StoreInventory = StoreInventory = __decorate([
1567
- sequelize_typescript_1.Table
1568
- ], StoreInventory);
1569
-
1570
-
1571
- /***/ }),
1572
- /* 35 */
1573
- /***/ (function(__unused_webpack_module, exports, __webpack_require__) {
1574
-
1575
-
1576
- var __decorate = (this && this.__decorate) || function (decorators, target, key, desc) {
1577
- var c = arguments.length, r = c < 3 ? target : desc === null ? desc = Object.getOwnPropertyDescriptor(target, key) : desc, d;
1578
- if (typeof Reflect === "object" && typeof Reflect.decorate === "function") r = Reflect.decorate(decorators, target, key, desc);
1579
- 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;
1580
- return c > 3 && r && Object.defineProperty(target, key, r), r;
1581
- };
1582
- var __metadata = (this && this.__metadata) || function (k, v) {
1583
- if (typeof Reflect === "object" && typeof Reflect.metadata === "function") return Reflect.metadata(k, v);
1584
- };
1585
- var _a;
1586
- Object.defineProperty(exports, "__esModule", ({ value: true }));
1587
- exports.Inventory = void 0;
1588
- const sequelize_typescript_1 = __webpack_require__(9);
1589
- const inventory_stock_entity_1 = __webpack_require__(36);
1590
- const store_inventory_entity_1 = __webpack_require__(34);
1591
- const store_entity_1 = __webpack_require__(33);
1592
- const status_1 = __webpack_require__(15);
1593
- let Inventory = class Inventory extends sequelize_typescript_1.Model {
1594
- };
1595
- exports.Inventory = Inventory;
1596
- __decorate([
1597
- (0, sequelize_typescript_1.Column)({ allowNull: false }),
1598
- __metadata("design:type", String)
1599
- ], Inventory.prototype, "nameEn", void 0);
1600
- __decorate([
1601
- (0, sequelize_typescript_1.Column)({ allowNull: false }),
1602
- __metadata("design:type", String)
1603
- ], Inventory.prototype, "nameAr", void 0);
1604
- __decorate([
1605
- (0, sequelize_typescript_1.Column)({ type: sequelize_typescript_1.DataType.TEXT, allowNull: true }),
1606
- __metadata("design:type", String)
1607
- ], Inventory.prototype, "addressEn", void 0);
1608
- __decorate([
1609
- (0, sequelize_typescript_1.Column)({ type: sequelize_typescript_1.DataType.TEXT, allowNull: true }),
1610
- __metadata("design:type", String)
1611
- ], Inventory.prototype, "addressAr", void 0);
1612
- __decorate([
1613
- (0, sequelize_typescript_1.Column)({ allowNull: true }),
1614
- __metadata("design:type", String)
1615
- ], Inventory.prototype, "contactPhone", void 0);
1616
- __decorate([
1617
- (0, sequelize_typescript_1.Column)({ allowNull: true }),
1618
- __metadata("design:type", String)
1619
- ], Inventory.prototype, "contactEmail", void 0);
1620
- __decorate([
1621
- (0, sequelize_typescript_1.Column)({
1622
- type: sequelize_typescript_1.DataType.ENUM(...Object.values(status_1.Status)),
1623
- defaultValue: status_1.Status.ACTIVE,
1624
- }),
1625
- __metadata("design:type", typeof (_a = typeof status_1.Status !== "undefined" && status_1.Status) === "function" ? _a : Object)
1626
- ], Inventory.prototype, "status", void 0);
1627
- __decorate([
1628
- (0, sequelize_typescript_1.HasMany)(() => inventory_stock_entity_1.InventoryStock),
1629
- __metadata("design:type", Array)
1630
- ], Inventory.prototype, "stocks", void 0);
1631
- __decorate([
1632
- (0, sequelize_typescript_1.BelongsToMany)(() => store_entity_1.Store, () => store_inventory_entity_1.StoreInventory),
1633
- __metadata("design:type", Array)
1634
- ], Inventory.prototype, "stores", void 0);
1635
- exports.Inventory = Inventory = __decorate([
1636
- sequelize_typescript_1.Table
1637
- ], Inventory);
1638
-
1639
-
1640
- /***/ }),
1641
- /* 36 */
1642
- /***/ (function(__unused_webpack_module, exports, __webpack_require__) {
1643
-
1644
-
1645
- var __decorate = (this && this.__decorate) || function (decorators, target, key, desc) {
1646
- var c = arguments.length, r = c < 3 ? target : desc === null ? desc = Object.getOwnPropertyDescriptor(target, key) : desc, d;
1647
- if (typeof Reflect === "object" && typeof Reflect.decorate === "function") r = Reflect.decorate(decorators, target, key, desc);
1648
- 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;
1649
- return c > 3 && r && Object.defineProperty(target, key, r), r;
1650
- };
1651
- var __metadata = (this && this.__metadata) || function (k, v) {
1652
- if (typeof Reflect === "object" && typeof Reflect.metadata === "function") return Reflect.metadata(k, v);
1653
- };
1654
- var _a, _b, _c;
1655
- Object.defineProperty(exports, "__esModule", ({ value: true }));
1656
- exports.InventoryStock = void 0;
1657
- const sequelize_typescript_1 = __webpack_require__(9);
1658
- const inventory_entity_1 = __webpack_require__(35);
1659
- const product_entity_1 = __webpack_require__(28);
1660
- const product_variant_entity_1 = __webpack_require__(30);
1661
- let InventoryStock = class InventoryStock extends sequelize_typescript_1.Model {
1662
- };
1663
- exports.InventoryStock = InventoryStock;
1664
- __decorate([
1665
- (0, sequelize_typescript_1.ForeignKey)(() => inventory_entity_1.Inventory),
1666
- (0, sequelize_typescript_1.Column)({ allowNull: false }),
1667
- __metadata("design:type", Number)
1668
- ], InventoryStock.prototype, "inventoryId", void 0);
1669
- __decorate([
1670
- (0, sequelize_typescript_1.ForeignKey)(() => product_entity_1.Product),
1671
- (0, sequelize_typescript_1.Column)({ allowNull: false }),
1672
- __metadata("design:type", Number)
1673
- ], InventoryStock.prototype, "productId", void 0);
1674
- __decorate([
1675
- (0, sequelize_typescript_1.ForeignKey)(() => product_variant_entity_1.ProductVariant),
1676
- (0, sequelize_typescript_1.Column)({ allowNull: true }),
1677
- __metadata("design:type", Number)
1678
- ], InventoryStock.prototype, "productVariantId", void 0);
1679
- __decorate([
1680
- (0, sequelize_typescript_1.Column)({ defaultValue: 0 }),
1681
- __metadata("design:type", Number)
1682
- ], InventoryStock.prototype, "physicalQuantity", void 0);
1683
- __decorate([
1684
- (0, sequelize_typescript_1.Column)({ defaultValue: 0 }),
1685
- __metadata("design:type", Number)
1686
- ], InventoryStock.prototype, "reservedQuantity", void 0);
1687
- __decorate([
1688
- (0, sequelize_typescript_1.Column)({ defaultValue: false }),
1689
- __metadata("design:type", Boolean)
1690
- ], InventoryStock.prototype, "availableFromVendor", void 0);
1691
- __decorate([
1692
- (0, sequelize_typescript_1.Column)({ allowNull: true }),
1693
- __metadata("design:type", Number)
1694
- ], InventoryStock.prototype, "lowStockThreshold", void 0);
1695
- __decorate([
1696
- (0, sequelize_typescript_1.BelongsTo)(() => inventory_entity_1.Inventory),
1697
- __metadata("design:type", typeof (_a = typeof inventory_entity_1.Inventory !== "undefined" && inventory_entity_1.Inventory) === "function" ? _a : Object)
1698
- ], InventoryStock.prototype, "inventory", void 0);
1699
- __decorate([
1700
- (0, sequelize_typescript_1.BelongsTo)(() => product_entity_1.Product),
1701
- __metadata("design:type", typeof (_b = typeof product_entity_1.Product !== "undefined" && product_entity_1.Product) === "function" ? _b : Object)
1702
- ], InventoryStock.prototype, "product", void 0);
1703
- __decorate([
1704
- (0, sequelize_typescript_1.BelongsTo)(() => product_variant_entity_1.ProductVariant),
1705
- __metadata("design:type", typeof (_c = typeof product_variant_entity_1.ProductVariant !== "undefined" && product_variant_entity_1.ProductVariant) === "function" ? _c : Object)
1706
- ], InventoryStock.prototype, "variant", void 0);
1707
- exports.InventoryStock = InventoryStock = __decorate([
1708
- sequelize_typescript_1.Table
1709
- ], InventoryStock);
1710
-
1711
-
1712
- /***/ }),
1713
- /* 37 */
1714
- /***/ (function(__unused_webpack_module, exports, __webpack_require__) {
1715
-
1716
-
1717
- var __decorate = (this && this.__decorate) || function (decorators, target, key, desc) {
1718
- var c = arguments.length, r = c < 3 ? target : desc === null ? desc = Object.getOwnPropertyDescriptor(target, key) : desc, d;
1719
- if (typeof Reflect === "object" && typeof Reflect.decorate === "function") r = Reflect.decorate(decorators, target, key, desc);
1720
- 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;
1721
- return c > 3 && r && Object.defineProperty(target, key, r), r;
1722
- };
1723
- var __metadata = (this && this.__metadata) || function (k, v) {
1724
- if (typeof Reflect === "object" && typeof Reflect.metadata === "function") return Reflect.metadata(k, v);
1725
- };
1726
- Object.defineProperty(exports, "__esModule", ({ value: true }));
1727
- exports.ProductTag = void 0;
1728
- const sequelize_typescript_1 = __webpack_require__(9);
1729
- const product_entity_1 = __webpack_require__(28);
1730
- const tag_entity_1 = __webpack_require__(38);
1731
- let ProductTag = class ProductTag extends sequelize_typescript_1.Model {
1732
- };
1733
- exports.ProductTag = ProductTag;
1734
- __decorate([
1735
- (0, sequelize_typescript_1.ForeignKey)(() => product_entity_1.Product),
1736
- (0, sequelize_typescript_1.Column)({ allowNull: false }),
1737
- __metadata("design:type", Number)
1738
- ], ProductTag.prototype, "productId", void 0);
1739
- __decorate([
1740
- (0, sequelize_typescript_1.ForeignKey)(() => tag_entity_1.Tag),
1741
- (0, sequelize_typescript_1.Column)({ allowNull: false }),
1742
- __metadata("design:type", Number)
1743
- ], ProductTag.prototype, "tagId", void 0);
1744
- exports.ProductTag = ProductTag = __decorate([
1745
- sequelize_typescript_1.Table
1746
- ], ProductTag);
1747
-
1748
-
1749
- /***/ }),
1750
- /* 38 */
1751
- /***/ (function(__unused_webpack_module, exports, __webpack_require__) {
1752
-
1753
-
1754
- var __decorate = (this && this.__decorate) || function (decorators, target, key, desc) {
1755
- var c = arguments.length, r = c < 3 ? target : desc === null ? desc = Object.getOwnPropertyDescriptor(target, key) : desc, d;
1756
- if (typeof Reflect === "object" && typeof Reflect.decorate === "function") r = Reflect.decorate(decorators, target, key, desc);
1757
- 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;
1758
- return c > 3 && r && Object.defineProperty(target, key, r), r;
1759
- };
1760
- var __metadata = (this && this.__metadata) || function (k, v) {
1761
- if (typeof Reflect === "object" && typeof Reflect.metadata === "function") return Reflect.metadata(k, v);
1762
- };
1763
- var _a;
1764
- Object.defineProperty(exports, "__esModule", ({ value: true }));
1765
- exports.Tag = void 0;
1766
- const sequelize_typescript_1 = __webpack_require__(9);
1767
- const product_entity_1 = __webpack_require__(28);
1768
- const product_tag_entity_1 = __webpack_require__(37);
1769
- const status_1 = __webpack_require__(15);
1770
- let Tag = class Tag extends sequelize_typescript_1.Model {
1771
- };
1772
- exports.Tag = Tag;
1773
- __decorate([
1774
- (0, sequelize_typescript_1.Column)({ allowNull: false, unique: true }),
1775
- __metadata("design:type", String)
1776
- ], Tag.prototype, "slug", void 0);
1777
- __decorate([
1778
- (0, sequelize_typescript_1.Column)({ allowNull: false }),
1779
- __metadata("design:type", String)
1780
- ], Tag.prototype, "nameEn", void 0);
1781
- __decorate([
1782
- (0, sequelize_typescript_1.Column)({ allowNull: false }),
1783
- __metadata("design:type", String)
1784
- ], Tag.prototype, "nameAr", void 0);
1785
- __decorate([
1786
- (0, sequelize_typescript_1.Column)({ allowNull: true }),
1787
- __metadata("design:type", String)
1788
- ], Tag.prototype, "color", void 0);
1789
- __decorate([
1790
- (0, sequelize_typescript_1.Column)({ defaultValue: 0 }),
1791
- __metadata("design:type", Number)
1792
- ], Tag.prototype, "sortOrder", void 0);
1793
- __decorate([
1794
- (0, sequelize_typescript_1.Column)({
1795
- type: sequelize_typescript_1.DataType.ENUM(...Object.values(status_1.Status)),
1796
- defaultValue: status_1.Status.ACTIVE,
1797
- }),
1798
- __metadata("design:type", typeof (_a = typeof status_1.Status !== "undefined" && status_1.Status) === "function" ? _a : Object)
1799
- ], Tag.prototype, "status", void 0);
1800
- __decorate([
1801
- (0, sequelize_typescript_1.BelongsToMany)(() => product_entity_1.Product, () => product_tag_entity_1.ProductTag),
1802
- __metadata("design:type", Array)
1803
- ], Tag.prototype, "products", void 0);
1804
- exports.Tag = Tag = __decorate([
1805
- sequelize_typescript_1.Table
1806
- ], Tag);
1807
-
1808
-
1809
- /***/ }),
1810
- /* 39 */
1811
- /***/ (function(__unused_webpack_module, exports, __webpack_require__) {
1812
-
1813
-
1814
- var __decorate = (this && this.__decorate) || function (decorators, target, key, desc) {
1815
- var c = arguments.length, r = c < 3 ? target : desc === null ? desc = Object.getOwnPropertyDescriptor(target, key) : desc, d;
1816
- if (typeof Reflect === "object" && typeof Reflect.decorate === "function") r = Reflect.decorate(decorators, target, key, desc);
1817
- 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;
1818
- return c > 3 && r && Object.defineProperty(target, key, r), r;
1819
- };
1820
- var __metadata = (this && this.__metadata) || function (k, v) {
1821
- if (typeof Reflect === "object" && typeof Reflect.metadata === "function") return Reflect.metadata(k, v);
1822
- };
1823
- var _a, _b, _c, _d, _e;
1824
- Object.defineProperty(exports, "__esModule", ({ value: true }));
1825
- exports.StockMovement = void 0;
1826
- const sequelize_typescript_1 = __webpack_require__(9);
1827
- const inventory_entity_1 = __webpack_require__(35);
1828
- const product_entity_1 = __webpack_require__(28);
1829
- const product_variant_entity_1 = __webpack_require__(30);
1830
- const sys_user_entity_1 = __webpack_require__(14);
1831
- const stockMovementType_1 = __webpack_require__(40);
1832
- let StockMovement = class StockMovement extends sequelize_typescript_1.Model {
1833
- };
1834
- exports.StockMovement = StockMovement;
1835
- __decorate([
1836
- (0, sequelize_typescript_1.ForeignKey)(() => inventory_entity_1.Inventory),
1837
- (0, sequelize_typescript_1.Column)({ allowNull: false }),
1838
- __metadata("design:type", Number)
1839
- ], StockMovement.prototype, "inventoryId", void 0);
1840
- __decorate([
1841
- (0, sequelize_typescript_1.ForeignKey)(() => product_entity_1.Product),
1842
- (0, sequelize_typescript_1.Column)({ allowNull: false }),
1843
- __metadata("design:type", Number)
1844
- ], StockMovement.prototype, "productId", void 0);
1845
- __decorate([
1846
- (0, sequelize_typescript_1.ForeignKey)(() => product_variant_entity_1.ProductVariant),
1847
- (0, sequelize_typescript_1.Column)({ allowNull: true }),
1848
- __metadata("design:type", Number)
1849
- ], StockMovement.prototype, "productVariantId", void 0);
1850
- __decorate([
1851
- (0, sequelize_typescript_1.Column)({
1852
- type: sequelize_typescript_1.DataType.ENUM(...Object.values(stockMovementType_1.StockMovementType)),
1853
- allowNull: false,
1854
- }),
1855
- __metadata("design:type", typeof (_a = typeof stockMovementType_1.StockMovementType !== "undefined" && stockMovementType_1.StockMovementType) === "function" ? _a : Object)
1856
- ], StockMovement.prototype, "movementType", void 0);
1857
- __decorate([
1858
- (0, sequelize_typescript_1.Column)({ allowNull: false }),
1859
- __metadata("design:type", Number)
1860
- ], StockMovement.prototype, "quantity", void 0);
1861
- __decorate([
1862
- (0, sequelize_typescript_1.Column)({ allowNull: false }),
1863
- __metadata("design:type", Number)
1864
- ], StockMovement.prototype, "quantityBefore", void 0);
1865
- __decorate([
1866
- (0, sequelize_typescript_1.Column)({ allowNull: false }),
1867
- __metadata("design:type", Number)
1868
- ], StockMovement.prototype, "quantityAfter", void 0);
1869
- __decorate([
1870
- (0, sequelize_typescript_1.Column)({ allowNull: true }),
1871
- __metadata("design:type", String)
1872
- ], StockMovement.prototype, "referenceType", void 0);
1873
- __decorate([
1874
- (0, sequelize_typescript_1.Column)({ allowNull: true }),
1875
- __metadata("design:type", Number)
1876
- ], StockMovement.prototype, "referenceId", void 0);
1877
- __decorate([
1878
- (0, sequelize_typescript_1.Column)({ type: sequelize_typescript_1.DataType.TEXT, allowNull: true }),
1879
- __metadata("design:type", String)
1880
- ], StockMovement.prototype, "notes", void 0);
1881
- __decorate([
1882
- (0, sequelize_typescript_1.ForeignKey)(() => sys_user_entity_1.SysUser),
1883
- (0, sequelize_typescript_1.Column)({ allowNull: true }),
1884
- __metadata("design:type", Number)
1885
- ], StockMovement.prototype, "createdBy", void 0);
1886
- __decorate([
1887
- (0, sequelize_typescript_1.BelongsTo)(() => inventory_entity_1.Inventory),
1888
- __metadata("design:type", typeof (_b = typeof inventory_entity_1.Inventory !== "undefined" && inventory_entity_1.Inventory) === "function" ? _b : Object)
1889
- ], StockMovement.prototype, "inventory", void 0);
1890
- __decorate([
1891
- (0, sequelize_typescript_1.BelongsTo)(() => product_entity_1.Product),
1892
- __metadata("design:type", typeof (_c = typeof product_entity_1.Product !== "undefined" && product_entity_1.Product) === "function" ? _c : Object)
1893
- ], StockMovement.prototype, "product", void 0);
1894
- __decorate([
1895
- (0, sequelize_typescript_1.BelongsTo)(() => product_variant_entity_1.ProductVariant),
1896
- __metadata("design:type", typeof (_d = typeof product_variant_entity_1.ProductVariant !== "undefined" && product_variant_entity_1.ProductVariant) === "function" ? _d : Object)
1897
- ], StockMovement.prototype, "variant", void 0);
1898
- __decorate([
1899
- (0, sequelize_typescript_1.BelongsTo)(() => sys_user_entity_1.SysUser),
1900
- __metadata("design:type", typeof (_e = typeof sys_user_entity_1.SysUser !== "undefined" && sys_user_entity_1.SysUser) === "function" ? _e : Object)
1901
- ], StockMovement.prototype, "createdByUser", void 0);
1902
- exports.StockMovement = StockMovement = __decorate([
1903
- sequelize_typescript_1.Table
1904
- ], StockMovement);
1905
-
1906
-
1907
- /***/ }),
1908
- /* 40 */
1909
- /***/ ((__unused_webpack_module, exports) => {
1910
-
1911
-
1912
- Object.defineProperty(exports, "__esModule", ({ value: true }));
1913
- exports.StockMovementType = void 0;
1914
- var StockMovementType;
1915
- (function (StockMovementType) {
1916
- StockMovementType["RECEIVED"] = "received";
1917
- StockMovementType["RESERVED"] = "reserved";
1918
- StockMovementType["RESERVATION_RELEASED"] = "reservation_released";
1919
- StockMovementType["ADJUSTMENT_ADD"] = "adjustment_add";
1920
- StockMovementType["ADJUSTMENT_REMOVE"] = "adjustment_remove";
1921
- StockMovementType["RETURNED_FROM_CUSTOMER"] = "returned_from_customer";
1922
- StockMovementType["RETURNED_TO_VENDOR"] = "returned_to_vendor";
1923
- StockMovementType["TRANSFER_IN"] = "transfer_in";
1924
- StockMovementType["TRANSFER_OUT"] = "transfer_out";
1925
- })(StockMovementType || (exports.StockMovementType = StockMovementType = {}));
1926
-
1927
-
1928
- /***/ }),
1929
- /* 41 */
1930
- /***/ (function(__unused_webpack_module, exports, __webpack_require__) {
1931
-
1932
-
1933
- var __decorate = (this && this.__decorate) || function (decorators, target, key, desc) {
1934
- var c = arguments.length, r = c < 3 ? target : desc === null ? desc = Object.getOwnPropertyDescriptor(target, key) : desc, d;
1935
- if (typeof Reflect === "object" && typeof Reflect.decorate === "function") r = Reflect.decorate(decorators, target, key, desc);
1936
- 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;
1937
- return c > 3 && r && Object.defineProperty(target, key, r), r;
1938
- };
1939
- var __metadata = (this && this.__metadata) || function (k, v) {
1940
- if (typeof Reflect === "object" && typeof Reflect.metadata === "function") return Reflect.metadata(k, v);
1941
- };
1942
- var _a, _b;
1943
- Object.defineProperty(exports, "__esModule", ({ value: true }));
1944
- exports.Vendor = void 0;
1945
- const sequelize_typescript_1 = __webpack_require__(9);
1946
- const country_entity_1 = __webpack_require__(8);
1947
- const status_1 = __webpack_require__(15);
1948
- let Vendor = class Vendor extends sequelize_typescript_1.Model {
1949
- };
1950
- exports.Vendor = Vendor;
1951
- __decorate([
1952
- (0, sequelize_typescript_1.Column)({ allowNull: false }),
1953
- __metadata("design:type", String)
1954
- ], Vendor.prototype, "nameEn", void 0);
1955
- __decorate([
1956
- (0, sequelize_typescript_1.Column)({ allowNull: false }),
1957
- __metadata("design:type", String)
1958
- ], Vendor.prototype, "nameAr", void 0);
1959
- __decorate([
1960
- (0, sequelize_typescript_1.Column)({ allowNull: true }),
1961
- __metadata("design:type", String)
1962
- ], Vendor.prototype, "contactPerson", void 0);
1963
- __decorate([
1964
- (0, sequelize_typescript_1.Column)({ allowNull: true }),
1965
- __metadata("design:type", String)
1966
- ], Vendor.prototype, "email", void 0);
1967
- __decorate([
1968
- (0, sequelize_typescript_1.Column)({ allowNull: true }),
1969
- __metadata("design:type", String)
1970
- ], Vendor.prototype, "phone", void 0);
1971
- __decorate([
1972
- (0, sequelize_typescript_1.Column)({ type: sequelize_typescript_1.DataType.TEXT, allowNull: true }),
1973
- __metadata("design:type", String)
1974
- ], Vendor.prototype, "addressEn", void 0);
1975
- __decorate([
1976
- (0, sequelize_typescript_1.Column)({ type: sequelize_typescript_1.DataType.TEXT, allowNull: true }),
1977
- __metadata("design:type", String)
1978
- ], Vendor.prototype, "addressAr", void 0);
1979
- __decorate([
1980
- (0, sequelize_typescript_1.ForeignKey)(() => country_entity_1.Country),
1981
- (0, sequelize_typescript_1.Column)({ allowNull: true }),
1982
- __metadata("design:type", Number)
1983
- ], Vendor.prototype, "countryId", void 0);
1984
- __decorate([
1985
- (0, sequelize_typescript_1.Column)({ allowNull: true }),
1986
- __metadata("design:type", String)
1987
- ], Vendor.prototype, "taxNumber", void 0);
1988
- __decorate([
1989
- (0, sequelize_typescript_1.Column)({ allowNull: true }),
1990
- __metadata("design:type", String)
1991
- ], Vendor.prototype, "commercialRegNumber", void 0);
1992
- __decorate([
1993
- (0, sequelize_typescript_1.Column)({ defaultValue: 0 }),
1994
- __metadata("design:type", Number)
1995
- ], Vendor.prototype, "paymentTermsDays", void 0);
1996
- __decorate([
1997
- (0, sequelize_typescript_1.Column)({ allowNull: true }),
1998
- __metadata("design:type", String)
1999
- ], Vendor.prototype, "notes", void 0);
2000
- __decorate([
2001
- (0, sequelize_typescript_1.Column)({
2002
- type: sequelize_typescript_1.DataType.ENUM(...Object.values(status_1.Status)),
2003
- defaultValue: status_1.Status.ACTIVE,
2004
- }),
2005
- __metadata("design:type", typeof (_a = typeof status_1.Status !== "undefined" && status_1.Status) === "function" ? _a : Object)
2006
- ], Vendor.prototype, "status", void 0);
2007
- __decorate([
2008
- (0, sequelize_typescript_1.BelongsTo)(() => country_entity_1.Country),
2009
- __metadata("design:type", typeof (_b = typeof country_entity_1.Country !== "undefined" && country_entity_1.Country) === "function" ? _b : Object)
2010
- ], Vendor.prototype, "country", void 0);
2011
- exports.Vendor = Vendor = __decorate([
2012
- sequelize_typescript_1.Table
2013
- ], Vendor);
2014
-
2015
-
2016
- /***/ }),
2017
- /* 42 */
2018
- /***/ (function(__unused_webpack_module, exports, __webpack_require__) {
2019
-
2020
-
2021
- var __decorate = (this && this.__decorate) || function (decorators, target, key, desc) {
2022
- var c = arguments.length, r = c < 3 ? target : desc === null ? desc = Object.getOwnPropertyDescriptor(target, key) : desc, d;
2023
- if (typeof Reflect === "object" && typeof Reflect.decorate === "function") r = Reflect.decorate(decorators, target, key, desc);
2024
- 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;
2025
- return c > 3 && r && Object.defineProperty(target, key, r), r;
2026
- };
2027
- var __metadata = (this && this.__metadata) || function (k, v) {
2028
- if (typeof Reflect === "object" && typeof Reflect.metadata === "function") return Reflect.metadata(k, v);
2029
- };
2030
- var _a, _b, _c, _d;
2031
- Object.defineProperty(exports, "__esModule", ({ value: true }));
2032
- exports.VendorProduct = void 0;
2033
- const sequelize_typescript_1 = __webpack_require__(9);
2034
- const vendor_entity_1 = __webpack_require__(41);
2035
- const product_entity_1 = __webpack_require__(28);
2036
- const product_variant_entity_1 = __webpack_require__(30);
2037
- const status_1 = __webpack_require__(15);
2038
- let VendorProduct = class VendorProduct extends sequelize_typescript_1.Model {
2039
- };
2040
- exports.VendorProduct = VendorProduct;
2041
- __decorate([
2042
- (0, sequelize_typescript_1.ForeignKey)(() => vendor_entity_1.Vendor),
2043
- (0, sequelize_typescript_1.Column)({ allowNull: false }),
2044
- __metadata("design:type", Number)
2045
- ], VendorProduct.prototype, "vendorId", void 0);
2046
- __decorate([
2047
- (0, sequelize_typescript_1.ForeignKey)(() => product_entity_1.Product),
2048
- (0, sequelize_typescript_1.Column)({ allowNull: false }),
2049
- __metadata("design:type", Number)
2050
- ], VendorProduct.prototype, "productId", void 0);
2051
- __decorate([
2052
- (0, sequelize_typescript_1.ForeignKey)(() => product_variant_entity_1.ProductVariant),
2053
- (0, sequelize_typescript_1.Column)({ allowNull: true }),
2054
- __metadata("design:type", Number)
2055
- ], VendorProduct.prototype, "productVariantId", void 0);
2056
- __decorate([
2057
- (0, sequelize_typescript_1.Column)({ type: sequelize_typescript_1.DataType.DECIMAL(10, 3), allowNull: false }),
2058
- __metadata("design:type", Number)
2059
- ], VendorProduct.prototype, "costPrice", void 0);
2060
- __decorate([
2061
- (0, sequelize_typescript_1.Column)({ allowNull: true }),
2062
- __metadata("design:type", String)
2063
- ], VendorProduct.prototype, "vendorSku", void 0);
2064
- __decorate([
2065
- (0, sequelize_typescript_1.Column)({ allowNull: true }),
2066
- __metadata("design:type", Number)
2067
- ], VendorProduct.prototype, "leadTimeDays", void 0);
2068
- __decorate([
2069
- (0, sequelize_typescript_1.Column)({ defaultValue: 1 }),
2070
- __metadata("design:type", Number)
2071
- ], VendorProduct.prototype, "moq", void 0);
2072
- __decorate([
2073
- (0, sequelize_typescript_1.Column)({ defaultValue: false }),
2074
- __metadata("design:type", Boolean)
2075
- ], VendorProduct.prototype, "isPreferred", void 0);
2076
- __decorate([
2077
- (0, sequelize_typescript_1.Column)({
2078
- type: sequelize_typescript_1.DataType.ENUM(...Object.values(status_1.Status)),
2079
- defaultValue: status_1.Status.ACTIVE,
2080
- }),
2081
- __metadata("design:type", typeof (_a = typeof status_1.Status !== "undefined" && status_1.Status) === "function" ? _a : Object)
2082
- ], VendorProduct.prototype, "status", void 0);
2083
- __decorate([
2084
- (0, sequelize_typescript_1.BelongsTo)(() => vendor_entity_1.Vendor),
2085
- __metadata("design:type", typeof (_b = typeof vendor_entity_1.Vendor !== "undefined" && vendor_entity_1.Vendor) === "function" ? _b : Object)
2086
- ], VendorProduct.prototype, "vendor", void 0);
2087
- __decorate([
2088
- (0, sequelize_typescript_1.BelongsTo)(() => product_entity_1.Product),
2089
- __metadata("design:type", typeof (_c = typeof product_entity_1.Product !== "undefined" && product_entity_1.Product) === "function" ? _c : Object)
2090
- ], VendorProduct.prototype, "product", void 0);
2091
- __decorate([
2092
- (0, sequelize_typescript_1.BelongsTo)(() => product_variant_entity_1.ProductVariant),
2093
- __metadata("design:type", typeof (_d = typeof product_variant_entity_1.ProductVariant !== "undefined" && product_variant_entity_1.ProductVariant) === "function" ? _d : Object)
2094
- ], VendorProduct.prototype, "variant", void 0);
2095
- exports.VendorProduct = VendorProduct = __decorate([
2096
- sequelize_typescript_1.Table
2097
- ], VendorProduct);
2098
-
2099
-
2100
- /***/ }),
2101
- /* 43 */
2102
- /***/ (function(__unused_webpack_module, exports, __webpack_require__) {
2103
-
2104
-
2105
- var __decorate = (this && this.__decorate) || function (decorators, target, key, desc) {
2106
- var c = arguments.length, r = c < 3 ? target : desc === null ? desc = Object.getOwnPropertyDescriptor(target, key) : desc, d;
2107
- if (typeof Reflect === "object" && typeof Reflect.decorate === "function") r = Reflect.decorate(decorators, target, key, desc);
2108
- 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;
2109
- return c > 3 && r && Object.defineProperty(target, key, r), r;
2110
- };
2111
- var __metadata = (this && this.__metadata) || function (k, v) {
2112
- if (typeof Reflect === "object" && typeof Reflect.metadata === "function") return Reflect.metadata(k, v);
2113
- };
2114
- var _a, _b, _c, _d, _e, _f, _g, _h, _j;
2115
- Object.defineProperty(exports, "__esModule", ({ value: true }));
2116
- exports.PurchaseOrder = void 0;
2117
- const sequelize_typescript_1 = __webpack_require__(9);
2118
- const vendor_entity_1 = __webpack_require__(41);
2119
- const inventory_entity_1 = __webpack_require__(35);
2120
- const sys_user_entity_1 = __webpack_require__(14);
2121
- const purchase_order_item_entity_1 = __webpack_require__(44);
2122
- const purchaseOrderStatus_1 = __webpack_require__(45);
2123
- let PurchaseOrder = class PurchaseOrder extends sequelize_typescript_1.Model {
2124
- };
2125
- exports.PurchaseOrder = PurchaseOrder;
2126
- __decorate([
2127
- (0, sequelize_typescript_1.Column)({ allowNull: false, unique: true }),
2128
- __metadata("design:type", String)
2129
- ], PurchaseOrder.prototype, "poNumber", void 0);
2130
- __decorate([
2131
- (0, sequelize_typescript_1.ForeignKey)(() => vendor_entity_1.Vendor),
2132
- (0, sequelize_typescript_1.Column)({ allowNull: false }),
2133
- __metadata("design:type", Number)
2134
- ], PurchaseOrder.prototype, "vendorId", void 0);
2135
- __decorate([
2136
- (0, sequelize_typescript_1.ForeignKey)(() => inventory_entity_1.Inventory),
2137
- (0, sequelize_typescript_1.Column)({ allowNull: false }),
2138
- __metadata("design:type", Number)
2139
- ], PurchaseOrder.prototype, "inventoryId", void 0);
2140
- __decorate([
2141
- (0, sequelize_typescript_1.Column)({
2142
- type: sequelize_typescript_1.DataType.ENUM(...Object.values(purchaseOrderStatus_1.PurchaseOrderStatus)),
2143
- defaultValue: purchaseOrderStatus_1.PurchaseOrderStatus.DRAFT,
2144
- }),
2145
- __metadata("design:type", typeof (_a = typeof purchaseOrderStatus_1.PurchaseOrderStatus !== "undefined" && purchaseOrderStatus_1.PurchaseOrderStatus) === "function" ? _a : Object)
2146
- ], PurchaseOrder.prototype, "status", void 0);
2147
- __decorate([
2148
- (0, sequelize_typescript_1.Column)({ type: sequelize_typescript_1.DataType.DECIMAL(10, 3), defaultValue: 0 }),
2149
- __metadata("design:type", Number)
2150
- ], PurchaseOrder.prototype, "totalAmount", void 0);
2151
- __decorate([
2152
- (0, sequelize_typescript_1.Column)({ allowNull: false, defaultValue: 'USD' }),
2153
- __metadata("design:type", String)
2154
- ], PurchaseOrder.prototype, "currency", void 0);
2155
- __decorate([
2156
- (0, sequelize_typescript_1.Column)({ allowNull: true }),
2157
- __metadata("design:type", typeof (_b = typeof Date !== "undefined" && Date) === "function" ? _b : Object)
2158
- ], PurchaseOrder.prototype, "expectedDeliveryDate", void 0);
2159
- __decorate([
2160
- (0, sequelize_typescript_1.Column)({ allowNull: true }),
2161
- __metadata("design:type", typeof (_c = typeof Date !== "undefined" && Date) === "function" ? _c : Object)
2162
- ], PurchaseOrder.prototype, "sentAt", void 0);
2163
- __decorate([
2164
- (0, sequelize_typescript_1.Column)({ allowNull: true }),
2165
- __metadata("design:type", typeof (_d = typeof Date !== "undefined" && Date) === "function" ? _d : Object)
2166
- ], PurchaseOrder.prototype, "closedAt", void 0);
2167
- __decorate([
2168
- (0, sequelize_typescript_1.Column)({ allowNull: true }),
2169
- __metadata("design:type", typeof (_e = typeof Date !== "undefined" && Date) === "function" ? _e : Object)
2170
- ], PurchaseOrder.prototype, "cancelledAt", void 0);
2171
- __decorate([
2172
- (0, sequelize_typescript_1.Column)({ type: sequelize_typescript_1.DataType.TEXT, allowNull: true }),
2173
- __metadata("design:type", String)
2174
- ], PurchaseOrder.prototype, "cancellationReason", void 0);
2175
- __decorate([
2176
- (0, sequelize_typescript_1.Column)({ type: sequelize_typescript_1.DataType.TEXT, allowNull: true }),
2177
- __metadata("design:type", String)
2178
- ], PurchaseOrder.prototype, "notes", void 0);
2179
- __decorate([
2180
- (0, sequelize_typescript_1.ForeignKey)(() => sys_user_entity_1.SysUser),
2181
- (0, sequelize_typescript_1.Column)({ allowNull: true }),
2182
- __metadata("design:type", Number)
2183
- ], PurchaseOrder.prototype, "createdBy", void 0);
2184
- __decorate([
2185
- (0, sequelize_typescript_1.ForeignKey)(() => sys_user_entity_1.SysUser),
2186
- (0, sequelize_typescript_1.Column)({ allowNull: true }),
2187
- __metadata("design:type", Number)
2188
- ], PurchaseOrder.prototype, "sentBy", void 0);
2189
- __decorate([
2190
- (0, sequelize_typescript_1.BelongsTo)(() => vendor_entity_1.Vendor),
2191
- __metadata("design:type", typeof (_f = typeof vendor_entity_1.Vendor !== "undefined" && vendor_entity_1.Vendor) === "function" ? _f : Object)
2192
- ], PurchaseOrder.prototype, "vendor", void 0);
2193
- __decorate([
2194
- (0, sequelize_typescript_1.BelongsTo)(() => inventory_entity_1.Inventory),
2195
- __metadata("design:type", typeof (_g = typeof inventory_entity_1.Inventory !== "undefined" && inventory_entity_1.Inventory) === "function" ? _g : Object)
2196
- ], PurchaseOrder.prototype, "inventory", void 0);
2197
- __decorate([
2198
- (0, sequelize_typescript_1.BelongsTo)(() => sys_user_entity_1.SysUser, { foreignKey: 'createdBy', as: 'creator' }),
2199
- __metadata("design:type", typeof (_h = typeof sys_user_entity_1.SysUser !== "undefined" && sys_user_entity_1.SysUser) === "function" ? _h : Object)
2200
- ], PurchaseOrder.prototype, "creator", void 0);
2201
- __decorate([
2202
- (0, sequelize_typescript_1.BelongsTo)(() => sys_user_entity_1.SysUser, { foreignKey: 'sentBy', as: 'sender' }),
2203
- __metadata("design:type", typeof (_j = typeof sys_user_entity_1.SysUser !== "undefined" && sys_user_entity_1.SysUser) === "function" ? _j : Object)
2204
- ], PurchaseOrder.prototype, "sender", void 0);
2205
- __decorate([
2206
- (0, sequelize_typescript_1.HasMany)(() => purchase_order_item_entity_1.PurchaseOrderItem),
2207
- __metadata("design:type", Array)
2208
- ], PurchaseOrder.prototype, "items", void 0);
2209
- exports.PurchaseOrder = PurchaseOrder = __decorate([
2210
- sequelize_typescript_1.Table
2211
- ], PurchaseOrder);
2212
-
2213
-
2214
- /***/ }),
2215
- /* 44 */
2216
- /***/ (function(__unused_webpack_module, exports, __webpack_require__) {
2217
-
2218
-
2219
- var __decorate = (this && this.__decorate) || function (decorators, target, key, desc) {
2220
- var c = arguments.length, r = c < 3 ? target : desc === null ? desc = Object.getOwnPropertyDescriptor(target, key) : desc, d;
2221
- if (typeof Reflect === "object" && typeof Reflect.decorate === "function") r = Reflect.decorate(decorators, target, key, desc);
2222
- 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;
2223
- return c > 3 && r && Object.defineProperty(target, key, r), r;
2224
- };
2225
- var __metadata = (this && this.__metadata) || function (k, v) {
2226
- if (typeof Reflect === "object" && typeof Reflect.metadata === "function") return Reflect.metadata(k, v);
2227
- };
2228
- var _a, _b, _c;
2229
- Object.defineProperty(exports, "__esModule", ({ value: true }));
2230
- exports.PurchaseOrderItem = exports.PurchaseOrderItemStatus = void 0;
2231
- const sequelize_typescript_1 = __webpack_require__(9);
2232
- const purchase_order_entity_1 = __webpack_require__(43);
2233
- const product_entity_1 = __webpack_require__(28);
2234
- const product_variant_entity_1 = __webpack_require__(30);
2235
- var PurchaseOrderItemStatus;
2236
- (function (PurchaseOrderItemStatus) {
2237
- PurchaseOrderItemStatus["PENDING"] = "pending";
2238
- PurchaseOrderItemStatus["PARTIALLY_RECEIVED"] = "partially_received";
2239
- PurchaseOrderItemStatus["FULLY_RECEIVED"] = "fully_received";
2240
- PurchaseOrderItemStatus["CANCELLED"] = "cancelled";
2241
- })(PurchaseOrderItemStatus || (exports.PurchaseOrderItemStatus = PurchaseOrderItemStatus = {}));
2242
- let PurchaseOrderItem = class PurchaseOrderItem extends sequelize_typescript_1.Model {
2243
- };
2244
- exports.PurchaseOrderItem = PurchaseOrderItem;
2245
- __decorate([
2246
- (0, sequelize_typescript_1.ForeignKey)(() => purchase_order_entity_1.PurchaseOrder),
2247
- (0, sequelize_typescript_1.Column)({ allowNull: false }),
2248
- __metadata("design:type", Number)
2249
- ], PurchaseOrderItem.prototype, "purchaseOrderId", void 0);
2250
- __decorate([
2251
- (0, sequelize_typescript_1.ForeignKey)(() => product_entity_1.Product),
2252
- (0, sequelize_typescript_1.Column)({ allowNull: false }),
2253
- __metadata("design:type", Number)
2254
- ], PurchaseOrderItem.prototype, "productId", void 0);
2255
- __decorate([
2256
- (0, sequelize_typescript_1.ForeignKey)(() => product_variant_entity_1.ProductVariant),
2257
- (0, sequelize_typescript_1.Column)({ allowNull: true }),
2258
- __metadata("design:type", Number)
2259
- ], PurchaseOrderItem.prototype, "productVariantId", void 0);
2260
- __decorate([
2261
- (0, sequelize_typescript_1.Column)({ allowNull: false }),
2262
- __metadata("design:type", Number)
2263
- ], PurchaseOrderItem.prototype, "orderedQuantity", void 0);
2264
- __decorate([
2265
- (0, sequelize_typescript_1.Column)({ defaultValue: 0 }),
2266
- __metadata("design:type", Number)
2267
- ], PurchaseOrderItem.prototype, "receivedQuantity", void 0);
2268
- __decorate([
2269
- (0, sequelize_typescript_1.Column)({ defaultValue: 0 }),
2270
- __metadata("design:type", Number)
2271
- ], PurchaseOrderItem.prototype, "reservedQuantity", void 0);
2272
- __decorate([
2273
- (0, sequelize_typescript_1.Column)({ type: sequelize_typescript_1.DataType.DECIMAL(10, 3), allowNull: false }),
2274
- __metadata("design:type", Number)
2275
- ], PurchaseOrderItem.prototype, "unitCostPrice", void 0);
2276
- __decorate([
2277
- (0, sequelize_typescript_1.Column)({ type: sequelize_typescript_1.DataType.DECIMAL(10, 3), defaultValue: 0 }),
2278
- __metadata("design:type", Number)
2279
- ], PurchaseOrderItem.prototype, "totalCostPrice", void 0);
2280
- __decorate([
2281
- (0, sequelize_typescript_1.Column)({
2282
- type: sequelize_typescript_1.DataType.ENUM(...Object.values(PurchaseOrderItemStatus)),
2283
- defaultValue: PurchaseOrderItemStatus.PENDING,
2284
- }),
2285
- __metadata("design:type", String)
2286
- ], PurchaseOrderItem.prototype, "status", void 0);
2287
- __decorate([
2288
- (0, sequelize_typescript_1.Column)({ allowNull: true }),
2289
- __metadata("design:type", Number)
2290
- ], PurchaseOrderItem.prototype, "triggerOrderId", void 0);
2291
- __decorate([
2292
- (0, sequelize_typescript_1.BelongsTo)(() => purchase_order_entity_1.PurchaseOrder),
2293
- __metadata("design:type", typeof (_a = typeof purchase_order_entity_1.PurchaseOrder !== "undefined" && purchase_order_entity_1.PurchaseOrder) === "function" ? _a : Object)
2294
- ], PurchaseOrderItem.prototype, "purchaseOrder", void 0);
2295
- __decorate([
2296
- (0, sequelize_typescript_1.BelongsTo)(() => product_entity_1.Product),
2297
- __metadata("design:type", typeof (_b = typeof product_entity_1.Product !== "undefined" && product_entity_1.Product) === "function" ? _b : Object)
2298
- ], PurchaseOrderItem.prototype, "product", void 0);
2299
- __decorate([
2300
- (0, sequelize_typescript_1.BelongsTo)(() => product_variant_entity_1.ProductVariant),
2301
- __metadata("design:type", typeof (_c = typeof product_variant_entity_1.ProductVariant !== "undefined" && product_variant_entity_1.ProductVariant) === "function" ? _c : Object)
2302
- ], PurchaseOrderItem.prototype, "variant", void 0);
2303
- exports.PurchaseOrderItem = PurchaseOrderItem = __decorate([
2304
- sequelize_typescript_1.Table
2305
- ], PurchaseOrderItem);
2306
-
2307
-
2308
- /***/ }),
2309
- /* 45 */
2310
- /***/ ((__unused_webpack_module, exports) => {
2311
-
2312
-
2313
- Object.defineProperty(exports, "__esModule", ({ value: true }));
2314
- exports.PurchaseOrderStatus = void 0;
2315
- var PurchaseOrderStatus;
2316
- (function (PurchaseOrderStatus) {
2317
- PurchaseOrderStatus["DRAFT"] = "draft";
2318
- PurchaseOrderStatus["SENT_TO_VENDOR"] = "sent_to_vendor";
2319
- PurchaseOrderStatus["PARTIALLY_RECEIVED"] = "partially_received";
2320
- PurchaseOrderStatus["FULLY_RECEIVED"] = "fully_received";
2321
- PurchaseOrderStatus["CLOSED"] = "closed";
2322
- PurchaseOrderStatus["CANCELLED"] = "cancelled";
2323
- })(PurchaseOrderStatus || (exports.PurchaseOrderStatus = PurchaseOrderStatus = {}));
2324
-
2325
-
2326
- /***/ })
2327
- /******/ ]);
2328
- /************************************************************************/
2329
- /******/ // The module cache
2330
- /******/ var __webpack_module_cache__ = {};
2331
- /******/
2332
- /******/ // The require function
2333
- /******/ function __webpack_require__(moduleId) {
2334
- /******/ // Check if module is in cache
2335
- /******/ var cachedModule = __webpack_module_cache__[moduleId];
2336
- /******/ if (cachedModule !== undefined) {
2337
- /******/ return cachedModule.exports;
2338
- /******/ }
2339
- /******/ // Create a new module (and put it into the cache)
2340
- /******/ var module = __webpack_module_cache__[moduleId] = {
2341
- /******/ // no module.id needed
2342
- /******/ // no module.loaded needed
2343
- /******/ exports: {}
2344
- /******/ };
2345
- /******/
2346
- /******/ // Execute the module function
2347
- /******/ __webpack_modules__[moduleId].call(module.exports, module, module.exports, __webpack_require__);
2348
- /******/
2349
- /******/ // Return the exports of the module
2350
- /******/ return module.exports;
2351
- /******/ }
2352
- /******/
2353
- /************************************************************************/
2354
- var __webpack_exports__ = {};
2355
- // This entry needs to be wrapped in an IIFE because it needs to be isolated against other modules in the chunk.
2356
- (() => {
2357
- var exports = __webpack_exports__;
2358
-
2359
- Object.defineProperty(exports, "__esModule", ({ value: true }));
2360
- __webpack_require__(1);
2361
- const core_1 = __webpack_require__(2);
2362
- const app_module_1 = __webpack_require__(3);
2363
- async function bootstrap() {
2364
- const app = await core_1.NestFactory.create(app_module_1.AppModule, { cors: true });
2365
- await app.listen(process.env.SERVER_PORT ?? 9004);
2366
- }
2367
- bootstrap();
2368
-
2369
- })();
2370
-
2371
- /******/ })()
2372
- ;