tt-entities 0.0.51 → 0.0.52
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/product-store.entity.d.ts +7 -0
- package/dist/libs/tatayab-entities-library/entities/product-store.entity.js +18 -0
- package/dist/libs/tatayab-entities-library/entities/product-store.entity.js.map +1 -1
- package/dist/src/main.js +24 -2
- package/libs/tatayab-entities-library/src/entities/product-store.entity.ts +27 -2
- package/package.json +1 -1
|
@@ -1,11 +1,18 @@
|
|
|
1
1
|
import { Model } from 'sequelize-typescript';
|
|
2
|
+
import { Product } from './product.entity';
|
|
3
|
+
import { Store } from './store.entity';
|
|
4
|
+
import { ProductVariant } from './product-variant.entity';
|
|
2
5
|
import { Status } from '../utils/enums/status';
|
|
3
6
|
export declare class ProductStore extends Model {
|
|
4
7
|
productId: number;
|
|
5
8
|
storeId: number;
|
|
9
|
+
productVariantId?: number;
|
|
6
10
|
price?: number;
|
|
7
11
|
salePrice?: number;
|
|
8
12
|
saleStartDate?: Date;
|
|
9
13
|
saleEndDate?: Date;
|
|
10
14
|
status: Status;
|
|
15
|
+
product: Product;
|
|
16
|
+
store: Store;
|
|
17
|
+
variant?: ProductVariant;
|
|
11
18
|
}
|
|
@@ -13,6 +13,7 @@ exports.ProductStore = void 0;
|
|
|
13
13
|
const sequelize_typescript_1 = require("sequelize-typescript");
|
|
14
14
|
const product_entity_1 = require("./product.entity");
|
|
15
15
|
const store_entity_1 = require("./store.entity");
|
|
16
|
+
const product_variant_entity_1 = require("./product-variant.entity");
|
|
16
17
|
const status_1 = require("../utils/enums/status");
|
|
17
18
|
let ProductStore = class ProductStore extends sequelize_typescript_1.Model {
|
|
18
19
|
};
|
|
@@ -27,6 +28,11 @@ __decorate([
|
|
|
27
28
|
(0, sequelize_typescript_1.Column)({ allowNull: false }),
|
|
28
29
|
__metadata("design:type", Number)
|
|
29
30
|
], ProductStore.prototype, "storeId", void 0);
|
|
31
|
+
__decorate([
|
|
32
|
+
(0, sequelize_typescript_1.ForeignKey)(() => product_variant_entity_1.ProductVariant),
|
|
33
|
+
(0, sequelize_typescript_1.Column)({ allowNull: true }),
|
|
34
|
+
__metadata("design:type", Number)
|
|
35
|
+
], ProductStore.prototype, "productVariantId", void 0);
|
|
30
36
|
__decorate([
|
|
31
37
|
(0, sequelize_typescript_1.Column)({ type: sequelize_typescript_1.DataType.DECIMAL(10, 3), allowNull: true }),
|
|
32
38
|
__metadata("design:type", Number)
|
|
@@ -50,6 +56,18 @@ __decorate([
|
|
|
50
56
|
}),
|
|
51
57
|
__metadata("design:type", String)
|
|
52
58
|
], ProductStore.prototype, "status", void 0);
|
|
59
|
+
__decorate([
|
|
60
|
+
(0, sequelize_typescript_1.BelongsTo)(() => product_entity_1.Product),
|
|
61
|
+
__metadata("design:type", product_entity_1.Product)
|
|
62
|
+
], ProductStore.prototype, "product", void 0);
|
|
63
|
+
__decorate([
|
|
64
|
+
(0, sequelize_typescript_1.BelongsTo)(() => store_entity_1.Store),
|
|
65
|
+
__metadata("design:type", store_entity_1.Store)
|
|
66
|
+
], ProductStore.prototype, "store", void 0);
|
|
67
|
+
__decorate([
|
|
68
|
+
(0, sequelize_typescript_1.BelongsTo)(() => product_variant_entity_1.ProductVariant),
|
|
69
|
+
__metadata("design:type", product_variant_entity_1.ProductVariant)
|
|
70
|
+
], ProductStore.prototype, "variant", void 0);
|
|
53
71
|
exports.ProductStore = ProductStore = __decorate([
|
|
54
72
|
sequelize_typescript_1.Table
|
|
55
73
|
], ProductStore);
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"product-store.entity.js","sourceRoot":"","sources":["../../../../libs/tatayab-entities-library/src/entities/product-store.entity.ts"],"names":[],"mappings":";;;;;;;;;;;;AAAA,+
|
|
1
|
+
{"version":3,"file":"product-store.entity.js","sourceRoot":"","sources":["../../../../libs/tatayab-entities-library/src/entities/product-store.entity.ts"],"names":[],"mappings":";;;;;;;;;;;;AAA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