tt-entities 0.0.15 → 0.0.17
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/dist/libs/tatayab-entities-library/src/entities/brand.entity.d.ts +12 -0
- package/dist/libs/tatayab-entities-library/src/entities/brand.entity.js +56 -0
- package/dist/libs/tatayab-entities-library/src/entities/brand.entity.js.map +1 -0
- package/dist/libs/tatayab-entities-library/src/entities/category.entity.d.ts +14 -0
- package/dist/libs/tatayab-entities-library/src/entities/category.entity.js +65 -0
- package/dist/libs/tatayab-entities-library/src/entities/category.entity.js.map +1 -0
- package/dist/libs/tatayab-entities-library/src/entities/inventory-stock.entity.d.ts +16 -0
- package/dist/libs/tatayab-entities-library/src/entities/inventory-stock.entity.js +66 -0
- package/dist/libs/tatayab-entities-library/src/entities/inventory-stock.entity.js.map +1 -0
- package/dist/libs/tatayab-entities-library/src/entities/inventory.entity.d.ts +15 -0
- package/dist/libs/tatayab-entities-library/src/entities/inventory.entity.js +63 -0
- package/dist/libs/tatayab-entities-library/src/entities/inventory.entity.js.map +1 -0
- package/dist/libs/tatayab-entities-library/src/entities/permission.entity.d.ts +8 -0
- package/dist/libs/tatayab-entities-library/src/entities/permission.entity.js +38 -0
- package/dist/libs/tatayab-entities-library/src/entities/permission.entity.js.map +1 -0
- package/dist/libs/tatayab-entities-library/src/entities/product-media.entity.d.ts +16 -0
- package/dist/libs/tatayab-entities-library/src/entities/product-media.entity.js +62 -0
- package/dist/libs/tatayab-entities-library/src/entities/product-media.entity.js.map +1 -0
- package/dist/libs/tatayab-entities-library/src/entities/product-store.entity.d.ts +8 -0
- package/dist/libs/tatayab-entities-library/src/entities/product-store.entity.js +44 -0
- package/dist/libs/tatayab-entities-library/src/entities/product-store.entity.js.map +1 -0
- package/dist/libs/tatayab-entities-library/src/entities/product-variant-option.entity.d.ts +5 -0
- package/dist/libs/tatayab-entities-library/src/entities/product-variant-option.entity.js +32 -0
- package/dist/libs/tatayab-entities-library/src/entities/product-variant-option.entity.js.map +1 -0
- package/dist/libs/tatayab-entities-library/src/entities/product-variant.entity.d.ts +15 -0
- package/dist/libs/tatayab-entities-library/src/entities/product-variant.entity.js +64 -0
- package/dist/libs/tatayab-entities-library/src/entities/product-variant.entity.js.map +1 -0
- package/dist/libs/tatayab-entities-library/src/entities/product.entity.d.ts +27 -0
- package/dist/libs/tatayab-entities-library/src/entities/product.entity.js +104 -0
- package/dist/libs/tatayab-entities-library/src/entities/product.entity.js.map +1 -0
- package/dist/libs/tatayab-entities-library/src/entities/purchase-order-item.entity.d.ts +25 -0
- package/dist/libs/tatayab-entities-library/src/entities/purchase-order-item.entity.js +88 -0
- package/dist/libs/tatayab-entities-library/src/entities/purchase-order-item.entity.js.map +1 -0
- package/dist/libs/tatayab-entities-library/src/entities/purchase-order.entity.d.ts +27 -0
- package/dist/libs/tatayab-entities-library/src/entities/purchase-order.entity.js +108 -0
- package/dist/libs/tatayab-entities-library/src/entities/purchase-order.entity.js.map +1 -0
- package/dist/libs/tatayab-entities-library/src/entities/role-permission.entity.d.ts +5 -0
- package/dist/libs/tatayab-entities-library/src/entities/role-permission.entity.js +32 -0
- package/dist/libs/tatayab-entities-library/src/entities/role-permission.entity.js.map +1 -0
- package/dist/libs/tatayab-entities-library/src/entities/stock-movement.entity.d.ts +23 -0
- package/dist/libs/tatayab-entities-library/src/entities/stock-movement.entity.js +92 -0
- package/dist/libs/tatayab-entities-library/src/entities/stock-movement.entity.js.map +1 -0
- package/dist/libs/tatayab-entities-library/src/entities/store-inventory.entity.d.ts +6 -0
- package/dist/libs/tatayab-entities-library/src/entities/store-inventory.entity.js +36 -0
- package/dist/libs/tatayab-entities-library/src/entities/store-inventory.entity.js.map +1 -0
- package/dist/libs/tatayab-entities-library/src/entities/store.entity.d.ts +21 -0
- package/dist/libs/tatayab-entities-library/src/entities/store.entity.js +86 -0
- package/dist/libs/tatayab-entities-library/src/entities/store.entity.js.map +1 -0
- package/dist/libs/tatayab-entities-library/src/entities/sys.role.entity.d.ts +3 -0
- package/dist/libs/tatayab-entities-library/src/entities/sys.role.entity.js +11 -1
- package/dist/libs/tatayab-entities-library/src/entities/sys.role.entity.js.map +1 -1
- package/dist/libs/tatayab-entities-library/src/entities/sys.user.entity.d.ts +6 -6
- package/dist/libs/tatayab-entities-library/src/entities/sys.user.entity.js +15 -15
- package/dist/libs/tatayab-entities-library/src/entities/sys.user.entity.js.map +1 -1
- package/dist/libs/tatayab-entities-library/src/entities/variant-option.entity.d.ts +11 -0
- package/dist/libs/tatayab-entities-library/src/entities/variant-option.entity.js +50 -0
- package/dist/libs/tatayab-entities-library/src/entities/variant-option.entity.js.map +1 -0
- package/dist/libs/tatayab-entities-library/src/entities/variant-type.entity.d.ts +7 -0
- package/dist/libs/tatayab-entities-library/src/entities/variant-type.entity.js +37 -0
- package/dist/libs/tatayab-entities-library/src/entities/variant-type.entity.js.map +1 -0
- package/dist/libs/tatayab-entities-library/src/entities/vendor-product.entity.d.ts +19 -0
- package/dist/libs/tatayab-entities-library/src/entities/vendor-product.entity.js +78 -0
- package/dist/libs/tatayab-entities-library/src/entities/vendor-product.entity.js.map +1 -0
- package/dist/libs/tatayab-entities-library/src/entities/vendor.entity.d.ts +19 -0
- package/dist/libs/tatayab-entities-library/src/entities/vendor.entity.js +82 -0
- package/dist/libs/tatayab-entities-library/src/entities/vendor.entity.js.map +1 -0
- package/dist/libs/tatayab-entities-library/src/index.d.ts +22 -0
- package/dist/libs/tatayab-entities-library/src/index.js +87 -1
- package/dist/libs/tatayab-entities-library/src/index.js.map +1 -1
- package/dist/libs/tatayab-entities-library/src/utils/enums/purchaseOrderStatus.d.ts +8 -0
- package/dist/libs/tatayab-entities-library/src/utils/enums/purchaseOrderStatus.js +13 -0
- package/dist/libs/tatayab-entities-library/src/utils/enums/purchaseOrderStatus.js.map +1 -0
- package/dist/libs/tatayab-entities-library/src/utils/enums/stockMovementType.d.ts +11 -0
- package/dist/libs/tatayab-entities-library/src/utils/enums/stockMovementType.js +16 -0
- package/dist/libs/tatayab-entities-library/src/utils/enums/stockMovementType.js.map +1 -0
- package/dist/src/main.js +1585 -51
- package/libs/tatayab-entities-library/src/entities/brand.entity.ts +32 -0
- package/libs/tatayab-entities-library/src/entities/category.entity.ts +47 -0
- package/libs/tatayab-entities-library/src/entities/inventory-stock.entity.ts +55 -0
- package/libs/tatayab-entities-library/src/entities/inventory.entity.ts +47 -0
- package/libs/tatayab-entities-library/src/entities/permission.entity.ts +26 -0
- package/libs/tatayab-entities-library/src/entities/product-media.entity.ts +45 -0
- package/libs/tatayab-entities-library/src/entities/product-store.entity.ts +31 -0
- package/libs/tatayab-entities-library/src/entities/product-variant-option.entity.ts +19 -0
- package/libs/tatayab-entities-library/src/entities/product-variant.entity.ts +51 -0
- package/libs/tatayab-entities-library/src/entities/product.entity.ts +82 -0
- package/libs/tatayab-entities-library/src/entities/purchase-order-item.entity.ts +73 -0
- package/libs/tatayab-entities-library/src/entities/purchase-order.entity.ts +86 -0
- package/libs/tatayab-entities-library/src/entities/role-permission.entity.ts +19 -0
- package/libs/tatayab-entities-library/src/entities/stock-movement.entity.ts +74 -0
- package/libs/tatayab-entities-library/src/entities/store-inventory.entity.ts +24 -0
- package/libs/tatayab-entities-library/src/entities/store.entity.ts +68 -0
- package/libs/tatayab-entities-library/src/entities/sys.role.entity.ts +16 -2
- package/libs/tatayab-entities-library/src/entities/sys.user.entity.ts +22 -21
- package/libs/tatayab-entities-library/src/entities/variant-option.entity.ts +35 -0
- package/libs/tatayab-entities-library/src/entities/variant-type.entity.ts +18 -0
- package/libs/tatayab-entities-library/src/entities/vendor-product.entity.ts +65 -0
- package/libs/tatayab-entities-library/src/entities/vendor.entity.ts +63 -0
- package/libs/tatayab-entities-library/src/index.ts +108 -2
- package/libs/tatayab-entities-library/src/utils/enums/purchaseOrderStatus.ts +8 -0
- package/libs/tatayab-entities-library/src/utils/enums/stockMovementType.ts +20 -0
- package/package.json +1 -1
|
@@ -0,0 +1,12 @@
|
|
|
1
|
+
import { Model } from 'sequelize-typescript';
|
|
2
|
+
import { Status } from '../utils/enums/status';
|
|
3
|
+
export declare class Brand extends Model {
|
|
4
|
+
nameEn: string;
|
|
5
|
+
nameAr: string;
|
|
6
|
+
descriptionEn?: string;
|
|
7
|
+
descriptionAr?: string;
|
|
8
|
+
logo?: string;
|
|
9
|
+
website?: string;
|
|
10
|
+
sortOrder: number;
|
|
11
|
+
status: Status;
|
|
12
|
+
}
|
|
@@ -0,0 +1,56 @@
|
|
|
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.Brand = void 0;
|
|
13
|
+
const sequelize_typescript_1 = require("sequelize-typescript");
|
|
14
|
+
const status_1 = require("../utils/enums/status");
|
|
15
|
+
let Brand = class Brand extends sequelize_typescript_1.Model {
|
|
16
|
+
};
|
|
17
|
+
exports.Brand = Brand;
|
|
18
|
+
__decorate([
|
|
19
|
+
(0, sequelize_typescript_1.Column)({ allowNull: false }),
|
|
20
|
+
__metadata("design:type", String)
|
|
21
|
+
], Brand.prototype, "nameEn", void 0);
|
|
22
|
+
__decorate([
|
|
23
|
+
(0, sequelize_typescript_1.Column)({ allowNull: false }),
|
|
24
|
+
__metadata("design:type", String)
|
|
25
|
+
], Brand.prototype, "nameAr", void 0);
|
|
26
|
+
__decorate([
|
|
27
|
+
(0, sequelize_typescript_1.Column)({ type: sequelize_typescript_1.DataType.TEXT, allowNull: true }),
|
|
28
|
+
__metadata("design:type", String)
|
|
29
|
+
], Brand.prototype, "descriptionEn", void 0);
|
|
30
|
+
__decorate([
|
|
31
|
+
(0, sequelize_typescript_1.Column)({ type: sequelize_typescript_1.DataType.TEXT, allowNull: true }),
|
|
32
|
+
__metadata("design:type", String)
|
|
33
|
+
], Brand.prototype, "descriptionAr", void 0);
|
|
34
|
+
__decorate([
|
|
35
|
+
(0, sequelize_typescript_1.Column)({ allowNull: true }),
|
|
36
|
+
__metadata("design:type", String)
|
|
37
|
+
], Brand.prototype, "logo", void 0);
|
|
38
|
+
__decorate([
|
|
39
|
+
(0, sequelize_typescript_1.Column)({ allowNull: true }),
|
|
40
|
+
__metadata("design:type", String)
|
|
41
|
+
], Brand.prototype, "website", void 0);
|
|
42
|
+
__decorate([
|
|
43
|
+
(0, sequelize_typescript_1.Column)({ defaultValue: 0 }),
|
|
44
|
+
__metadata("design:type", Number)
|
|
45
|
+
], Brand.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
|
+
], Brand.prototype, "status", void 0);
|
|
53
|
+
exports.Brand = Brand = __decorate([
|
|
54
|
+
sequelize_typescript_1.Table
|
|
55
|
+
], Brand);
|
|
56
|
+
//# sourceMappingURL=brand.entity.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"brand.entity.js","sourceRoot":"","sources":["../../../../../libs/tatayab-entities-library/src/entities/brand.entity.ts"],"names":[],"mappings":";;;;;;;;;;;;AAAA,+DAA+E;AAC/E,kDAA+C;AAGxC,IAAM,KAAK,GAAX,MAAM,KAAM,SAAQ,4BAAK;CA2B/B,CAAA;AA3BY,sBAAK;AAER;IADP,IAAA,6BAAM,EAAC,EAAE,SAAS,EAAE,KAAK,EAAE,CAAC;;qCACN;AAGf;IADP,IAAA,6BAAM,EAAC,EAAE,SAAS,EAAE,KAAK,EAAE,CAAC;;qCACN;AAGf;IADP,IAAA,6BAAM,EAAC,EAAE,IAAI,EAAE,+BAAQ,CAAC,IAAI,EAAE,SAAS,EAAE,IAAI,EAAE,CAAC;;4CAClB;AAGvB;IADP,IAAA,6BAAM,EAAC,EAAE,IAAI,EAAE,+BAAQ,CAAC,IAAI,EAAE,SAAS,EAAE,IAAI,EAAE,CAAC;;4CAClB;AAGvB;IADP,IAAA,6BAAM,EAAC,EAAE,SAAS,EAAE,IAAI,EAAE,CAAC;;mCACN;AAGd;IADP,IAAA,6BAAM,EAAC,EAAE,SAAS,EAAE,IAAI,EAAE,CAAC;;sCACH;AAGjB;IADP,IAAA,6BAAM,EAAC,EAAE,YAAY,EAAE,CAAC,EAAE,CAAC;;wCACF;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;;qCACqB;gBA1BZ,KAAK;IADjB,4BAAK;GACO,KAAK,CA2BjB"}
|
|
@@ -0,0 +1,14 @@
|
|
|
1
|
+
import { Model } from 'sequelize-typescript';
|
|
2
|
+
import { Status } from '../utils/enums/status';
|
|
3
|
+
export declare class Category extends Model {
|
|
4
|
+
nameEn: string;
|
|
5
|
+
nameAr: string;
|
|
6
|
+
descriptionEn?: string;
|
|
7
|
+
descriptionAr?: string;
|
|
8
|
+
image?: string;
|
|
9
|
+
sortOrder: number;
|
|
10
|
+
status: Status;
|
|
11
|
+
parentId?: number;
|
|
12
|
+
parent?: Category;
|
|
13
|
+
children?: Category[];
|
|
14
|
+
}
|
|
@@ -0,0 +1,65 @@
|
|
|
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.Category = void 0;
|
|
13
|
+
const sequelize_typescript_1 = require("sequelize-typescript");
|
|
14
|
+
const status_1 = require("../utils/enums/status");
|
|
15
|
+
let Category = class Category extends sequelize_typescript_1.Model {
|
|
16
|
+
};
|
|
17
|
+
exports.Category = Category;
|
|
18
|
+
__decorate([
|
|
19
|
+
(0, sequelize_typescript_1.Column)({ allowNull: false }),
|
|
20
|
+
__metadata("design:type", String)
|
|
21
|
+
], Category.prototype, "nameEn", void 0);
|
|
22
|
+
__decorate([
|
|
23
|
+
(0, sequelize_typescript_1.Column)({ allowNull: false }),
|
|
24
|
+
__metadata("design:type", String)
|
|
25
|
+
], Category.prototype, "nameAr", void 0);
|
|
26
|
+
__decorate([
|
|
27
|
+
(0, sequelize_typescript_1.Column)({ type: sequelize_typescript_1.DataType.TEXT, allowNull: true }),
|
|
28
|
+
__metadata("design:type", String)
|
|
29
|
+
], Category.prototype, "descriptionEn", void 0);
|
|
30
|
+
__decorate([
|
|
31
|
+
(0, sequelize_typescript_1.Column)({ type: sequelize_typescript_1.DataType.TEXT, allowNull: true }),
|
|
32
|
+
__metadata("design:type", String)
|
|
33
|
+
], Category.prototype, "descriptionAr", void 0);
|
|
34
|
+
__decorate([
|
|
35
|
+
(0, sequelize_typescript_1.Column)({ allowNull: true }),
|
|
36
|
+
__metadata("design:type", String)
|
|
37
|
+
], Category.prototype, "image", void 0);
|
|
38
|
+
__decorate([
|
|
39
|
+
(0, sequelize_typescript_1.Column)({ defaultValue: 0 }),
|
|
40
|
+
__metadata("design:type", Number)
|
|
41
|
+
], Category.prototype, "sortOrder", void 0);
|
|
42
|
+
__decorate([
|
|
43
|
+
(0, sequelize_typescript_1.Column)({
|
|
44
|
+
type: sequelize_typescript_1.DataType.ENUM(...Object.values(status_1.Status)),
|
|
45
|
+
defaultValue: status_1.Status.ACTIVE,
|
|
46
|
+
}),
|
|
47
|
+
__metadata("design:type", String)
|
|
48
|
+
], Category.prototype, "status", void 0);
|
|
49
|
+
__decorate([
|
|
50
|
+
(0, sequelize_typescript_1.ForeignKey)(() => Category),
|
|
51
|
+
(0, sequelize_typescript_1.Column)({ allowNull: true }),
|
|
52
|
+
__metadata("design:type", Number)
|
|
53
|
+
], Category.prototype, "parentId", void 0);
|
|
54
|
+
__decorate([
|
|
55
|
+
(0, sequelize_typescript_1.BelongsTo)(() => Category, { foreignKey: 'parentId', as: 'parent' }),
|
|
56
|
+
__metadata("design:type", Category)
|
|
57
|
+
], Category.prototype, "parent", void 0);
|
|
58
|
+
__decorate([
|
|
59
|
+
(0, sequelize_typescript_1.HasMany)(() => Category, { foreignKey: 'parentId', as: 'children' }),
|
|
60
|
+
__metadata("design:type", Array)
|
|
61
|
+
], Category.prototype, "children", void 0);
|
|
62
|
+
exports.Category = Category = __decorate([
|
|
63
|
+
sequelize_typescript_1.Table
|
|
64
|
+
], Category);
|
|
65
|
+
//# sourceMappingURL=category.entity.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"category.entity.js","sourceRoot":"","sources":["../../../../../libs/tatayab-entities-library/src/entities/category.entity.ts"],"names":[],"mappings":";;;;;;;;;;;;AAAA,+DAQ8B;AAC9B,kDAA+C;AAGxC,IAAM,QAAQ,GAAd,MAAM,QAAS,SAAQ,4BAAK;CAkClC,CAAA;AAlCY,4BAAQ;AAEX;IADP,IAAA,6BAAM,EAAC,EAAE,SAAS,EAAE,KAAK,EAAE,CAAC;;wCACN;AAGf;IADP,IAAA,6BAAM,EAAC,EAAE,SAAS,EAAE,KAAK,EAAE,CAAC;;wCACN;AAGf;IADP,IAAA,6BAAM,EAAC,EAAE,IAAI,EAAE,+BAAQ,CAAC,IAAI,EAAE,SAAS,EAAE,IAAI,EAAE,CAAC;;+CAClB;AAGvB;IADP,IAAA,6BAAM,EAAC,EAAE,IAAI,EAAE,+BAAQ,CAAC,IAAI,EAAE,SAAS,EAAE,IAAI,EAAE,CAAC;;+CAClB;AAGvB;IADP,IAAA,6BAAM,EAAC,EAAE,SAAS,EAAE,IAAI,EAAE,CAAC;;uCACL;AAGf;IADP,IAAA,6BAAM,EAAC,EAAE,YAAY,EAAE,CAAC,EAAE,CAAC;;2CACF;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;;wCACqB;AAIf;IAFP,IAAA,iCAAU,EAAC,GAAG,EAAE,CAAC,QAAQ,CAAC;IAC1B,IAAA,6BAAM,EAAC,EAAE,SAAS,EAAE,IAAI,EAAE,CAAC;;0CACF;AAGlB;IADP,IAAA,gCAAS,EAAC,GAAG,EAAE,CAAC,QAAQ,EAAE,EAAE,UAAU,EAAE,UAAU,EAAE,EAAE,EAAE,QAAQ,EAAE,CAAC;8BACnD,QAAQ;wCAAC;AAGlB;IADP,IAAA,8BAAO,EAAC,GAAG,EAAE,CAAC,QAAQ,EAAE,EAAE,UAAU,EAAE,UAAU,EAAE,EAAE,EAAE,UAAU,EAAE,CAAC;;0CACtC;mBAjCnB,QAAQ;IADpB,4BAAK;GACO,QAAQ,CAkCpB"}
|
|
@@ -0,0 +1,16 @@
|
|
|
1
|
+
import { Model } from 'sequelize-typescript';
|
|
2
|
+
import { Inventory } from './inventory.entity';
|
|
3
|
+
import { Product } from './product.entity';
|
|
4
|
+
import { ProductVariant } from './product-variant.entity';
|
|
5
|
+
export declare class InventoryStock extends Model {
|
|
6
|
+
inventoryId: number;
|
|
7
|
+
productId: number;
|
|
8
|
+
productVariantId?: number;
|
|
9
|
+
physicalQuantity: number;
|
|
10
|
+
reservedQuantity: number;
|
|
11
|
+
availableFromVendor: boolean;
|
|
12
|
+
lowStockThreshold?: number;
|
|
13
|
+
inventory: Inventory;
|
|
14
|
+
product: Product;
|
|
15
|
+
variant?: ProductVariant;
|
|
16
|
+
}
|
|
@@ -0,0 +1,66 @@
|
|
|
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.InventoryStock = void 0;
|
|
13
|
+
const sequelize_typescript_1 = require("sequelize-typescript");
|
|
14
|
+
const inventory_entity_1 = require("./inventory.entity");
|
|
15
|
+
const product_entity_1 = require("./product.entity");
|
|
16
|
+
const product_variant_entity_1 = require("./product-variant.entity");
|
|
17
|
+
let InventoryStock = class InventoryStock extends sequelize_typescript_1.Model {
|
|
18
|
+
};
|
|
19
|
+
exports.InventoryStock = InventoryStock;
|
|
20
|
+
__decorate([
|
|
21
|
+
(0, sequelize_typescript_1.ForeignKey)(() => inventory_entity_1.Inventory),
|
|
22
|
+
(0, sequelize_typescript_1.Column)({ allowNull: false }),
|
|
23
|
+
__metadata("design:type", Number)
|
|
24
|
+
], InventoryStock.prototype, "inventoryId", void 0);
|
|
25
|
+
__decorate([
|
|
26
|
+
(0, sequelize_typescript_1.ForeignKey)(() => product_entity_1.Product),
|
|
27
|
+
(0, sequelize_typescript_1.Column)({ allowNull: false }),
|
|
28
|
+
__metadata("design:type", Number)
|
|
29
|
+
], InventoryStock.prototype, "productId", void 0);
|
|
30
|
+
__decorate([
|
|
31
|
+
(0, sequelize_typescript_1.ForeignKey)(() => product_variant_entity_1.ProductVariant),
|
|
32
|
+
(0, sequelize_typescript_1.Column)({ allowNull: true }),
|
|
33
|
+
__metadata("design:type", Number)
|
|
34
|
+
], InventoryStock.prototype, "productVariantId", void 0);
|
|
35
|
+
__decorate([
|
|
36
|
+
(0, sequelize_typescript_1.Column)({ defaultValue: 0 }),
|
|
37
|
+
__metadata("design:type", Number)
|
|
38
|
+
], InventoryStock.prototype, "physicalQuantity", void 0);
|
|
39
|
+
__decorate([
|
|
40
|
+
(0, sequelize_typescript_1.Column)({ defaultValue: 0 }),
|
|
41
|
+
__metadata("design:type", Number)
|
|
42
|
+
], InventoryStock.prototype, "reservedQuantity", void 0);
|
|
43
|
+
__decorate([
|
|
44
|
+
(0, sequelize_typescript_1.Column)({ defaultValue: false }),
|
|
45
|
+
__metadata("design:type", Boolean)
|
|
46
|
+
], InventoryStock.prototype, "availableFromVendor", void 0);
|
|
47
|
+
__decorate([
|
|
48
|
+
(0, sequelize_typescript_1.Column)({ allowNull: true }),
|
|
49
|
+
__metadata("design:type", Number)
|
|
50
|
+
], InventoryStock.prototype, "lowStockThreshold", void 0);
|
|
51
|
+
__decorate([
|
|
52
|
+
(0, sequelize_typescript_1.BelongsTo)(() => inventory_entity_1.Inventory),
|
|
53
|
+
__metadata("design:type", inventory_entity_1.Inventory)
|
|
54
|
+
], InventoryStock.prototype, "inventory", void 0);
|
|
55
|
+
__decorate([
|
|
56
|
+
(0, sequelize_typescript_1.BelongsTo)(() => product_entity_1.Product),
|
|
57
|
+
__metadata("design:type", product_entity_1.Product)
|
|
58
|
+
], InventoryStock.prototype, "product", void 0);
|
|
59
|
+
__decorate([
|
|
60
|
+
(0, sequelize_typescript_1.BelongsTo)(() => product_variant_entity_1.ProductVariant),
|
|
61
|
+
__metadata("design:type", product_variant_entity_1.ProductVariant)
|
|
62
|
+
], InventoryStock.prototype, "variant", void 0);
|
|
63
|
+
exports.InventoryStock = InventoryStock = __decorate([
|
|
64
|
+
sequelize_typescript_1.Table
|
|
65
|
+
], InventoryStock);
|
|
66
|
+
//# sourceMappingURL=inventory-stock.entity.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"inventory-stock.entity.js","sourceRoot":"","sources":["../../../../../libs/tatayab-entities-library/src/entities/inventory-stock.entity.ts"],"names":[],"mappings":";;;;;;;;;;;;AAAA,+DAO8B;AAC9B,yDAA+C;AAC/C,qDAA2C;AAC3C,qEAA0D;AAGnD,IAAM,cAAc,GAApB,MAAM,cAAe,SAAQ,4BAAK;CAyCxC,CAAA;AAzCY,wCAAc;AAGjB;IAFP,IAAA,iCAAU,EAAC,GAAG,EAAE,CAAC,4BAAS,CAAC;IAC3B,IAAA,6BAAM,EAAC,EAAE,SAAS,EAAE,KAAK,EAAE,CAAC;;mDACD;AAIpB;IAFP,IAAA,iCAAU,EAAC,GAAG,EAAE,CAAC,wBAAO,CAAC;IACzB,IAAA,6BAAM,EAAC,EAAE,SAAS,EAAE,KAAK,EAAE,CAAC;;iDACH;AAKlB;IAFP,IAAA,iCAAU,EAAC,GAAG,EAAE,CAAC,uCAAc,CAAC;IAChC,IAAA,6BAAM,EAAC,EAAE,SAAS,EAAE,IAAI,EAAE,CAAC;;wDACM;AAI1B;IADP,IAAA,6BAAM,EAAC,EAAE,YAAY,EAAE,CAAC,EAAE,CAAC;;wDACK;AAIzB;IADP,IAAA,6BAAM,EAAC,EAAE,YAAY,EAAE,CAAC,EAAE,CAAC;;wDACK;AAMzB;IADP,IAAA,6BAAM,EAAC,EAAE,YAAY,EAAE,KAAK,EAAE,CAAC;;2DACK;AAG7B;IADP,IAAA,6BAAM,EAAC,EAAE,SAAS,EAAE,IAAI,EAAE,CAAC;;yDACO;AAK3B;IADP,IAAA,gCAAS,EAAC,GAAG,EAAE,CAAC,4BAAS,CAAC;8BACR,4BAAS;iDAAC;AAGrB;IADP,IAAA,gCAAS,EAAC,GAAG,EAAE,CAAC,wBAAO,CAAC;8BACR,wBAAO;+CAAC;AAGjB;IADP,IAAA,gCAAS,EAAC,GAAG,EAAE,CAAC,uCAAc,CAAC;8BACd,uCAAc;+CAAC;yBAxCtB,cAAc;IAD1B,4BAAK;GACO,cAAc,CAyC1B"}
|
|
@@ -0,0 +1,15 @@
|
|
|
1
|
+
import { Model } from 'sequelize-typescript';
|
|
2
|
+
import { InventoryStock } from './inventory-stock.entity';
|
|
3
|
+
import { Store } from './store.entity';
|
|
4
|
+
import { Status } from '../utils/enums/status';
|
|
5
|
+
export declare class Inventory extends Model {
|
|
6
|
+
nameEn: string;
|
|
7
|
+
nameAr: string;
|
|
8
|
+
addressEn?: string;
|
|
9
|
+
addressAr?: string;
|
|
10
|
+
contactPhone?: string;
|
|
11
|
+
contactEmail?: string;
|
|
12
|
+
status: Status;
|
|
13
|
+
stocks: InventoryStock[];
|
|
14
|
+
stores: Store[];
|
|
15
|
+
}
|
|
@@ -0,0 +1,63 @@
|
|
|
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
|
|
@@ -0,0 +1 @@
|
|
|
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"}
|
|
@@ -0,0 +1,38 @@
|
|
|
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
|
|
@@ -0,0 +1 @@
|
|
|
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"}
|
|
@@ -0,0 +1,16 @@
|
|
|
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
|
+
}
|
|
@@ -0,0 +1,62 @@
|
|
|
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
|
|
@@ -0,0 +1 @@
|
|
|
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"}
|
|
@@ -0,0 +1,44 @@
|
|
|
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
|
|
@@ -0,0 +1 @@
|
|
|
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"}
|
|
@@ -0,0 +1,32 @@
|
|
|
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
|
|
@@ -0,0 +1 @@
|
|
|
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"}
|
|
@@ -0,0 +1,15 @@
|
|
|
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
|
+
}
|