tt-entities 0.0.17 → 0.0.19
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/dist/src/main.js +290 -220
- package/libs/tatayab-entities-library/src/entities/product-store.entity.ts +11 -1
- package/libs/tatayab-entities-library/src/entities/product-tag.entity.ts +19 -0
- package/libs/tatayab-entities-library/src/entities/product.entity.ts +5 -0
- package/libs/tatayab-entities-library/src/entities/tag.entity.ts +38 -0
- package/libs/tatayab-entities-library/src/index.ts +7 -3
- package/package.json +1 -1
- package/dist/libs/tatayab-entities-library/src/entities/apikey.entity.d.ts +0 -15
- package/dist/libs/tatayab-entities-library/src/entities/apikey.entity.js +0 -62
- package/dist/libs/tatayab-entities-library/src/entities/apikey.entity.js.map +0 -1
- package/dist/libs/tatayab-entities-library/src/entities/area.entity.d.ts +0 -7
- package/dist/libs/tatayab-entities-library/src/entities/area.entity.js +0 -37
- package/dist/libs/tatayab-entities-library/src/entities/area.entity.js.map +0 -1
- package/dist/libs/tatayab-entities-library/src/entities/brand.entity.d.ts +0 -12
- package/dist/libs/tatayab-entities-library/src/entities/brand.entity.js +0 -56
- package/dist/libs/tatayab-entities-library/src/entities/brand.entity.js.map +0 -1
- package/dist/libs/tatayab-entities-library/src/entities/category.entity.d.ts +0 -14
- package/dist/libs/tatayab-entities-library/src/entities/category.entity.js +0 -65
- package/dist/libs/tatayab-entities-library/src/entities/category.entity.js.map +0 -1
- package/dist/libs/tatayab-entities-library/src/entities/country.entity.d.ts +0 -8
- package/dist/libs/tatayab-entities-library/src/entities/country.entity.js +0 -40
- package/dist/libs/tatayab-entities-library/src/entities/country.entity.js.map +0 -1
- package/dist/libs/tatayab-entities-library/src/entities/inventory-stock.entity.d.ts +0 -16
- package/dist/libs/tatayab-entities-library/src/entities/inventory-stock.entity.js +0 -66
- package/dist/libs/tatayab-entities-library/src/entities/inventory-stock.entity.js.map +0 -1
- package/dist/libs/tatayab-entities-library/src/entities/inventory.entity.d.ts +0 -15
- package/dist/libs/tatayab-entities-library/src/entities/inventory.entity.js +0 -63
- package/dist/libs/tatayab-entities-library/src/entities/inventory.entity.js.map +0 -1
- package/dist/libs/tatayab-entities-library/src/entities/permission.entity.d.ts +0 -8
- package/dist/libs/tatayab-entities-library/src/entities/permission.entity.js +0 -38
- package/dist/libs/tatayab-entities-library/src/entities/permission.entity.js.map +0 -1
- package/dist/libs/tatayab-entities-library/src/entities/product-media.entity.d.ts +0 -16
- package/dist/libs/tatayab-entities-library/src/entities/product-media.entity.js +0 -62
- package/dist/libs/tatayab-entities-library/src/entities/product-media.entity.js.map +0 -1
- package/dist/libs/tatayab-entities-library/src/entities/product-store.entity.d.ts +0 -8
- package/dist/libs/tatayab-entities-library/src/entities/product-store.entity.js +0 -44
- package/dist/libs/tatayab-entities-library/src/entities/product-store.entity.js.map +0 -1
- package/dist/libs/tatayab-entities-library/src/entities/product-variant-option.entity.d.ts +0 -5
- package/dist/libs/tatayab-entities-library/src/entities/product-variant-option.entity.js +0 -32
- package/dist/libs/tatayab-entities-library/src/entities/product-variant-option.entity.js.map +0 -1
- package/dist/libs/tatayab-entities-library/src/entities/product-variant.entity.d.ts +0 -15
- package/dist/libs/tatayab-entities-library/src/entities/product-variant.entity.js +0 -64
- package/dist/libs/tatayab-entities-library/src/entities/product-variant.entity.js.map +0 -1
- package/dist/libs/tatayab-entities-library/src/entities/product.entity.d.ts +0 -27
- package/dist/libs/tatayab-entities-library/src/entities/product.entity.js +0 -104
- package/dist/libs/tatayab-entities-library/src/entities/product.entity.js.map +0 -1
- package/dist/libs/tatayab-entities-library/src/entities/purchase-order-item.entity.d.ts +0 -25
- package/dist/libs/tatayab-entities-library/src/entities/purchase-order-item.entity.js +0 -88
- package/dist/libs/tatayab-entities-library/src/entities/purchase-order-item.entity.js.map +0 -1
- package/dist/libs/tatayab-entities-library/src/entities/purchase-order.entity.d.ts +0 -27
- package/dist/libs/tatayab-entities-library/src/entities/purchase-order.entity.js +0 -108
- package/dist/libs/tatayab-entities-library/src/entities/purchase-order.entity.js.map +0 -1
- package/dist/libs/tatayab-entities-library/src/entities/role-permission.entity.d.ts +0 -5
- package/dist/libs/tatayab-entities-library/src/entities/role-permission.entity.js +0 -32
- package/dist/libs/tatayab-entities-library/src/entities/role-permission.entity.js.map +0 -1
- package/dist/libs/tatayab-entities-library/src/entities/stock-movement.entity.d.ts +0 -23
- package/dist/libs/tatayab-entities-library/src/entities/stock-movement.entity.js +0 -92
- package/dist/libs/tatayab-entities-library/src/entities/stock-movement.entity.js.map +0 -1
- package/dist/libs/tatayab-entities-library/src/entities/store-inventory.entity.d.ts +0 -6
- package/dist/libs/tatayab-entities-library/src/entities/store-inventory.entity.js +0 -36
- package/dist/libs/tatayab-entities-library/src/entities/store-inventory.entity.js.map +0 -1
- package/dist/libs/tatayab-entities-library/src/entities/store.entity.d.ts +0 -21
- package/dist/libs/tatayab-entities-library/src/entities/store.entity.js +0 -86
- package/dist/libs/tatayab-entities-library/src/entities/store.entity.js.map +0 -1
- package/dist/libs/tatayab-entities-library/src/entities/sys.role.entity.d.ts +0 -7
- package/dist/libs/tatayab-entities-library/src/entities/sys.role.entity.js +0 -34
- package/dist/libs/tatayab-entities-library/src/entities/sys.role.entity.js.map +0 -1
- package/dist/libs/tatayab-entities-library/src/entities/sys.user.entity.d.ts +0 -16
- package/dist/libs/tatayab-entities-library/src/entities/sys.user.entity.js +0 -70
- package/dist/libs/tatayab-entities-library/src/entities/sys.user.entity.js.map +0 -1
- package/dist/libs/tatayab-entities-library/src/entities/translation.entity.d.ts +0 -9
- package/dist/libs/tatayab-entities-library/src/entities/translation.entity.js +0 -44
- package/dist/libs/tatayab-entities-library/src/entities/translation.entity.js.map +0 -1
- package/dist/libs/tatayab-entities-library/src/entities/user.entity.d.ts +0 -27
- package/dist/libs/tatayab-entities-library/src/entities/user.entity.js +0 -114
- package/dist/libs/tatayab-entities-library/src/entities/user.entity.js.map +0 -1
- package/dist/libs/tatayab-entities-library/src/entities/userDevice.entity.d.ts +0 -11
- package/dist/libs/tatayab-entities-library/src/entities/userDevice.entity.js +0 -54
- package/dist/libs/tatayab-entities-library/src/entities/userDevice.entity.js.map +0 -1
- package/dist/libs/tatayab-entities-library/src/entities/variant-option.entity.d.ts +0 -11
- package/dist/libs/tatayab-entities-library/src/entities/variant-option.entity.js +0 -50
- package/dist/libs/tatayab-entities-library/src/entities/variant-option.entity.js.map +0 -1
- package/dist/libs/tatayab-entities-library/src/entities/variant-type.entity.d.ts +0 -7
- package/dist/libs/tatayab-entities-library/src/entities/variant-type.entity.js +0 -37
- package/dist/libs/tatayab-entities-library/src/entities/variant-type.entity.js.map +0 -1
- package/dist/libs/tatayab-entities-library/src/entities/vendor-product.entity.d.ts +0 -19
- package/dist/libs/tatayab-entities-library/src/entities/vendor-product.entity.js +0 -78
- package/dist/libs/tatayab-entities-library/src/entities/vendor-product.entity.js.map +0 -1
- package/dist/libs/tatayab-entities-library/src/entities/vendor.entity.d.ts +0 -19
- package/dist/libs/tatayab-entities-library/src/entities/vendor.entity.js +0 -82
- package/dist/libs/tatayab-entities-library/src/entities/vendor.entity.js.map +0 -1
- package/dist/libs/tatayab-entities-library/src/index.d.ts +0 -38
- package/dist/libs/tatayab-entities-library/src/index.js +0 -139
- package/dist/libs/tatayab-entities-library/src/index.js.map +0 -1
- package/dist/libs/tatayab-entities-library/src/utils/enums/gender.d.ts +0 -5
- package/dist/libs/tatayab-entities-library/src/utils/enums/gender.js +0 -10
- package/dist/libs/tatayab-entities-library/src/utils/enums/gender.js.map +0 -1
- package/dist/libs/tatayab-entities-library/src/utils/enums/language.d.ts +0 -4
- package/dist/libs/tatayab-entities-library/src/utils/enums/language.js +0 -9
- package/dist/libs/tatayab-entities-library/src/utils/enums/language.js.map +0 -1
- package/dist/libs/tatayab-entities-library/src/utils/enums/osName.d.ts +0 -5
- package/dist/libs/tatayab-entities-library/src/utils/enums/osName.js +0 -10
- package/dist/libs/tatayab-entities-library/src/utils/enums/osName.js.map +0 -1
- package/dist/libs/tatayab-entities-library/src/utils/enums/productApp.d.ts +0 -4
- package/dist/libs/tatayab-entities-library/src/utils/enums/productApp.js +0 -9
- package/dist/libs/tatayab-entities-library/src/utils/enums/productApp.js.map +0 -1
- package/dist/libs/tatayab-entities-library/src/utils/enums/purchaseOrderStatus.d.ts +0 -8
- package/dist/libs/tatayab-entities-library/src/utils/enums/purchaseOrderStatus.js +0 -13
- package/dist/libs/tatayab-entities-library/src/utils/enums/purchaseOrderStatus.js.map +0 -1
- package/dist/libs/tatayab-entities-library/src/utils/enums/status.d.ts +0 -4
- package/dist/libs/tatayab-entities-library/src/utils/enums/status.js +0 -9
- package/dist/libs/tatayab-entities-library/src/utils/enums/status.js.map +0 -1
- package/dist/libs/tatayab-entities-library/src/utils/enums/stockMovementType.d.ts +0 -11
- package/dist/libs/tatayab-entities-library/src/utils/enums/stockMovementType.js +0 -16
- package/dist/libs/tatayab-entities-library/src/utils/enums/stockMovementType.js.map +0 -1
- package/dist/libs/tatayab-entities-library/src/utils/enums/versiontype.d.ts +0 -4
- package/dist/libs/tatayab-entities-library/src/utils/enums/versiontype.js +0 -9
- package/dist/libs/tatayab-entities-library/src/utils/enums/versiontype.js.map +0 -1
- package/dist/src/app.module.d.ts +0 -2
- package/dist/src/app.module.js +0 -43
- package/dist/src/app.module.js.map +0 -1
- package/dist/src/main.d.ts +0 -1
- package/dist/src/main.js.map +0 -1
- package/dist/test/app.e2e-spec.d.ts +0 -1
- package/dist/test/app.e2e-spec.js +0 -22
- package/dist/test/app.e2e-spec.js.map +0 -1
- package/libs/tatayab-entities-library/src/entities/translation.entity.ts +0 -17
|
@@ -1,63 +0,0 @@
|
|
|
1
|
-
"use strict";
|
|
2
|
-
var __decorate = (this && this.__decorate) || function (decorators, target, key, desc) {
|
|
3
|
-
var c = arguments.length, r = c < 3 ? target : desc === null ? desc = Object.getOwnPropertyDescriptor(target, key) : desc, d;
|
|
4
|
-
if (typeof Reflect === "object" && typeof Reflect.decorate === "function") r = Reflect.decorate(decorators, target, key, desc);
|
|
5
|
-
else for (var i = decorators.length - 1; i >= 0; i--) if (d = decorators[i]) r = (c < 3 ? d(r) : c > 3 ? d(target, key, r) : d(target, key)) || r;
|
|
6
|
-
return c > 3 && r && Object.defineProperty(target, key, r), r;
|
|
7
|
-
};
|
|
8
|
-
var __metadata = (this && this.__metadata) || function (k, v) {
|
|
9
|
-
if (typeof Reflect === "object" && typeof Reflect.metadata === "function") return Reflect.metadata(k, v);
|
|
10
|
-
};
|
|
11
|
-
Object.defineProperty(exports, "__esModule", { value: true });
|
|
12
|
-
exports.Inventory = void 0;
|
|
13
|
-
const sequelize_typescript_1 = require("sequelize-typescript");
|
|
14
|
-
const inventory_stock_entity_1 = require("./inventory-stock.entity");
|
|
15
|
-
const store_inventory_entity_1 = require("./store-inventory.entity");
|
|
16
|
-
const store_entity_1 = require("./store.entity");
|
|
17
|
-
const status_1 = require("../utils/enums/status");
|
|
18
|
-
let Inventory = class Inventory extends sequelize_typescript_1.Model {
|
|
19
|
-
};
|
|
20
|
-
exports.Inventory = Inventory;
|
|
21
|
-
__decorate([
|
|
22
|
-
(0, sequelize_typescript_1.Column)({ allowNull: false }),
|
|
23
|
-
__metadata("design:type", String)
|
|
24
|
-
], Inventory.prototype, "nameEn", void 0);
|
|
25
|
-
__decorate([
|
|
26
|
-
(0, sequelize_typescript_1.Column)({ allowNull: false }),
|
|
27
|
-
__metadata("design:type", String)
|
|
28
|
-
], Inventory.prototype, "nameAr", void 0);
|
|
29
|
-
__decorate([
|
|
30
|
-
(0, sequelize_typescript_1.Column)({ type: sequelize_typescript_1.DataType.TEXT, allowNull: true }),
|
|
31
|
-
__metadata("design:type", String)
|
|
32
|
-
], Inventory.prototype, "addressEn", void 0);
|
|
33
|
-
__decorate([
|
|
34
|
-
(0, sequelize_typescript_1.Column)({ type: sequelize_typescript_1.DataType.TEXT, allowNull: true }),
|
|
35
|
-
__metadata("design:type", String)
|
|
36
|
-
], Inventory.prototype, "addressAr", void 0);
|
|
37
|
-
__decorate([
|
|
38
|
-
(0, sequelize_typescript_1.Column)({ allowNull: true }),
|
|
39
|
-
__metadata("design:type", String)
|
|
40
|
-
], Inventory.prototype, "contactPhone", void 0);
|
|
41
|
-
__decorate([
|
|
42
|
-
(0, sequelize_typescript_1.Column)({ allowNull: true }),
|
|
43
|
-
__metadata("design:type", String)
|
|
44
|
-
], Inventory.prototype, "contactEmail", void 0);
|
|
45
|
-
__decorate([
|
|
46
|
-
(0, sequelize_typescript_1.Column)({
|
|
47
|
-
type: sequelize_typescript_1.DataType.ENUM(...Object.values(status_1.Status)),
|
|
48
|
-
defaultValue: status_1.Status.ACTIVE,
|
|
49
|
-
}),
|
|
50
|
-
__metadata("design:type", String)
|
|
51
|
-
], Inventory.prototype, "status", void 0);
|
|
52
|
-
__decorate([
|
|
53
|
-
(0, sequelize_typescript_1.HasMany)(() => inventory_stock_entity_1.InventoryStock),
|
|
54
|
-
__metadata("design:type", Array)
|
|
55
|
-
], Inventory.prototype, "stocks", void 0);
|
|
56
|
-
__decorate([
|
|
57
|
-
(0, sequelize_typescript_1.BelongsToMany)(() => store_entity_1.Store, () => store_inventory_entity_1.StoreInventory),
|
|
58
|
-
__metadata("design:type", Array)
|
|
59
|
-
], Inventory.prototype, "stores", void 0);
|
|
60
|
-
exports.Inventory = Inventory = __decorate([
|
|
61
|
-
sequelize_typescript_1.Table
|
|
62
|
-
], Inventory);
|
|
63
|
-
//# sourceMappingURL=inventory.entity.js.map
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
{"version":3,"file":"inventory.entity.js","sourceRoot":"","sources":["../../../../../libs/tatayab-entities-library/src/entities/inventory.entity.ts"],"names":[],"mappings":";;;;;;;;;;;;AAAA,+DAO8B;AAC9B,qEAA0D;AAC1D,qEAA0D;AAC1D,iDAAuC;AACvC,kDAA+C;AAGxC,IAAM,SAAS,GAAf,MAAM,SAAU,SAAQ,4BAAK;CAgCnC,CAAA;AAhCY,8BAAS;AAEZ;IADP,IAAA,6BAAM,EAAC,EAAE,SAAS,EAAE,KAAK,EAAE,CAAC;;yCACN;AAGf;IADP,IAAA,6BAAM,EAAC,EAAE,SAAS,EAAE,KAAK,EAAE,CAAC;;yCACN;AAGf;IADP,IAAA,6BAAM,EAAC,EAAE,IAAI,EAAE,+BAAQ,CAAC,IAAI,EAAE,SAAS,EAAE,IAAI,EAAE,CAAC;;4CACtB;AAGnB;IADP,IAAA,6BAAM,EAAC,EAAE,IAAI,EAAE,+BAAQ,CAAC,IAAI,EAAE,SAAS,EAAE,IAAI,EAAE,CAAC;;4CACtB;AAGnB;IADP,IAAA,6BAAM,EAAC,EAAE,SAAS,EAAE,IAAI,EAAE,CAAC;;+CACE;AAGtB;IADP,IAAA,6BAAM,EAAC,EAAE,SAAS,EAAE,IAAI,EAAE,CAAC;;+CACE;AAMtB;IAJP,IAAA,6BAAM,EAAC;QACN,IAAI,EAAE,+BAAQ,CAAC,IAAI,CAAC,GAAG,MAAM,CAAC,MAAM,CAAC,eAAM,CAAC,CAAC;QAC7C,YAAY,EAAE,eAAM,CAAC,MAAM;KAC5B,CAAC;;yCACqB;AAKf;IADP,IAAA,8BAAO,EAAC,GAAG,EAAE,CAAC,uCAAc,CAAC;;yCACG;AAGzB;IADP,IAAA,oCAAa,EAAC,GAAG,EAAE,CAAC,oBAAK,EAAE,GAAG,EAAE,CAAC,uCAAc,CAAC;;yCACzB;oBA/Bb,SAAS;IADrB,4BAAK;GACO,SAAS,CAgCrB"}
|
|
@@ -1,38 +0,0 @@
|
|
|
1
|
-
"use strict";
|
|
2
|
-
var __decorate = (this && this.__decorate) || function (decorators, target, key, desc) {
|
|
3
|
-
var c = arguments.length, r = c < 3 ? target : desc === null ? desc = Object.getOwnPropertyDescriptor(target, key) : desc, d;
|
|
4
|
-
if (typeof Reflect === "object" && typeof Reflect.decorate === "function") r = Reflect.decorate(decorators, target, key, desc);
|
|
5
|
-
else for (var i = decorators.length - 1; i >= 0; i--) if (d = decorators[i]) r = (c < 3 ? d(r) : c > 3 ? d(target, key, r) : d(target, key)) || r;
|
|
6
|
-
return c > 3 && r && Object.defineProperty(target, key, r), r;
|
|
7
|
-
};
|
|
8
|
-
var __metadata = (this && this.__metadata) || function (k, v) {
|
|
9
|
-
if (typeof Reflect === "object" && typeof Reflect.metadata === "function") return Reflect.metadata(k, v);
|
|
10
|
-
};
|
|
11
|
-
Object.defineProperty(exports, "__esModule", { value: true });
|
|
12
|
-
exports.Permission = void 0;
|
|
13
|
-
const sequelize_typescript_1 = require("sequelize-typescript");
|
|
14
|
-
const sys_role_entity_1 = require("./sys.role.entity");
|
|
15
|
-
const role_permission_entity_1 = require("./role-permission.entity");
|
|
16
|
-
let Permission = class Permission extends sequelize_typescript_1.Model {
|
|
17
|
-
};
|
|
18
|
-
exports.Permission = Permission;
|
|
19
|
-
__decorate([
|
|
20
|
-
(0, sequelize_typescript_1.Column)({ allowNull: false, unique: true }),
|
|
21
|
-
__metadata("design:type", String)
|
|
22
|
-
], Permission.prototype, "name", void 0);
|
|
23
|
-
__decorate([
|
|
24
|
-
(0, sequelize_typescript_1.Column)({ allowNull: false }),
|
|
25
|
-
__metadata("design:type", String)
|
|
26
|
-
], Permission.prototype, "displayName", void 0);
|
|
27
|
-
__decorate([
|
|
28
|
-
(0, sequelize_typescript_1.Column)({ allowNull: false }),
|
|
29
|
-
__metadata("design:type", String)
|
|
30
|
-
], Permission.prototype, "group", void 0);
|
|
31
|
-
__decorate([
|
|
32
|
-
(0, sequelize_typescript_1.BelongsToMany)(() => sys_role_entity_1.SysRole, () => role_permission_entity_1.RolePermission),
|
|
33
|
-
__metadata("design:type", Array)
|
|
34
|
-
], Permission.prototype, "roles", void 0);
|
|
35
|
-
exports.Permission = Permission = __decorate([
|
|
36
|
-
sequelize_typescript_1.Table
|
|
37
|
-
], Permission);
|
|
38
|
-
//# sourceMappingURL=permission.entity.js.map
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
{"version":3,"file":"permission.entity.js","sourceRoot":"","sources":["../../../../../libs/tatayab-entities-library/src/entities/permission.entity.ts"],"names":[],"mappings":";;;;;;;;;;;;AAAA,+DAK8B;AAC9B,uDAA4C;AAC5C,qEAA0D;AAGnD,IAAM,UAAU,GAAhB,MAAM,UAAW,SAAQ,4BAAK;CAepC,CAAA;AAfY,gCAAU;AAGb;IADP,IAAA,6BAAM,EAAC,EAAE,SAAS,EAAE,KAAK,EAAE,MAAM,EAAE,IAAI,EAAE,CAAC;;wCACtB;AAIb;IADP,IAAA,6BAAM,EAAC,EAAE,SAAS,EAAE,KAAK,EAAE,CAAC;;+CACD;AAIpB;IADP,IAAA,6BAAM,EAAC,EAAE,SAAS,EAAE,KAAK,EAAE,CAAC;;yCACP;AAGd;IADP,IAAA,oCAAa,EAAC,GAAG,EAAE,CAAC,yBAAO,EAAE,GAAG,EAAE,CAAC,uCAAc,CAAC;;yCAC1B;qBAdd,UAAU;IADtB,4BAAK;GACO,UAAU,CAetB"}
|
|
@@ -1,16 +0,0 @@
|
|
|
1
|
-
import { Model } from 'sequelize-typescript';
|
|
2
|
-
import { Product } from './product.entity';
|
|
3
|
-
export declare enum MediaType {
|
|
4
|
-
IMAGE = "image",
|
|
5
|
-
VIDEO = "video"
|
|
6
|
-
}
|
|
7
|
-
export declare class ProductMedia extends Model {
|
|
8
|
-
productId: number;
|
|
9
|
-
url: string;
|
|
10
|
-
type: MediaType;
|
|
11
|
-
isDefault: boolean;
|
|
12
|
-
sortOrder: number;
|
|
13
|
-
altEn?: string;
|
|
14
|
-
altAr?: string;
|
|
15
|
-
product: Product;
|
|
16
|
-
}
|
|
@@ -1,62 +0,0 @@
|
|
|
1
|
-
"use strict";
|
|
2
|
-
var __decorate = (this && this.__decorate) || function (decorators, target, key, desc) {
|
|
3
|
-
var c = arguments.length, r = c < 3 ? target : desc === null ? desc = Object.getOwnPropertyDescriptor(target, key) : desc, d;
|
|
4
|
-
if (typeof Reflect === "object" && typeof Reflect.decorate === "function") r = Reflect.decorate(decorators, target, key, desc);
|
|
5
|
-
else for (var i = decorators.length - 1; i >= 0; i--) if (d = decorators[i]) r = (c < 3 ? d(r) : c > 3 ? d(target, key, r) : d(target, key)) || r;
|
|
6
|
-
return c > 3 && r && Object.defineProperty(target, key, r), r;
|
|
7
|
-
};
|
|
8
|
-
var __metadata = (this && this.__metadata) || function (k, v) {
|
|
9
|
-
if (typeof Reflect === "object" && typeof Reflect.metadata === "function") return Reflect.metadata(k, v);
|
|
10
|
-
};
|
|
11
|
-
Object.defineProperty(exports, "__esModule", { value: true });
|
|
12
|
-
exports.ProductMedia = exports.MediaType = void 0;
|
|
13
|
-
const sequelize_typescript_1 = require("sequelize-typescript");
|
|
14
|
-
const product_entity_1 = require("./product.entity");
|
|
15
|
-
var MediaType;
|
|
16
|
-
(function (MediaType) {
|
|
17
|
-
MediaType["IMAGE"] = "image";
|
|
18
|
-
MediaType["VIDEO"] = "video";
|
|
19
|
-
})(MediaType || (exports.MediaType = MediaType = {}));
|
|
20
|
-
let ProductMedia = class ProductMedia extends sequelize_typescript_1.Model {
|
|
21
|
-
};
|
|
22
|
-
exports.ProductMedia = ProductMedia;
|
|
23
|
-
__decorate([
|
|
24
|
-
(0, sequelize_typescript_1.ForeignKey)(() => product_entity_1.Product),
|
|
25
|
-
(0, sequelize_typescript_1.Column)({ allowNull: false }),
|
|
26
|
-
__metadata("design:type", Number)
|
|
27
|
-
], ProductMedia.prototype, "productId", void 0);
|
|
28
|
-
__decorate([
|
|
29
|
-
(0, sequelize_typescript_1.Column)({ allowNull: false }),
|
|
30
|
-
__metadata("design:type", String)
|
|
31
|
-
], ProductMedia.prototype, "url", void 0);
|
|
32
|
-
__decorate([
|
|
33
|
-
(0, sequelize_typescript_1.Column)({
|
|
34
|
-
type: sequelize_typescript_1.DataType.ENUM(...Object.values(MediaType)),
|
|
35
|
-
defaultValue: MediaType.IMAGE,
|
|
36
|
-
}),
|
|
37
|
-
__metadata("design:type", String)
|
|
38
|
-
], ProductMedia.prototype, "type", void 0);
|
|
39
|
-
__decorate([
|
|
40
|
-
(0, sequelize_typescript_1.Column)({ defaultValue: false }),
|
|
41
|
-
__metadata("design:type", Boolean)
|
|
42
|
-
], ProductMedia.prototype, "isDefault", void 0);
|
|
43
|
-
__decorate([
|
|
44
|
-
(0, sequelize_typescript_1.Column)({ defaultValue: 0 }),
|
|
45
|
-
__metadata("design:type", Number)
|
|
46
|
-
], ProductMedia.prototype, "sortOrder", void 0);
|
|
47
|
-
__decorate([
|
|
48
|
-
(0, sequelize_typescript_1.Column)({ allowNull: true }),
|
|
49
|
-
__metadata("design:type", String)
|
|
50
|
-
], ProductMedia.prototype, "altEn", void 0);
|
|
51
|
-
__decorate([
|
|
52
|
-
(0, sequelize_typescript_1.Column)({ allowNull: true }),
|
|
53
|
-
__metadata("design:type", String)
|
|
54
|
-
], ProductMedia.prototype, "altAr", void 0);
|
|
55
|
-
__decorate([
|
|
56
|
-
(0, sequelize_typescript_1.BelongsTo)(() => product_entity_1.Product),
|
|
57
|
-
__metadata("design:type", product_entity_1.Product)
|
|
58
|
-
], ProductMedia.prototype, "product", void 0);
|
|
59
|
-
exports.ProductMedia = ProductMedia = __decorate([
|
|
60
|
-
sequelize_typescript_1.Table
|
|
61
|
-
], ProductMedia);
|
|
62
|
-
//# sourceMappingURL=product-media.entity.js.map
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
{"version":3,"file":"product-media.entity.js","sourceRoot":"","sources":["../../../../../libs/tatayab-entities-library/src/entities/product-media.entity.ts"],"names":[],"mappings":";;;;;;;;;;;;AAAA,+DAO8B;AAC9B,qDAA2C;AAE3C,IAAY,SAGX;AAHD,WAAY,SAAS;IACnB,4BAAe,CAAA;IACf,4BAAe,CAAA;AACjB,CAAC,EAHW,SAAS,yBAAT,SAAS,QAGpB;AAGM,IAAM,YAAY,GAAlB,MAAM,YAAa,SAAQ,4BAAK;CA4BtC,CAAA;AA5BY,oCAAY;AAGf;IAFP,IAAA,iCAAU,EAAC,GAAG,EAAE,CAAC,wBAAO,CAAC;IACzB,IAAA,6BAAM,EAAC,EAAE,SAAS,EAAE,KAAK,EAAE,CAAC;;+CACH;AAGlB;IADP,IAAA,6BAAM,EAAC,EAAE,SAAS,EAAE,KAAK,EAAE,CAAC;;yCACT;AAMZ;IAJP,IAAA,6BAAM,EAAC;QACN,IAAI,EAAE,+BAAQ,CAAC,IAAI,CAAC,GAAG,MAAM,CAAC,MAAM,CAAC,SAAS,CAAC,CAAC;QAChD,YAAY,EAAE,SAAS,CAAC,KAAK;KAC9B,CAAC;;0CACsB;AAGhB;IADP,IAAA,6BAAM,EAAC,EAAE,YAAY,EAAE,KAAK,EAAE,CAAC;;+CACL;AAGnB;IADP,IAAA,6BAAM,EAAC,EAAE,YAAY,EAAE,CAAC,EAAE,CAAC;;+CACF;AAGlB;IADP,IAAA,6BAAM,EAAC,EAAE,SAAS,EAAE,IAAI,EAAE,CAAC;;2CACL;AAGf;IADP,IAAA,6BAAM,EAAC,EAAE,SAAS,EAAE,IAAI,EAAE,CAAC;;2CACL;AAGf;IADP,IAAA,gCAAS,EAAC,GAAG,EAAE,CAAC,wBAAO,CAAC;8BACR,wBAAO;6CAAC;uBA3Bd,YAAY;IADxB,4BAAK;GACO,YAAY,CA4BxB"}
|
|
@@ -1,44 +0,0 @@
|
|
|
1
|
-
"use strict";
|
|
2
|
-
var __decorate = (this && this.__decorate) || function (decorators, target, key, desc) {
|
|
3
|
-
var c = arguments.length, r = c < 3 ? target : desc === null ? desc = Object.getOwnPropertyDescriptor(target, key) : desc, d;
|
|
4
|
-
if (typeof Reflect === "object" && typeof Reflect.decorate === "function") r = Reflect.decorate(decorators, target, key, desc);
|
|
5
|
-
else for (var i = decorators.length - 1; i >= 0; i--) if (d = decorators[i]) r = (c < 3 ? d(r) : c > 3 ? d(target, key, r) : d(target, key)) || r;
|
|
6
|
-
return c > 3 && r && Object.defineProperty(target, key, r), r;
|
|
7
|
-
};
|
|
8
|
-
var __metadata = (this && this.__metadata) || function (k, v) {
|
|
9
|
-
if (typeof Reflect === "object" && typeof Reflect.metadata === "function") return Reflect.metadata(k, v);
|
|
10
|
-
};
|
|
11
|
-
Object.defineProperty(exports, "__esModule", { value: true });
|
|
12
|
-
exports.ProductStore = void 0;
|
|
13
|
-
const sequelize_typescript_1 = require("sequelize-typescript");
|
|
14
|
-
const product_entity_1 = require("./product.entity");
|
|
15
|
-
const store_entity_1 = require("./store.entity");
|
|
16
|
-
const status_1 = require("../utils/enums/status");
|
|
17
|
-
let ProductStore = class ProductStore extends sequelize_typescript_1.Model {
|
|
18
|
-
};
|
|
19
|
-
exports.ProductStore = ProductStore;
|
|
20
|
-
__decorate([
|
|
21
|
-
(0, sequelize_typescript_1.ForeignKey)(() => product_entity_1.Product),
|
|
22
|
-
(0, sequelize_typescript_1.Column)({ allowNull: false }),
|
|
23
|
-
__metadata("design:type", Number)
|
|
24
|
-
], ProductStore.prototype, "productId", void 0);
|
|
25
|
-
__decorate([
|
|
26
|
-
(0, sequelize_typescript_1.ForeignKey)(() => store_entity_1.Store),
|
|
27
|
-
(0, sequelize_typescript_1.Column)({ allowNull: false }),
|
|
28
|
-
__metadata("design:type", Number)
|
|
29
|
-
], ProductStore.prototype, "storeId", void 0);
|
|
30
|
-
__decorate([
|
|
31
|
-
(0, sequelize_typescript_1.Column)({ type: sequelize_typescript_1.DataType.DECIMAL(10, 3), allowNull: true }),
|
|
32
|
-
__metadata("design:type", Number)
|
|
33
|
-
], ProductStore.prototype, "price", void 0);
|
|
34
|
-
__decorate([
|
|
35
|
-
(0, sequelize_typescript_1.Column)({
|
|
36
|
-
type: sequelize_typescript_1.DataType.ENUM(...Object.values(status_1.Status)),
|
|
37
|
-
defaultValue: status_1.Status.ACTIVE,
|
|
38
|
-
}),
|
|
39
|
-
__metadata("design:type", String)
|
|
40
|
-
], ProductStore.prototype, "status", void 0);
|
|
41
|
-
exports.ProductStore = ProductStore = __decorate([
|
|
42
|
-
sequelize_typescript_1.Table
|
|
43
|
-
], ProductStore);
|
|
44
|
-
//# sourceMappingURL=product-store.entity.js.map
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
{"version":3,"file":"product-store.entity.js","sourceRoot":"","sources":["../../../../../libs/tatayab-entities-library/src/entities/product-store.entity.ts"],"names":[],"mappings":";;;;;;;;;;;;AAAA,+DAM8B;AAC9B,qDAA2C;AAC3C,iDAAuC;AACvC,kDAA+C;AAGxC,IAAM,YAAY,GAAlB,MAAM,YAAa,SAAQ,4BAAK;CAkBtC,CAAA;AAlBY,oCAAY;AAGf;IAFP,IAAA,iCAAU,EAAC,GAAG,EAAE,CAAC,wBAAO,CAAC;IACzB,IAAA,6BAAM,EAAC,EAAE,SAAS,EAAE,KAAK,EAAE,CAAC;;+CACH;AAIlB;IAFP,IAAA,iCAAU,EAAC,GAAG,EAAE,CAAC,oBAAK,CAAC;IACvB,IAAA,6BAAM,EAAC,EAAE,SAAS,EAAE,KAAK,EAAE,CAAC;;6CACL;AAIhB;IADP,IAAA,6BAAM,EAAC,EAAE,IAAI,EAAE,+BAAQ,CAAC,OAAO,CAAC,EAAE,EAAE,CAAC,CAAC,EAAE,SAAS,EAAE,IAAI,EAAE,CAAC;;2CACpC;AAMf;IAJP,IAAA,6BAAM,EAAC;QACN,IAAI,EAAE,+BAAQ,CAAC,IAAI,CAAC,GAAG,MAAM,CAAC,MAAM,CAAC,eAAM,CAAC,CAAC;QAC7C,YAAY,EAAE,eAAM,CAAC,MAAM;KAC5B,CAAC;;4CACqB;uBAjBZ,YAAY;IADxB,4BAAK;GACO,YAAY,CAkBxB"}
|
|
@@ -1,32 +0,0 @@
|
|
|
1
|
-
"use strict";
|
|
2
|
-
var __decorate = (this && this.__decorate) || function (decorators, target, key, desc) {
|
|
3
|
-
var c = arguments.length, r = c < 3 ? target : desc === null ? desc = Object.getOwnPropertyDescriptor(target, key) : desc, d;
|
|
4
|
-
if (typeof Reflect === "object" && typeof Reflect.decorate === "function") r = Reflect.decorate(decorators, target, key, desc);
|
|
5
|
-
else for (var i = decorators.length - 1; i >= 0; i--) if (d = decorators[i]) r = (c < 3 ? d(r) : c > 3 ? d(target, key, r) : d(target, key)) || r;
|
|
6
|
-
return c > 3 && r && Object.defineProperty(target, key, r), r;
|
|
7
|
-
};
|
|
8
|
-
var __metadata = (this && this.__metadata) || function (k, v) {
|
|
9
|
-
if (typeof Reflect === "object" && typeof Reflect.metadata === "function") return Reflect.metadata(k, v);
|
|
10
|
-
};
|
|
11
|
-
Object.defineProperty(exports, "__esModule", { value: true });
|
|
12
|
-
exports.ProductVariantOption = void 0;
|
|
13
|
-
const sequelize_typescript_1 = require("sequelize-typescript");
|
|
14
|
-
const product_variant_entity_1 = require("./product-variant.entity");
|
|
15
|
-
const variant_option_entity_1 = require("./variant-option.entity");
|
|
16
|
-
let ProductVariantOption = class ProductVariantOption extends sequelize_typescript_1.Model {
|
|
17
|
-
};
|
|
18
|
-
exports.ProductVariantOption = ProductVariantOption;
|
|
19
|
-
__decorate([
|
|
20
|
-
(0, sequelize_typescript_1.ForeignKey)(() => product_variant_entity_1.ProductVariant),
|
|
21
|
-
(0, sequelize_typescript_1.Column)({ allowNull: false }),
|
|
22
|
-
__metadata("design:type", Number)
|
|
23
|
-
], ProductVariantOption.prototype, "productVariantId", void 0);
|
|
24
|
-
__decorate([
|
|
25
|
-
(0, sequelize_typescript_1.ForeignKey)(() => variant_option_entity_1.VariantOption),
|
|
26
|
-
(0, sequelize_typescript_1.Column)({ allowNull: false }),
|
|
27
|
-
__metadata("design:type", Number)
|
|
28
|
-
], ProductVariantOption.prototype, "variantOptionId", void 0);
|
|
29
|
-
exports.ProductVariantOption = ProductVariantOption = __decorate([
|
|
30
|
-
sequelize_typescript_1.Table
|
|
31
|
-
], ProductVariantOption);
|
|
32
|
-
//# sourceMappingURL=product-variant-option.entity.js.map
|
package/dist/libs/tatayab-entities-library/src/entities/product-variant-option.entity.js.map
DELETED
|
@@ -1 +0,0 @@
|
|
|
1
|
-
{"version":3,"file":"product-variant-option.entity.js","sourceRoot":"","sources":["../../../../../libs/tatayab-entities-library/src/entities/product-variant-option.entity.ts"],"names":[],"mappings":";;;;;;;;;;;;AAAA,+DAK8B;AAC9B,qEAA0D;AAC1D,mEAAwD;AAGjD,IAAM,oBAAoB,GAA1B,MAAM,oBAAqB,SAAQ,4BAAK;CAQ9C,CAAA;AARY,oDAAoB;AAGvB;IAFP,IAAA,iCAAU,EAAC,GAAG,EAAE,CAAC,uCAAc,CAAC;IAChC,IAAA,6BAAM,EAAC,EAAE,SAAS,EAAE,KAAK,EAAE,CAAC;;8DACI;AAIzB;IAFP,IAAA,iCAAU,EAAC,GAAG,EAAE,CAAC,qCAAa,CAAC;IAC/B,IAAA,6BAAM,EAAC,EAAE,SAAS,EAAE,KAAK,EAAE,CAAC;;6DACG;+BAPrB,oBAAoB;IADhC,4BAAK;GACO,oBAAoB,CAQhC"}
|
|
@@ -1,15 +0,0 @@
|
|
|
1
|
-
import { Model } from 'sequelize-typescript';
|
|
2
|
-
import { Product } from './product.entity';
|
|
3
|
-
import { VariantOption } from './variant-option.entity';
|
|
4
|
-
import { Status } from '../utils/enums/status';
|
|
5
|
-
export declare class ProductVariant extends Model {
|
|
6
|
-
productId: number;
|
|
7
|
-
sku?: string;
|
|
8
|
-
barcode?: string;
|
|
9
|
-
priceOverride?: number;
|
|
10
|
-
image?: string;
|
|
11
|
-
sortOrder: number;
|
|
12
|
-
status: Status;
|
|
13
|
-
product: Product;
|
|
14
|
-
options: VariantOption[];
|
|
15
|
-
}
|
|
@@ -1,64 +0,0 @@
|
|
|
1
|
-
"use strict";
|
|
2
|
-
var __decorate = (this && this.__decorate) || function (decorators, target, key, desc) {
|
|
3
|
-
var c = arguments.length, r = c < 3 ? target : desc === null ? desc = Object.getOwnPropertyDescriptor(target, key) : desc, d;
|
|
4
|
-
if (typeof Reflect === "object" && typeof Reflect.decorate === "function") r = Reflect.decorate(decorators, target, key, desc);
|
|
5
|
-
else for (var i = decorators.length - 1; i >= 0; i--) if (d = decorators[i]) r = (c < 3 ? d(r) : c > 3 ? d(target, key, r) : d(target, key)) || r;
|
|
6
|
-
return c > 3 && r && Object.defineProperty(target, key, r), r;
|
|
7
|
-
};
|
|
8
|
-
var __metadata = (this && this.__metadata) || function (k, v) {
|
|
9
|
-
if (typeof Reflect === "object" && typeof Reflect.metadata === "function") return Reflect.metadata(k, v);
|
|
10
|
-
};
|
|
11
|
-
Object.defineProperty(exports, "__esModule", { value: true });
|
|
12
|
-
exports.ProductVariant = void 0;
|
|
13
|
-
const sequelize_typescript_1 = require("sequelize-typescript");
|
|
14
|
-
const product_entity_1 = require("./product.entity");
|
|
15
|
-
const variant_option_entity_1 = require("./variant-option.entity");
|
|
16
|
-
const product_variant_option_entity_1 = require("./product-variant-option.entity");
|
|
17
|
-
const status_1 = require("../utils/enums/status");
|
|
18
|
-
let ProductVariant = class ProductVariant extends sequelize_typescript_1.Model {
|
|
19
|
-
};
|
|
20
|
-
exports.ProductVariant = ProductVariant;
|
|
21
|
-
__decorate([
|
|
22
|
-
(0, sequelize_typescript_1.ForeignKey)(() => product_entity_1.Product),
|
|
23
|
-
(0, sequelize_typescript_1.Column)({ allowNull: false }),
|
|
24
|
-
__metadata("design:type", Number)
|
|
25
|
-
], ProductVariant.prototype, "productId", void 0);
|
|
26
|
-
__decorate([
|
|
27
|
-
(0, sequelize_typescript_1.Column)({ allowNull: true }),
|
|
28
|
-
__metadata("design:type", String)
|
|
29
|
-
], ProductVariant.prototype, "sku", void 0);
|
|
30
|
-
__decorate([
|
|
31
|
-
(0, sequelize_typescript_1.Column)({ allowNull: true }),
|
|
32
|
-
__metadata("design:type", String)
|
|
33
|
-
], ProductVariant.prototype, "barcode", void 0);
|
|
34
|
-
__decorate([
|
|
35
|
-
(0, sequelize_typescript_1.Column)({ type: sequelize_typescript_1.DataType.DECIMAL(10, 3), allowNull: true }),
|
|
36
|
-
__metadata("design:type", Number)
|
|
37
|
-
], ProductVariant.prototype, "priceOverride", void 0);
|
|
38
|
-
__decorate([
|
|
39
|
-
(0, sequelize_typescript_1.Column)({ allowNull: true }),
|
|
40
|
-
__metadata("design:type", String)
|
|
41
|
-
], ProductVariant.prototype, "image", void 0);
|
|
42
|
-
__decorate([
|
|
43
|
-
(0, sequelize_typescript_1.Column)({ defaultValue: 0 }),
|
|
44
|
-
__metadata("design:type", Number)
|
|
45
|
-
], ProductVariant.prototype, "sortOrder", void 0);
|
|
46
|
-
__decorate([
|
|
47
|
-
(0, sequelize_typescript_1.Column)({
|
|
48
|
-
type: sequelize_typescript_1.DataType.ENUM(...Object.values(status_1.Status)),
|
|
49
|
-
defaultValue: status_1.Status.ACTIVE,
|
|
50
|
-
}),
|
|
51
|
-
__metadata("design:type", String)
|
|
52
|
-
], ProductVariant.prototype, "status", void 0);
|
|
53
|
-
__decorate([
|
|
54
|
-
(0, sequelize_typescript_1.BelongsTo)(() => product_entity_1.Product),
|
|
55
|
-
__metadata("design:type", product_entity_1.Product)
|
|
56
|
-
], ProductVariant.prototype, "product", void 0);
|
|
57
|
-
__decorate([
|
|
58
|
-
(0, sequelize_typescript_1.BelongsToMany)(() => variant_option_entity_1.VariantOption, () => product_variant_option_entity_1.ProductVariantOption),
|
|
59
|
-
__metadata("design:type", Array)
|
|
60
|
-
], ProductVariant.prototype, "options", void 0);
|
|
61
|
-
exports.ProductVariant = ProductVariant = __decorate([
|
|
62
|
-
sequelize_typescript_1.Table
|
|
63
|
-
], ProductVariant);
|
|
64
|
-
//# sourceMappingURL=product-variant.entity.js.map
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
{"version":3,"file":"product-variant.entity.js","sourceRoot":"","sources":["../../../../../libs/tatayab-entities-library/src/entities/product-variant.entity.ts"],"names":[],"mappings":";;;;;;;;;;;;AAAA,+DAS8B;AAC9B,qDAA2C;AAC3C,mEAAwD;AACxD,mFAAuE;AACvE,kDAA+C;AAGxC,IAAM,cAAc,GAApB,MAAM,cAAe,SAAQ,4BAAK;CAkCxC,CAAA;AAlCY,wCAAc;AAGjB;IAFP,IAAA,iCAAU,EAAC,GAAG,EAAE,CAAC,wBAAO,CAAC;IACzB,IAAA,6BAAM,EAAC,EAAE,SAAS,EAAE,KAAK,EAAE,CAAC;;iDACH;AAGlB;IADP,IAAA,6BAAM,EAAC,EAAE,SAAS,EAAE,IAAI,EAAE,CAAC;;2CACP;AAGb;IADP,IAAA,6BAAM,EAAC,EAAE,SAAS,EAAE,IAAI,EAAE,CAAC;;+CACH;AAIjB;IADP,IAAA,6BAAM,EAAC,EAAE,IAAI,EAAE,+BAAQ,CAAC,OAAO,CAAC,EAAE,EAAE,CAAC,CAAC,EAAE,SAAS,EAAE,IAAI,EAAE,CAAC;;qDAC5B;AAGvB;IADP,IAAA,6BAAM,EAAC,EAAE,SAAS,EAAE,IAAI,EAAE,CAAC;;6CACL;AAGf;IADP,IAAA,6BAAM,EAAC,EAAE,YAAY,EAAE,CAAC,EAAE,CAAC;;iDACF;AAMlB;IAJP,IAAA,6BAAM,EAAC;QACN,IAAI,EAAE,+BAAQ,CAAC,IAAI,CAAC,GAAG,MAAM,CAAC,MAAM,CAAC,eAAM,CAAC,CAAC;QAC7C,YAAY,EAAE,eAAM,CAAC,MAAM;KAC5B,CAAC;;8CACqB;AAKf;IADP,IAAA,gCAAS,EAAC,GAAG,EAAE,CAAC,wBAAO,CAAC;8BACR,wBAAO;+CAAC;AAGjB;IADP,IAAA,oCAAa,EAAC,GAAG,EAAE,CAAC,qCAAa,EAAE,GAAG,EAAE,CAAC,oDAAoB,CAAC;;+CAC9B;yBAjCtB,cAAc;IAD1B,4BAAK;GACO,cAAc,CAkC1B"}
|
|
@@ -1,27 +0,0 @@
|
|
|
1
|
-
import { Model } from 'sequelize-typescript';
|
|
2
|
-
import { Brand } from './brand.entity';
|
|
3
|
-
import { Category } from './category.entity';
|
|
4
|
-
import { ProductMedia } from './product-media.entity';
|
|
5
|
-
import { ProductVariant } from './product-variant.entity';
|
|
6
|
-
import { Store } from './store.entity';
|
|
7
|
-
import { Status } from '../utils/enums/status';
|
|
8
|
-
export declare class Product extends Model {
|
|
9
|
-
nameEn: string;
|
|
10
|
-
nameAr: string;
|
|
11
|
-
descriptionEn?: string;
|
|
12
|
-
descriptionAr?: string;
|
|
13
|
-
sku?: string;
|
|
14
|
-
barcode?: string;
|
|
15
|
-
defaultPrice: number;
|
|
16
|
-
brandId?: number;
|
|
17
|
-
categoryId?: number;
|
|
18
|
-
sortOrder: number;
|
|
19
|
-
isFeatured: boolean;
|
|
20
|
-
hasVariants: boolean;
|
|
21
|
-
status: Status;
|
|
22
|
-
brand: Brand;
|
|
23
|
-
category: Category;
|
|
24
|
-
media: ProductMedia[];
|
|
25
|
-
variants: ProductVariant[];
|
|
26
|
-
stores: Store[];
|
|
27
|
-
}
|
|
@@ -1,104 +0,0 @@
|
|
|
1
|
-
"use strict";
|
|
2
|
-
var __decorate = (this && this.__decorate) || function (decorators, target, key, desc) {
|
|
3
|
-
var c = arguments.length, r = c < 3 ? target : desc === null ? desc = Object.getOwnPropertyDescriptor(target, key) : desc, d;
|
|
4
|
-
if (typeof Reflect === "object" && typeof Reflect.decorate === "function") r = Reflect.decorate(decorators, target, key, desc);
|
|
5
|
-
else for (var i = decorators.length - 1; i >= 0; i--) if (d = decorators[i]) r = (c < 3 ? d(r) : c > 3 ? d(target, key, r) : d(target, key)) || r;
|
|
6
|
-
return c > 3 && r && Object.defineProperty(target, key, r), r;
|
|
7
|
-
};
|
|
8
|
-
var __metadata = (this && this.__metadata) || function (k, v) {
|
|
9
|
-
if (typeof Reflect === "object" && typeof Reflect.metadata === "function") return Reflect.metadata(k, v);
|
|
10
|
-
};
|
|
11
|
-
Object.defineProperty(exports, "__esModule", { value: true });
|
|
12
|
-
exports.Product = void 0;
|
|
13
|
-
const sequelize_typescript_1 = require("sequelize-typescript");
|
|
14
|
-
const brand_entity_1 = require("./brand.entity");
|
|
15
|
-
const category_entity_1 = require("./category.entity");
|
|
16
|
-
const product_media_entity_1 = require("./product-media.entity");
|
|
17
|
-
const product_variant_entity_1 = require("./product-variant.entity");
|
|
18
|
-
const product_store_entity_1 = require("./product-store.entity");
|
|
19
|
-
const store_entity_1 = require("./store.entity");
|
|
20
|
-
const status_1 = require("../utils/enums/status");
|
|
21
|
-
let Product = class Product extends sequelize_typescript_1.Model {
|
|
22
|
-
};
|
|
23
|
-
exports.Product = Product;
|
|
24
|
-
__decorate([
|
|
25
|
-
(0, sequelize_typescript_1.Column)({ allowNull: false }),
|
|
26
|
-
__metadata("design:type", String)
|
|
27
|
-
], Product.prototype, "nameEn", void 0);
|
|
28
|
-
__decorate([
|
|
29
|
-
(0, sequelize_typescript_1.Column)({ allowNull: false }),
|
|
30
|
-
__metadata("design:type", String)
|
|
31
|
-
], Product.prototype, "nameAr", void 0);
|
|
32
|
-
__decorate([
|
|
33
|
-
(0, sequelize_typescript_1.Column)({ type: sequelize_typescript_1.DataType.TEXT, allowNull: true }),
|
|
34
|
-
__metadata("design:type", String)
|
|
35
|
-
], Product.prototype, "descriptionEn", void 0);
|
|
36
|
-
__decorate([
|
|
37
|
-
(0, sequelize_typescript_1.Column)({ type: sequelize_typescript_1.DataType.TEXT, allowNull: true }),
|
|
38
|
-
__metadata("design:type", String)
|
|
39
|
-
], Product.prototype, "descriptionAr", void 0);
|
|
40
|
-
__decorate([
|
|
41
|
-
(0, sequelize_typescript_1.Column)({ allowNull: true }),
|
|
42
|
-
__metadata("design:type", String)
|
|
43
|
-
], Product.prototype, "sku", void 0);
|
|
44
|
-
__decorate([
|
|
45
|
-
(0, sequelize_typescript_1.Column)({ allowNull: true }),
|
|
46
|
-
__metadata("design:type", String)
|
|
47
|
-
], Product.prototype, "barcode", void 0);
|
|
48
|
-
__decorate([
|
|
49
|
-
(0, sequelize_typescript_1.Column)({ type: sequelize_typescript_1.DataType.DECIMAL(10, 3), allowNull: false, defaultValue: 0 }),
|
|
50
|
-
__metadata("design:type", Number)
|
|
51
|
-
], Product.prototype, "defaultPrice", void 0);
|
|
52
|
-
__decorate([
|
|
53
|
-
(0, sequelize_typescript_1.ForeignKey)(() => brand_entity_1.Brand),
|
|
54
|
-
(0, sequelize_typescript_1.Column)({ allowNull: true }),
|
|
55
|
-
__metadata("design:type", Number)
|
|
56
|
-
], Product.prototype, "brandId", void 0);
|
|
57
|
-
__decorate([
|
|
58
|
-
(0, sequelize_typescript_1.ForeignKey)(() => category_entity_1.Category),
|
|
59
|
-
(0, sequelize_typescript_1.Column)({ allowNull: true }),
|
|
60
|
-
__metadata("design:type", Number)
|
|
61
|
-
], Product.prototype, "categoryId", void 0);
|
|
62
|
-
__decorate([
|
|
63
|
-
(0, sequelize_typescript_1.Column)({ defaultValue: 0 }),
|
|
64
|
-
__metadata("design:type", Number)
|
|
65
|
-
], Product.prototype, "sortOrder", void 0);
|
|
66
|
-
__decorate([
|
|
67
|
-
(0, sequelize_typescript_1.Column)({ defaultValue: false }),
|
|
68
|
-
__metadata("design:type", Boolean)
|
|
69
|
-
], Product.prototype, "isFeatured", void 0);
|
|
70
|
-
__decorate([
|
|
71
|
-
(0, sequelize_typescript_1.Column)({ defaultValue: false }),
|
|
72
|
-
__metadata("design:type", Boolean)
|
|
73
|
-
], Product.prototype, "hasVariants", void 0);
|
|
74
|
-
__decorate([
|
|
75
|
-
(0, sequelize_typescript_1.Column)({
|
|
76
|
-
type: sequelize_typescript_1.DataType.ENUM(...Object.values(status_1.Status)),
|
|
77
|
-
defaultValue: status_1.Status.ACTIVE,
|
|
78
|
-
}),
|
|
79
|
-
__metadata("design:type", String)
|
|
80
|
-
], Product.prototype, "status", void 0);
|
|
81
|
-
__decorate([
|
|
82
|
-
(0, sequelize_typescript_1.BelongsTo)(() => brand_entity_1.Brand),
|
|
83
|
-
__metadata("design:type", brand_entity_1.Brand)
|
|
84
|
-
], Product.prototype, "brand", void 0);
|
|
85
|
-
__decorate([
|
|
86
|
-
(0, sequelize_typescript_1.BelongsTo)(() => category_entity_1.Category),
|
|
87
|
-
__metadata("design:type", category_entity_1.Category)
|
|
88
|
-
], Product.prototype, "category", void 0);
|
|
89
|
-
__decorate([
|
|
90
|
-
(0, sequelize_typescript_1.HasMany)(() => product_media_entity_1.ProductMedia),
|
|
91
|
-
__metadata("design:type", Array)
|
|
92
|
-
], Product.prototype, "media", void 0);
|
|
93
|
-
__decorate([
|
|
94
|
-
(0, sequelize_typescript_1.HasMany)(() => product_variant_entity_1.ProductVariant),
|
|
95
|
-
__metadata("design:type", Array)
|
|
96
|
-
], Product.prototype, "variants", void 0);
|
|
97
|
-
__decorate([
|
|
98
|
-
(0, sequelize_typescript_1.BelongsToMany)(() => store_entity_1.Store, () => product_store_entity_1.ProductStore),
|
|
99
|
-
__metadata("design:type", Array)
|
|
100
|
-
], Product.prototype, "stores", void 0);
|
|
101
|
-
exports.Product = Product = __decorate([
|
|
102
|
-
sequelize_typescript_1.Table
|
|
103
|
-
], Product);
|
|
104
|
-
//# sourceMappingURL=product.entity.js.map
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
{"version":3,"file":"product.entity.js","sourceRoot":"","sources":["../../../../../libs/tatayab-entities-library/src/entities/product.entity.ts"],"names":[],"mappings":";;;;;;;;;;;;AAAA,+DAS8B;AAC9B,iDAAuC;AACvC,uDAA6C;AAC7C,iEAAsD;AACtD,qEAA0D;AAC1D,iEAAsD;AACtD,iDAAuC;AACvC,kDAA+C;AAGxC,IAAM,OAAO,GAAb,MAAM,OAAQ,SAAQ,4BAAK;CA8DjC,CAAA;AA9DY,0BAAO;AAEV;IADP,IAAA,6BAAM,EAAC,EAAE,SAAS,EAAE,KAAK,EAAE,CAAC;;uCACN;AAGf;IADP,IAAA,6BAAM,EAAC,EAAE,SAAS,EAAE,KAAK,EAAE,CAAC;;uCACN;AAGf;IADP,IAAA,6BAAM,EAAC,EAAE,IAAI,EAAE,+BAAQ,CAAC,IAAI,EAAE,SAAS,EAAE,IAAI,EAAE,CAAC;;8CAClB;AAGvB;IADP,IAAA,6BAAM,EAAC,EAAE,IAAI,EAAE,+BAAQ,CAAC,IAAI,EAAE,SAAS,EAAE,IAAI,EAAE,CAAC;;8CAClB;AAGvB;IADP,IAAA,6BAAM,EAAC,EAAE,SAAS,EAAE,IAAI,EAAE,CAAC;;oCACP;AAGb;IADP,IAAA,6BAAM,EAAC,EAAE,SAAS,EAAE,IAAI,EAAE,CAAC;;wCACH;AAIjB;IADP,IAAA,6BAAM,EAAC,EAAE,IAAI,EAAE,+BAAQ,CAAC,OAAO,CAAC,EAAE,EAAE,CAAC,CAAC,EAAE,SAAS,EAAE,KAAK,EAAE,YAAY,EAAE,CAAC,EAAE,CAAC;;6CAChD;AAIrB;IAFP,IAAA,iCAAU,EAAC,GAAG,EAAE,CAAC,oBAAK,CAAC;IACvB,IAAA,6BAAM,EAAC,EAAE,SAAS,EAAE,IAAI,EAAE,CAAC;;wCACH;AAIjB;IAFP,IAAA,iCAAU,EAAC,GAAG,EAAE,CAAC,0BAAQ,CAAC;IAC1B,IAAA,6BAAM,EAAC,EAAE,SAAS,EAAE,IAAI,EAAE,CAAC;;2CACA;AAGpB;IADP,IAAA,6BAAM,EAAC,EAAE,YAAY,EAAE,CAAC,EAAE,CAAC;;0CACF;AAGlB;IADP,IAAA,6BAAM,EAAC,EAAE,YAAY,EAAE,KAAK,EAAE,CAAC;;2CACJ;AAGpB;IADP,IAAA,6BAAM,EAAC,EAAE,YAAY,EAAE,KAAK,EAAE,CAAC;;4CACH;AAMrB;IAJP,IAAA,6BAAM,EAAC;QACN,IAAI,EAAE,+BAAQ,CAAC,IAAI,CAAC,GAAG,MAAM,CAAC,MAAM,CAAC,eAAM,CAAC,CAAC;QAC7C,YAAY,EAAE,eAAM,CAAC,MAAM;KAC5B,CAAC;;uCACqB;AAKf;IADP,IAAA,gCAAS,EAAC,GAAG,EAAE,CAAC,oBAAK,CAAC;8BACR,oBAAK;sCAAC;AAGb;IADP,IAAA,gCAAS,EAAC,GAAG,EAAE,CAAC,0BAAQ,CAAC;8BACR,0BAAQ;yCAAC;AAGnB;IADP,IAAA,8BAAO,EAAC,GAAG,EAAE,CAAC,mCAAY,CAAC;;sCACE;AAGtB;IADP,IAAA,8BAAO,EAAC,GAAG,EAAE,CAAC,uCAAc,CAAC;;yCACK;AAG3B;IADP,IAAA,oCAAa,EAAC,GAAG,EAAE,CAAC,oBAAK,EAAE,GAAG,EAAE,CAAC,mCAAY,CAAC;;uCACvB;kBA7Db,OAAO;IADnB,4BAAK;GACO,OAAO,CA8DnB"}
|
|
@@ -1,25 +0,0 @@
|
|
|
1
|
-
import { Model } from 'sequelize-typescript';
|
|
2
|
-
import { PurchaseOrder } from './purchase-order.entity';
|
|
3
|
-
import { Product } from './product.entity';
|
|
4
|
-
import { ProductVariant } from './product-variant.entity';
|
|
5
|
-
export declare enum PurchaseOrderItemStatus {
|
|
6
|
-
PENDING = "pending",
|
|
7
|
-
PARTIALLY_RECEIVED = "partially_received",
|
|
8
|
-
FULLY_RECEIVED = "fully_received",
|
|
9
|
-
CANCELLED = "cancelled"
|
|
10
|
-
}
|
|
11
|
-
export declare class PurchaseOrderItem extends Model {
|
|
12
|
-
purchaseOrderId: number;
|
|
13
|
-
productId: number;
|
|
14
|
-
productVariantId?: number;
|
|
15
|
-
orderedQuantity: number;
|
|
16
|
-
receivedQuantity: number;
|
|
17
|
-
reservedQuantity: number;
|
|
18
|
-
unitCostPrice: number;
|
|
19
|
-
totalCostPrice: number;
|
|
20
|
-
status: PurchaseOrderItemStatus;
|
|
21
|
-
triggerOrderId?: number;
|
|
22
|
-
purchaseOrder: PurchaseOrder;
|
|
23
|
-
product: Product;
|
|
24
|
-
variant?: ProductVariant;
|
|
25
|
-
}
|