tt-entities 0.0.19 → 0.0.21
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/dist/libs/tatayab-entities-library/entities/apikey.entity.d.ts +15 -0
- package/dist/libs/tatayab-entities-library/entities/apikey.entity.js +62 -0
- package/dist/libs/tatayab-entities-library/entities/apikey.entity.js.map +1 -0
- package/dist/libs/tatayab-entities-library/entities/area.entity.d.ts +7 -0
- package/dist/libs/tatayab-entities-library/entities/area.entity.js +37 -0
- package/dist/libs/tatayab-entities-library/entities/area.entity.js.map +1 -0
- package/dist/libs/tatayab-entities-library/entities/brand.entity.d.ts +12 -0
- package/dist/libs/tatayab-entities-library/entities/brand.entity.js +56 -0
- package/dist/libs/tatayab-entities-library/entities/brand.entity.js.map +1 -0
- package/dist/libs/tatayab-entities-library/entities/category.entity.d.ts +14 -0
- package/dist/libs/tatayab-entities-library/entities/category.entity.js +65 -0
- package/dist/libs/tatayab-entities-library/entities/category.entity.js.map +1 -0
- package/dist/libs/tatayab-entities-library/entities/country.entity.d.ts +8 -0
- package/dist/libs/tatayab-entities-library/entities/country.entity.js +40 -0
- package/dist/libs/tatayab-entities-library/entities/country.entity.js.map +1 -0
- package/dist/libs/tatayab-entities-library/entities/inventory-stock.entity.d.ts +16 -0
- package/dist/libs/tatayab-entities-library/entities/inventory-stock.entity.js +66 -0
- package/dist/libs/tatayab-entities-library/entities/inventory-stock.entity.js.map +1 -0
- package/dist/libs/tatayab-entities-library/entities/inventory.entity.d.ts +15 -0
- package/dist/libs/tatayab-entities-library/entities/inventory.entity.js +63 -0
- package/dist/libs/tatayab-entities-library/entities/inventory.entity.js.map +1 -0
- package/dist/libs/tatayab-entities-library/entities/permission.entity.d.ts +8 -0
- package/dist/libs/tatayab-entities-library/entities/permission.entity.js +38 -0
- package/dist/libs/tatayab-entities-library/entities/permission.entity.js.map +1 -0
- package/dist/libs/tatayab-entities-library/entities/product-media.entity.d.ts +16 -0
- package/dist/libs/tatayab-entities-library/entities/product-media.entity.js +62 -0
- package/dist/libs/tatayab-entities-library/entities/product-media.entity.js.map +1 -0
- package/dist/libs/tatayab-entities-library/entities/product-store.entity.d.ts +11 -0
- package/dist/libs/tatayab-entities-library/entities/product-store.entity.js +56 -0
- package/dist/libs/tatayab-entities-library/entities/product-store.entity.js.map +1 -0
- package/dist/libs/tatayab-entities-library/entities/product-tag.entity.d.ts +5 -0
- package/dist/libs/tatayab-entities-library/entities/product-tag.entity.js +32 -0
- package/dist/libs/tatayab-entities-library/entities/product-tag.entity.js.map +1 -0
- package/dist/libs/tatayab-entities-library/entities/product-variant-option.entity.d.ts +5 -0
- package/dist/libs/tatayab-entities-library/entities/product-variant-option.entity.js +32 -0
- package/dist/libs/tatayab-entities-library/entities/product-variant-option.entity.js.map +1 -0
- package/dist/libs/tatayab-entities-library/entities/product-variant.entity.d.ts +15 -0
- package/dist/libs/tatayab-entities-library/entities/product-variant.entity.js +64 -0
- package/dist/libs/tatayab-entities-library/entities/product-variant.entity.js.map +1 -0
- package/dist/libs/tatayab-entities-library/entities/product.entity.d.ts +29 -0
- package/dist/libs/tatayab-entities-library/entities/product.entity.js +110 -0
- package/dist/libs/tatayab-entities-library/entities/product.entity.js.map +1 -0
- package/dist/libs/tatayab-entities-library/entities/purchase-order-item.entity.d.ts +25 -0
- package/dist/libs/tatayab-entities-library/entities/purchase-order-item.entity.js +88 -0
- package/dist/libs/tatayab-entities-library/entities/purchase-order-item.entity.js.map +1 -0
- package/dist/libs/tatayab-entities-library/entities/purchase-order.entity.d.ts +27 -0
- package/dist/libs/tatayab-entities-library/entities/purchase-order.entity.js +108 -0
- package/dist/libs/tatayab-entities-library/entities/purchase-order.entity.js.map +1 -0
- package/dist/libs/tatayab-entities-library/entities/role-permission.entity.d.ts +5 -0
- package/dist/libs/tatayab-entities-library/entities/role-permission.entity.js +32 -0
- package/dist/libs/tatayab-entities-library/entities/role-permission.entity.js.map +1 -0
- package/dist/libs/tatayab-entities-library/entities/stock-movement.entity.d.ts +23 -0
- package/dist/libs/tatayab-entities-library/entities/stock-movement.entity.js +92 -0
- package/dist/libs/tatayab-entities-library/entities/stock-movement.entity.js.map +1 -0
- package/dist/libs/tatayab-entities-library/entities/store-inventory.entity.d.ts +6 -0
- package/dist/libs/tatayab-entities-library/entities/store-inventory.entity.js +36 -0
- package/dist/libs/tatayab-entities-library/entities/store-inventory.entity.js.map +1 -0
- package/dist/libs/tatayab-entities-library/entities/store.entity.d.ts +21 -0
- package/dist/libs/tatayab-entities-library/entities/store.entity.js +86 -0
- package/dist/libs/tatayab-entities-library/entities/store.entity.js.map +1 -0
- package/dist/libs/tatayab-entities-library/entities/sys.role.entity.d.ts +7 -0
- package/dist/libs/tatayab-entities-library/entities/sys.role.entity.js +34 -0
- package/dist/libs/tatayab-entities-library/entities/sys.role.entity.js.map +1 -0
- package/dist/libs/tatayab-entities-library/entities/sys.user.entity.d.ts +16 -0
- package/dist/libs/tatayab-entities-library/entities/sys.user.entity.js +70 -0
- package/dist/libs/tatayab-entities-library/entities/sys.user.entity.js.map +1 -0
- package/dist/libs/tatayab-entities-library/entities/tag.entity.d.ts +12 -0
- package/dist/libs/tatayab-entities-library/entities/tag.entity.js +54 -0
- package/dist/libs/tatayab-entities-library/entities/tag.entity.js.map +1 -0
- package/dist/libs/tatayab-entities-library/entities/user.entity.d.ts +27 -0
- package/dist/libs/tatayab-entities-library/entities/user.entity.js +114 -0
- package/dist/libs/tatayab-entities-library/entities/user.entity.js.map +1 -0
- package/dist/libs/tatayab-entities-library/entities/userDevice.entity.d.ts +11 -0
- package/dist/libs/tatayab-entities-library/entities/userDevice.entity.js +54 -0
- package/dist/libs/tatayab-entities-library/entities/userDevice.entity.js.map +1 -0
- package/dist/libs/tatayab-entities-library/entities/variant-option.entity.d.ts +11 -0
- package/dist/libs/tatayab-entities-library/entities/variant-option.entity.js +50 -0
- package/dist/libs/tatayab-entities-library/entities/variant-option.entity.js.map +1 -0
- package/dist/libs/tatayab-entities-library/entities/variant-type.entity.d.ts +7 -0
- package/dist/libs/tatayab-entities-library/entities/variant-type.entity.js +37 -0
- package/dist/libs/tatayab-entities-library/entities/variant-type.entity.js.map +1 -0
- package/dist/libs/tatayab-entities-library/entities/vendor-product.entity.d.ts +19 -0
- package/dist/libs/tatayab-entities-library/entities/vendor-product.entity.js +78 -0
- package/dist/libs/tatayab-entities-library/entities/vendor-product.entity.js.map +1 -0
- package/dist/libs/tatayab-entities-library/entities/vendor.entity.d.ts +19 -0
- package/dist/libs/tatayab-entities-library/entities/vendor.entity.js +82 -0
- package/dist/libs/tatayab-entities-library/entities/vendor.entity.js.map +1 -0
- package/dist/libs/tatayab-entities-library/index.d.ts +39 -0
- package/dist/libs/tatayab-entities-library/index.js +143 -0
- package/dist/libs/tatayab-entities-library/index.js.map +1 -0
- package/dist/libs/tatayab-entities-library/utils/enums/gender.d.ts +5 -0
- package/dist/libs/tatayab-entities-library/utils/enums/gender.js +10 -0
- package/dist/libs/tatayab-entities-library/utils/enums/gender.js.map +1 -0
- package/dist/libs/tatayab-entities-library/utils/enums/language.d.ts +4 -0
- package/dist/libs/tatayab-entities-library/utils/enums/language.js +9 -0
- package/dist/libs/tatayab-entities-library/utils/enums/language.js.map +1 -0
- package/dist/libs/tatayab-entities-library/utils/enums/osName.d.ts +5 -0
- package/dist/libs/tatayab-entities-library/utils/enums/osName.js +10 -0
- package/dist/libs/tatayab-entities-library/utils/enums/osName.js.map +1 -0
- package/dist/libs/tatayab-entities-library/utils/enums/productApp.d.ts +4 -0
- package/dist/libs/tatayab-entities-library/utils/enums/productApp.js +9 -0
- package/dist/libs/tatayab-entities-library/utils/enums/productApp.js.map +1 -0
- package/dist/libs/tatayab-entities-library/utils/enums/purchaseOrderStatus.d.ts +8 -0
- package/dist/libs/tatayab-entities-library/utils/enums/purchaseOrderStatus.js +13 -0
- package/dist/libs/tatayab-entities-library/utils/enums/purchaseOrderStatus.js.map +1 -0
- package/dist/libs/tatayab-entities-library/utils/enums/status.d.ts +4 -0
- package/dist/libs/tatayab-entities-library/utils/enums/status.js +9 -0
- package/dist/libs/tatayab-entities-library/utils/enums/status.js.map +1 -0
- package/dist/libs/tatayab-entities-library/utils/enums/stockMovementType.d.ts +11 -0
- package/dist/libs/tatayab-entities-library/utils/enums/stockMovementType.js +16 -0
- package/dist/libs/tatayab-entities-library/utils/enums/stockMovementType.js.map +1 -0
- package/dist/libs/tatayab-entities-library/utils/enums/versiontype.d.ts +4 -0
- package/dist/libs/tatayab-entities-library/utils/enums/versiontype.js +9 -0
- package/dist/libs/tatayab-entities-library/utils/enums/versiontype.js.map +1 -0
- package/package.json +5 -5
- package/dist/src/main.js +0 -2372
|
@@ -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,11 @@
|
|
|
1
|
+
import { Model } from 'sequelize-typescript';
|
|
2
|
+
import { Status } from '../utils/enums/status';
|
|
3
|
+
export declare class ProductStore extends Model {
|
|
4
|
+
productId: number;
|
|
5
|
+
storeId: number;
|
|
6
|
+
price?: number;
|
|
7
|
+
salePrice?: number;
|
|
8
|
+
saleStartDate?: Date;
|
|
9
|
+
saleEndDate?: Date;
|
|
10
|
+
status: Status;
|
|
11
|
+
}
|
|
@@ -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.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)({ type: sequelize_typescript_1.DataType.DECIMAL(10, 3), allowNull: true }),
|
|
36
|
+
__metadata("design:type", Number)
|
|
37
|
+
], ProductStore.prototype, "salePrice", void 0);
|
|
38
|
+
__decorate([
|
|
39
|
+
(0, sequelize_typescript_1.Column)({ type: sequelize_typescript_1.DataType.DATE, allowNull: true }),
|
|
40
|
+
__metadata("design:type", Date)
|
|
41
|
+
], ProductStore.prototype, "saleStartDate", void 0);
|
|
42
|
+
__decorate([
|
|
43
|
+
(0, sequelize_typescript_1.Column)({ type: sequelize_typescript_1.DataType.DATE, allowNull: true }),
|
|
44
|
+
__metadata("design:type", Date)
|
|
45
|
+
], ProductStore.prototype, "saleEndDate", 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
|
+
], ProductStore.prototype, "status", void 0);
|
|
53
|
+
exports.ProductStore = ProductStore = __decorate([
|
|
54
|
+
sequelize_typescript_1.Table
|
|
55
|
+
], ProductStore);
|
|
56
|
+
//# 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;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;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;AAIf;IADP,IAAA,6BAAM,EAAC,EAAE,IAAI,EAAE,+BAAQ,CAAC,OAAO,CAAC,EAAE,EAAE,CAAC,CAAC,EAAE,SAAS,EAAE,IAAI,EAAE,CAAC;;+CAChC;AAGnB;IADP,IAAA,6BAAM,EAAC,EAAE,IAAI,EAAE,+BAAQ,CAAC,IAAI,EAAE,SAAS,EAAE,IAAI,EAAE,CAAC;8BACzB,IAAI;mDAAC;AAGrB;IADP,IAAA,6BAAM,EAAC,EAAE,IAAI,EAAE,+BAAQ,CAAC,IAAI,EAAE,SAAS,EAAE,IAAI,EAAE,CAAC;8BAC3B,IAAI;iDAAC;AAMnB;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;uBA3BZ,YAAY;IADxB,4BAAK;GACO,YAAY,CA4BxB"}
|
|
@@ -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.ProductTag = void 0;
|
|
13
|
+
const sequelize_typescript_1 = require("sequelize-typescript");
|
|
14
|
+
const product_entity_1 = require("./product.entity");
|
|
15
|
+
const tag_entity_1 = require("./tag.entity");
|
|
16
|
+
let ProductTag = class ProductTag extends sequelize_typescript_1.Model {
|
|
17
|
+
};
|
|
18
|
+
exports.ProductTag = ProductTag;
|
|
19
|
+
__decorate([
|
|
20
|
+
(0, sequelize_typescript_1.ForeignKey)(() => product_entity_1.Product),
|
|
21
|
+
(0, sequelize_typescript_1.Column)({ allowNull: false }),
|
|
22
|
+
__metadata("design:type", Number)
|
|
23
|
+
], ProductTag.prototype, "productId", void 0);
|
|
24
|
+
__decorate([
|
|
25
|
+
(0, sequelize_typescript_1.ForeignKey)(() => tag_entity_1.Tag),
|
|
26
|
+
(0, sequelize_typescript_1.Column)({ allowNull: false }),
|
|
27
|
+
__metadata("design:type", Number)
|
|
28
|
+
], ProductTag.prototype, "tagId", void 0);
|
|
29
|
+
exports.ProductTag = ProductTag = __decorate([
|
|
30
|
+
sequelize_typescript_1.Table
|
|
31
|
+
], ProductTag);
|
|
32
|
+
//# sourceMappingURL=product-tag.entity.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"product-tag.entity.js","sourceRoot":"","sources":["../../../../libs/tatayab-entities-library/src/entities/product-tag.entity.ts"],"names":[],"mappings":";;;;;;;;;;;;AAAA,+DAK8B;AAC9B,qDAA2C;AAC3C,6CAAmC;AAG5B,IAAM,UAAU,GAAhB,MAAM,UAAW,SAAQ,4BAAK;CAQpC,CAAA;AARY,gCAAU;AAGb;IAFP,IAAA,iCAAU,EAAC,GAAG,EAAE,CAAC,wBAAO,CAAC;IACzB,IAAA,6BAAM,EAAC,EAAE,SAAS,EAAE,KAAK,EAAE,CAAC;;6CACH;AAIlB;IAFP,IAAA,iCAAU,EAAC,GAAG,EAAE,CAAC,gBAAG,CAAC;IACrB,IAAA,6BAAM,EAAC,EAAE,SAAS,EAAE,KAAK,EAAE,CAAC;;yCACP;qBAPX,UAAU;IADtB,4BAAK;GACO,UAAU,CAQtB"}
|
|
@@ -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
|
+
}
|
|
@@ -0,0 +1,64 @@
|
|
|
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
|
|
@@ -0,0 +1 @@
|
|
|
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"}
|
|
@@ -0,0 +1,29 @@
|
|
|
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 { Tag } from './tag.entity';
|
|
8
|
+
import { Status } from '../utils/enums/status';
|
|
9
|
+
export declare class Product extends Model {
|
|
10
|
+
nameEn: string;
|
|
11
|
+
nameAr: string;
|
|
12
|
+
descriptionEn?: string;
|
|
13
|
+
descriptionAr?: string;
|
|
14
|
+
sku?: string;
|
|
15
|
+
barcode?: string;
|
|
16
|
+
defaultPrice: number;
|
|
17
|
+
brandId?: number;
|
|
18
|
+
categoryId?: number;
|
|
19
|
+
sortOrder: number;
|
|
20
|
+
isFeatured: boolean;
|
|
21
|
+
hasVariants: boolean;
|
|
22
|
+
status: Status;
|
|
23
|
+
brand: Brand;
|
|
24
|
+
category: Category;
|
|
25
|
+
media: ProductMedia[];
|
|
26
|
+
variants: ProductVariant[];
|
|
27
|
+
stores: Store[];
|
|
28
|
+
tags: Tag[];
|
|
29
|
+
}
|
|
@@ -0,0 +1,110 @@
|
|
|
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 product_tag_entity_1 = require("./product-tag.entity");
|
|
20
|
+
const store_entity_1 = require("./store.entity");
|
|
21
|
+
const tag_entity_1 = require("./tag.entity");
|
|
22
|
+
const status_1 = require("../utils/enums/status");
|
|
23
|
+
let Product = class Product extends sequelize_typescript_1.Model {
|
|
24
|
+
};
|
|
25
|
+
exports.Product = Product;
|
|
26
|
+
__decorate([
|
|
27
|
+
(0, sequelize_typescript_1.Column)({ allowNull: false }),
|
|
28
|
+
__metadata("design:type", String)
|
|
29
|
+
], Product.prototype, "nameEn", void 0);
|
|
30
|
+
__decorate([
|
|
31
|
+
(0, sequelize_typescript_1.Column)({ allowNull: false }),
|
|
32
|
+
__metadata("design:type", String)
|
|
33
|
+
], Product.prototype, "nameAr", void 0);
|
|
34
|
+
__decorate([
|
|
35
|
+
(0, sequelize_typescript_1.Column)({ type: sequelize_typescript_1.DataType.TEXT, allowNull: true }),
|
|
36
|
+
__metadata("design:type", String)
|
|
37
|
+
], Product.prototype, "descriptionEn", void 0);
|
|
38
|
+
__decorate([
|
|
39
|
+
(0, sequelize_typescript_1.Column)({ type: sequelize_typescript_1.DataType.TEXT, allowNull: true }),
|
|
40
|
+
__metadata("design:type", String)
|
|
41
|
+
], Product.prototype, "descriptionAr", void 0);
|
|
42
|
+
__decorate([
|
|
43
|
+
(0, sequelize_typescript_1.Column)({ allowNull: true }),
|
|
44
|
+
__metadata("design:type", String)
|
|
45
|
+
], Product.prototype, "sku", void 0);
|
|
46
|
+
__decorate([
|
|
47
|
+
(0, sequelize_typescript_1.Column)({ allowNull: true }),
|
|
48
|
+
__metadata("design:type", String)
|
|
49
|
+
], Product.prototype, "barcode", void 0);
|
|
50
|
+
__decorate([
|
|
51
|
+
(0, sequelize_typescript_1.Column)({ type: sequelize_typescript_1.DataType.DECIMAL(10, 3), allowNull: false, defaultValue: 0 }),
|
|
52
|
+
__metadata("design:type", Number)
|
|
53
|
+
], Product.prototype, "defaultPrice", void 0);
|
|
54
|
+
__decorate([
|
|
55
|
+
(0, sequelize_typescript_1.ForeignKey)(() => brand_entity_1.Brand),
|
|
56
|
+
(0, sequelize_typescript_1.Column)({ allowNull: true }),
|
|
57
|
+
__metadata("design:type", Number)
|
|
58
|
+
], Product.prototype, "brandId", void 0);
|
|
59
|
+
__decorate([
|
|
60
|
+
(0, sequelize_typescript_1.ForeignKey)(() => category_entity_1.Category),
|
|
61
|
+
(0, sequelize_typescript_1.Column)({ allowNull: true }),
|
|
62
|
+
__metadata("design:type", Number)
|
|
63
|
+
], Product.prototype, "categoryId", void 0);
|
|
64
|
+
__decorate([
|
|
65
|
+
(0, sequelize_typescript_1.Column)({ defaultValue: 0 }),
|
|
66
|
+
__metadata("design:type", Number)
|
|
67
|
+
], Product.prototype, "sortOrder", void 0);
|
|
68
|
+
__decorate([
|
|
69
|
+
(0, sequelize_typescript_1.Column)({ defaultValue: false }),
|
|
70
|
+
__metadata("design:type", Boolean)
|
|
71
|
+
], Product.prototype, "isFeatured", void 0);
|
|
72
|
+
__decorate([
|
|
73
|
+
(0, sequelize_typescript_1.Column)({ defaultValue: false }),
|
|
74
|
+
__metadata("design:type", Boolean)
|
|
75
|
+
], Product.prototype, "hasVariants", void 0);
|
|
76
|
+
__decorate([
|
|
77
|
+
(0, sequelize_typescript_1.Column)({
|
|
78
|
+
type: sequelize_typescript_1.DataType.ENUM(...Object.values(status_1.Status)),
|
|
79
|
+
defaultValue: status_1.Status.ACTIVE,
|
|
80
|
+
}),
|
|
81
|
+
__metadata("design:type", String)
|
|
82
|
+
], Product.prototype, "status", void 0);
|
|
83
|
+
__decorate([
|
|
84
|
+
(0, sequelize_typescript_1.BelongsTo)(() => brand_entity_1.Brand),
|
|
85
|
+
__metadata("design:type", brand_entity_1.Brand)
|
|
86
|
+
], Product.prototype, "brand", void 0);
|
|
87
|
+
__decorate([
|
|
88
|
+
(0, sequelize_typescript_1.BelongsTo)(() => category_entity_1.Category),
|
|
89
|
+
__metadata("design:type", category_entity_1.Category)
|
|
90
|
+
], Product.prototype, "category", void 0);
|
|
91
|
+
__decorate([
|
|
92
|
+
(0, sequelize_typescript_1.HasMany)(() => product_media_entity_1.ProductMedia),
|
|
93
|
+
__metadata("design:type", Array)
|
|
94
|
+
], Product.prototype, "media", void 0);
|
|
95
|
+
__decorate([
|
|
96
|
+
(0, sequelize_typescript_1.HasMany)(() => product_variant_entity_1.ProductVariant),
|
|
97
|
+
__metadata("design:type", Array)
|
|
98
|
+
], Product.prototype, "variants", void 0);
|
|
99
|
+
__decorate([
|
|
100
|
+
(0, sequelize_typescript_1.BelongsToMany)(() => store_entity_1.Store, () => product_store_entity_1.ProductStore),
|
|
101
|
+
__metadata("design:type", Array)
|
|
102
|
+
], Product.prototype, "stores", void 0);
|
|
103
|
+
__decorate([
|
|
104
|
+
(0, sequelize_typescript_1.BelongsToMany)(() => tag_entity_1.Tag, () => product_tag_entity_1.ProductTag),
|
|
105
|
+
__metadata("design:type", Array)
|
|
106
|
+
], Product.prototype, "tags", void 0);
|
|
107
|
+
exports.Product = Product = __decorate([
|
|
108
|
+
sequelize_typescript_1.Table
|
|
109
|
+
], Product);
|
|
110
|
+
//# sourceMappingURL=product.entity.js.map
|
|
@@ -0,0 +1 @@
|
|
|
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,6DAAkD;AAClD,iDAAuC;AACvC,6CAAmC;AACnC,kDAA+C;AAGxC,IAAM,OAAO,GAAb,MAAM,OAAQ,SAAQ,4BAAK;CAiEjC,CAAA;AAjEY,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;AAGhB;IADP,IAAA,oCAAa,EAAC,GAAG,EAAE,CAAC,gBAAG,EAAE,GAAG,EAAE,CAAC,+BAAU,CAAC;;qCACvB;kBAhET,OAAO;IADnB,4BAAK;GACO,OAAO,CAiEnB"}
|
|
@@ -0,0 +1,25 @@
|
|
|
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
|
+
}
|
|
@@ -0,0 +1,88 @@
|
|
|
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.PurchaseOrderItem = exports.PurchaseOrderItemStatus = void 0;
|
|
13
|
+
const sequelize_typescript_1 = require("sequelize-typescript");
|
|
14
|
+
const purchase_order_entity_1 = require("./purchase-order.entity");
|
|
15
|
+
const product_entity_1 = require("./product.entity");
|
|
16
|
+
const product_variant_entity_1 = require("./product-variant.entity");
|
|
17
|
+
var PurchaseOrderItemStatus;
|
|
18
|
+
(function (PurchaseOrderItemStatus) {
|
|
19
|
+
PurchaseOrderItemStatus["PENDING"] = "pending";
|
|
20
|
+
PurchaseOrderItemStatus["PARTIALLY_RECEIVED"] = "partially_received";
|
|
21
|
+
PurchaseOrderItemStatus["FULLY_RECEIVED"] = "fully_received";
|
|
22
|
+
PurchaseOrderItemStatus["CANCELLED"] = "cancelled";
|
|
23
|
+
})(PurchaseOrderItemStatus || (exports.PurchaseOrderItemStatus = PurchaseOrderItemStatus = {}));
|
|
24
|
+
let PurchaseOrderItem = class PurchaseOrderItem extends sequelize_typescript_1.Model {
|
|
25
|
+
};
|
|
26
|
+
exports.PurchaseOrderItem = PurchaseOrderItem;
|
|
27
|
+
__decorate([
|
|
28
|
+
(0, sequelize_typescript_1.ForeignKey)(() => purchase_order_entity_1.PurchaseOrder),
|
|
29
|
+
(0, sequelize_typescript_1.Column)({ allowNull: false }),
|
|
30
|
+
__metadata("design:type", Number)
|
|
31
|
+
], PurchaseOrderItem.prototype, "purchaseOrderId", void 0);
|
|
32
|
+
__decorate([
|
|
33
|
+
(0, sequelize_typescript_1.ForeignKey)(() => product_entity_1.Product),
|
|
34
|
+
(0, sequelize_typescript_1.Column)({ allowNull: false }),
|
|
35
|
+
__metadata("design:type", Number)
|
|
36
|
+
], PurchaseOrderItem.prototype, "productId", void 0);
|
|
37
|
+
__decorate([
|
|
38
|
+
(0, sequelize_typescript_1.ForeignKey)(() => product_variant_entity_1.ProductVariant),
|
|
39
|
+
(0, sequelize_typescript_1.Column)({ allowNull: true }),
|
|
40
|
+
__metadata("design:type", Number)
|
|
41
|
+
], PurchaseOrderItem.prototype, "productVariantId", void 0);
|
|
42
|
+
__decorate([
|
|
43
|
+
(0, sequelize_typescript_1.Column)({ allowNull: false }),
|
|
44
|
+
__metadata("design:type", Number)
|
|
45
|
+
], PurchaseOrderItem.prototype, "orderedQuantity", void 0);
|
|
46
|
+
__decorate([
|
|
47
|
+
(0, sequelize_typescript_1.Column)({ defaultValue: 0 }),
|
|
48
|
+
__metadata("design:type", Number)
|
|
49
|
+
], PurchaseOrderItem.prototype, "receivedQuantity", void 0);
|
|
50
|
+
__decorate([
|
|
51
|
+
(0, sequelize_typescript_1.Column)({ defaultValue: 0 }),
|
|
52
|
+
__metadata("design:type", Number)
|
|
53
|
+
], PurchaseOrderItem.prototype, "reservedQuantity", void 0);
|
|
54
|
+
__decorate([
|
|
55
|
+
(0, sequelize_typescript_1.Column)({ type: sequelize_typescript_1.DataType.DECIMAL(10, 3), allowNull: false }),
|
|
56
|
+
__metadata("design:type", Number)
|
|
57
|
+
], PurchaseOrderItem.prototype, "unitCostPrice", void 0);
|
|
58
|
+
__decorate([
|
|
59
|
+
(0, sequelize_typescript_1.Column)({ type: sequelize_typescript_1.DataType.DECIMAL(10, 3), defaultValue: 0 }),
|
|
60
|
+
__metadata("design:type", Number)
|
|
61
|
+
], PurchaseOrderItem.prototype, "totalCostPrice", void 0);
|
|
62
|
+
__decorate([
|
|
63
|
+
(0, sequelize_typescript_1.Column)({
|
|
64
|
+
type: sequelize_typescript_1.DataType.ENUM(...Object.values(PurchaseOrderItemStatus)),
|
|
65
|
+
defaultValue: PurchaseOrderItemStatus.PENDING,
|
|
66
|
+
}),
|
|
67
|
+
__metadata("design:type", String)
|
|
68
|
+
], PurchaseOrderItem.prototype, "status", void 0);
|
|
69
|
+
__decorate([
|
|
70
|
+
(0, sequelize_typescript_1.Column)({ allowNull: true }),
|
|
71
|
+
__metadata("design:type", Number)
|
|
72
|
+
], PurchaseOrderItem.prototype, "triggerOrderId", void 0);
|
|
73
|
+
__decorate([
|
|
74
|
+
(0, sequelize_typescript_1.BelongsTo)(() => purchase_order_entity_1.PurchaseOrder),
|
|
75
|
+
__metadata("design:type", purchase_order_entity_1.PurchaseOrder)
|
|
76
|
+
], PurchaseOrderItem.prototype, "purchaseOrder", void 0);
|
|
77
|
+
__decorate([
|
|
78
|
+
(0, sequelize_typescript_1.BelongsTo)(() => product_entity_1.Product),
|
|
79
|
+
__metadata("design:type", product_entity_1.Product)
|
|
80
|
+
], PurchaseOrderItem.prototype, "product", void 0);
|
|
81
|
+
__decorate([
|
|
82
|
+
(0, sequelize_typescript_1.BelongsTo)(() => product_variant_entity_1.ProductVariant),
|
|
83
|
+
__metadata("design:type", product_variant_entity_1.ProductVariant)
|
|
84
|
+
], PurchaseOrderItem.prototype, "variant", void 0);
|
|
85
|
+
exports.PurchaseOrderItem = PurchaseOrderItem = __decorate([
|
|
86
|
+
sequelize_typescript_1.Table
|
|
87
|
+
], PurchaseOrderItem);
|
|
88
|
+
//# sourceMappingURL=purchase-order-item.entity.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"purchase-order-item.entity.js","sourceRoot":"","sources":["../../../../libs/tatayab-entities-library/src/entities/purchase-order-item.entity.ts"],"names":[],"mappings":";;;;;;;;;;;;AAAA,+DAO8B;AAC9B,mEAAwD;AACxD,qDAA2C;AAC3C,qEAA0D;AAE1D,IAAY,uBAKX;AALD,WAAY,uBAAuB;IACjC,8CAAmB,CAAA;IACnB,oEAAyC,CAAA;IACzC,4DAAiC,CAAA;IACjC,kDAAuB,CAAA;AACzB,CAAC,EALW,uBAAuB,uCAAvB,uBAAuB,QAKlC;AAGM,IAAM,iBAAiB,GAAvB,MAAM,iBAAkB,SAAQ,4BAAK;CAoD3C,CAAA;AApDY,8CAAiB;AAGpB;IAFP,IAAA,iCAAU,EAAC,GAAG,EAAE,CAAC,qCAAa,CAAC;IAC/B,IAAA,6BAAM,EAAC,EAAE,SAAS,EAAE,KAAK,EAAE,CAAC;;0DACG;AAIxB;IAFP,IAAA,iCAAU,EAAC,GAAG,EAAE,CAAC,wBAAO,CAAC;IACzB,IAAA,6BAAM,EAAC,EAAE,SAAS,EAAE,KAAK,EAAE,CAAC;;oDACH;AAIlB;IAFP,IAAA,iCAAU,EAAC,GAAG,EAAE,CAAC,uCAAc,CAAC;IAChC,IAAA,6BAAM,EAAC,EAAE,SAAS,EAAE,IAAI,EAAE,CAAC;;2DACM;AAI1B;IADP,IAAA,6BAAM,EAAC,EAAE,SAAS,EAAE,KAAK,EAAE,CAAC;;0DACG;AAIxB;IADP,IAAA,6BAAM,EAAC,EAAE,YAAY,EAAE,CAAC,EAAE,CAAC;;2DACK;AAIzB;IADP,IAAA,6BAAM,EAAC,EAAE,YAAY,EAAE,CAAC,EAAE,CAAC;;2DACK;AAIzB;IADP,IAAA,6BAAM,EAAC,EAAE,IAAI,EAAE,+BAAQ,CAAC,OAAO,CAAC,EAAE,EAAE,CAAC,CAAC,EAAE,SAAS,EAAE,KAAK,EAAE,CAAC;;wDAC9B;AAGtB;IADP,IAAA,6BAAM,EAAC,EAAE,IAAI,EAAE,+BAAQ,CAAC,OAAO,CAAC,EAAE,EAAE,CAAC,CAAC,EAAE,YAAY,EAAE,CAAC,EAAE,CAAC;;yDAC5B;AAMvB;IAJP,IAAA,6BAAM,EAAC;QACN,IAAI,EAAE,+BAAQ,CAAC,IAAI,CAAC,GAAG,MAAM,CAAC,MAAM,CAAC,uBAAuB,CAAC,CAAC;QAC9D,YAAY,EAAE,uBAAuB,CAAC,OAAO;KAC9C,CAAC;;iDACsC;AAIhC;IADP,IAAA,6BAAM,EAAC,EAAE,SAAS,EAAE,IAAI,EAAE,CAAC;;yDACI;AAKxB;IADP,IAAA,gCAAS,EAAC,GAAG,EAAE,CAAC,qCAAa,CAAC;8BACR,qCAAa;wDAAC;AAG7B;IADP,IAAA,gCAAS,EAAC,GAAG,EAAE,CAAC,wBAAO,CAAC;8BACR,wBAAO;kDAAC;AAGjB;IADP,IAAA,gCAAS,EAAC,GAAG,EAAE,CAAC,uCAAc,CAAC;8BACd,uCAAc;kDAAC;4BAnDtB,iBAAiB;IAD7B,4BAAK;GACO,iBAAiB,CAoD7B"}
|
|
@@ -0,0 +1,27 @@
|
|
|
1
|
+
import { Model } from 'sequelize-typescript';
|
|
2
|
+
import { Vendor } from './vendor.entity';
|
|
3
|
+
import { Inventory } from './inventory.entity';
|
|
4
|
+
import { SysUser } from './sys.user.entity';
|
|
5
|
+
import { PurchaseOrderItem } from './purchase-order-item.entity';
|
|
6
|
+
import { PurchaseOrderStatus } from '../utils/enums/purchaseOrderStatus';
|
|
7
|
+
export declare class PurchaseOrder extends Model {
|
|
8
|
+
poNumber: string;
|
|
9
|
+
vendorId: number;
|
|
10
|
+
inventoryId: number;
|
|
11
|
+
status: PurchaseOrderStatus;
|
|
12
|
+
totalAmount: number;
|
|
13
|
+
currency: string;
|
|
14
|
+
expectedDeliveryDate?: Date;
|
|
15
|
+
sentAt?: Date;
|
|
16
|
+
closedAt?: Date;
|
|
17
|
+
cancelledAt?: Date;
|
|
18
|
+
cancellationReason?: string;
|
|
19
|
+
notes?: string;
|
|
20
|
+
createdBy?: number;
|
|
21
|
+
sentBy?: number;
|
|
22
|
+
vendor: Vendor;
|
|
23
|
+
inventory: Inventory;
|
|
24
|
+
creator?: SysUser;
|
|
25
|
+
sender?: SysUser;
|
|
26
|
+
items: PurchaseOrderItem[];
|
|
27
|
+
}
|