@reachu/database 1.0.1 → 1.0.2
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/entity/Attribute.d.ts +8 -0
- package/dist/entity/Attribute.js +41 -0
- package/dist/entity/Attribute.js.map +1 -0
- package/dist/entity/Category.d.ts +7 -1
- package/dist/entity/Category.js +23 -1
- package/dist/entity/Category.js.map +1 -1
- package/dist/entity/CategoryImages.d.ts +12 -0
- package/dist/entity/CategoryImages.js +57 -0
- package/dist/entity/CategoryImages.js.map +1 -0
- package/dist/entity/Product.entity.d.ts +2 -0
- package/dist/entity/Product.entity.js +6 -0
- package/dist/entity/Product.entity.js.map +1 -1
- package/dist/entity/ProductAttribute.d.ts +9 -0
- package/dist/entity/ProductAttribute.js +49 -0
- package/dist/entity/ProductAttribute.js.map +1 -0
- package/dist/entity/index.d.ts +4 -1
- package/dist/entity/index.js +7 -1
- package/dist/entity/index.js.map +1 -1
- package/dist/helpers/products/storage/search.d.ts +1 -0
- package/dist/migrations/1677706695399-promote_to_production_2023_01_03.d.ts +6 -0
- package/dist/migrations/1677706695399-promote_to_production_2023_01_03.js +49 -0
- package/dist/migrations/1677706695399-promote_to_production_2023_01_03.js.map +1 -0
- package/dist/repositories/index.d.ts +9 -0
- package/dist/repositories/index.js +23 -2
- package/dist/repositories/index.js.map +1 -1
- package/dist/tsconfig.tsbuildinfo +86 -9
- package/package.json +3 -3
- package/src/entity/Attribute.ts +30 -0
- package/src/entity/Category.ts +28 -2
- package/src/entity/CategoryImages.ts +38 -0
- package/src/entity/Product.entity.ts +9 -0
- package/src/entity/ProductAttribute.ts +27 -0
- package/src/entity/index.ts +7 -0
- package/src/migrations/1677706695399-promote_to_production_2023_01_03.ts +34 -0
- package/src/repositories/index.ts +13 -0
|
@@ -0,0 +1,41 @@
|
|
|
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
|
+
var __importDefault = (this && this.__importDefault) || function (mod) {
|
|
12
|
+
return (mod && mod.__esModule) ? mod : { "default": mod };
|
|
13
|
+
};
|
|
14
|
+
Object.defineProperty(exports, "__esModule", { value: true });
|
|
15
|
+
const typeorm_1 = require("typeorm");
|
|
16
|
+
const AuditedModel_1 = __importDefault(require("./AuditedModel"));
|
|
17
|
+
const ProductAttribute_1 = __importDefault(require("./ProductAttribute"));
|
|
18
|
+
let Attribute = class Attribute extends AuditedModel_1.default {
|
|
19
|
+
};
|
|
20
|
+
__decorate([
|
|
21
|
+
typeorm_1.PrimaryGeneratedColumn(),
|
|
22
|
+
__metadata("design:type", Number)
|
|
23
|
+
], Attribute.prototype, "id", void 0);
|
|
24
|
+
__decorate([
|
|
25
|
+
typeorm_1.DeleteDateColumn(),
|
|
26
|
+
__metadata("design:type", Date)
|
|
27
|
+
], Attribute.prototype, "deletedAt", void 0);
|
|
28
|
+
__decorate([
|
|
29
|
+
typeorm_1.Column('varchar', { nullable: false }),
|
|
30
|
+
__metadata("design:type", String)
|
|
31
|
+
], Attribute.prototype, "name", void 0);
|
|
32
|
+
__decorate([
|
|
33
|
+
typeorm_1.OneToMany(() => ProductAttribute_1.default, (productAttribute) => productAttribute.attribute, { cascade: true }),
|
|
34
|
+
typeorm_1.JoinColumn(),
|
|
35
|
+
__metadata("design:type", Array)
|
|
36
|
+
], Attribute.prototype, "productAttribute", void 0);
|
|
37
|
+
Attribute = __decorate([
|
|
38
|
+
typeorm_1.Entity()
|
|
39
|
+
], Attribute);
|
|
40
|
+
exports.default = Attribute;
|
|
41
|
+
//# sourceMappingURL=Attribute.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"Attribute.js","sourceRoot":"","sources":["../../src/entity/Attribute.ts"],"names":[],"mappings":";;;;;;;;;;;;;;AAAA,qCAOiB;AACjB,kEAA0C;AAC1C,0EAAkD;AAGlD,IAAqB,SAAS,GAA9B,MAAqB,SAAU,SAAQ,sBAAY;CAiBlD,CAAA;AAfC;IADC,gCAAsB,EAAE;;qCACd;AAGX;IADC,0BAAgB,EAAE;8BACR,IAAI;4CAAC;AAGhB;IADC,gBAAM,CAAC,SAAS,EAAE,EAAE,QAAQ,EAAE,KAAK,EAAE,CAAC;;uCAC1B;AAQb;IANC,mBAAS,CACR,GAAG,EAAE,CAAC,0BAAgB,EACtB,CAAC,gBAAkC,EAAE,EAAE,CAAC,gBAAgB,CAAC,SAAS,EAClE,EAAE,OAAO,EAAE,IAAI,EAAE,CAClB;IACA,oBAAU,EAAE;;mDACwB;AAhBlB,SAAS;IAD7B,gBAAM,EAAE;GACY,SAAS,CAiB7B;kBAjBoB,SAAS"}
|
|
@@ -1,7 +1,13 @@
|
|
|
1
|
+
import AuditedModel from './AuditedModel';
|
|
2
|
+
import CategoryImages from './CategoryImages';
|
|
1
3
|
import Subcategory from './Subcategory';
|
|
2
|
-
export default class Category {
|
|
4
|
+
export default class Category extends AuditedModel {
|
|
3
5
|
id: number;
|
|
4
6
|
name: string;
|
|
5
7
|
subcategories: Subcategory[];
|
|
8
|
+
deletedAt: Date;
|
|
9
|
+
slug: string;
|
|
10
|
+
menuOrder: number;
|
|
11
|
+
categoryImages: CategoryImages;
|
|
6
12
|
static getCacheKey: () => string;
|
|
7
13
|
}
|
package/dist/entity/Category.js
CHANGED
|
@@ -13,8 +13,10 @@ var __importDefault = (this && this.__importDefault) || function (mod) {
|
|
|
13
13
|
};
|
|
14
14
|
Object.defineProperty(exports, "__esModule", { value: true });
|
|
15
15
|
const typeorm_1 = require("typeorm");
|
|
16
|
+
const AuditedModel_1 = __importDefault(require("./AuditedModel"));
|
|
17
|
+
const CategoryImages_1 = __importDefault(require("./CategoryImages"));
|
|
16
18
|
const Subcategory_1 = __importDefault(require("./Subcategory"));
|
|
17
|
-
let Category = class Category {
|
|
19
|
+
let Category = class Category extends AuditedModel_1.default {
|
|
18
20
|
};
|
|
19
21
|
Category.getCacheKey = () => 'CATEGORIES';
|
|
20
22
|
__decorate([
|
|
@@ -29,6 +31,26 @@ __decorate([
|
|
|
29
31
|
typeorm_1.OneToMany(() => Subcategory_1.default, (subcategory) => subcategory.category),
|
|
30
32
|
__metadata("design:type", Array)
|
|
31
33
|
], Category.prototype, "subcategories", void 0);
|
|
34
|
+
__decorate([
|
|
35
|
+
typeorm_1.DeleteDateColumn(),
|
|
36
|
+
__metadata("design:type", Date)
|
|
37
|
+
], Category.prototype, "deletedAt", void 0);
|
|
38
|
+
__decorate([
|
|
39
|
+
typeorm_1.Column('varchar', { nullable: true }),
|
|
40
|
+
__metadata("design:type", String)
|
|
41
|
+
], Category.prototype, "slug", void 0);
|
|
42
|
+
__decorate([
|
|
43
|
+
typeorm_1.Column('integer', { nullable: true }),
|
|
44
|
+
__metadata("design:type", Number)
|
|
45
|
+
], Category.prototype, "menuOrder", void 0);
|
|
46
|
+
__decorate([
|
|
47
|
+
typeorm_1.ManyToOne(() => CategoryImages_1.default, (categoryImages) => categoryImages.category, {
|
|
48
|
+
eager: true,
|
|
49
|
+
onDelete: 'CASCADE',
|
|
50
|
+
}),
|
|
51
|
+
typeorm_1.JoinColumn(),
|
|
52
|
+
__metadata("design:type", CategoryImages_1.default)
|
|
53
|
+
], Category.prototype, "categoryImages", void 0);
|
|
32
54
|
Category = __decorate([
|
|
33
55
|
typeorm_1.Entity()
|
|
34
56
|
], Category);
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"Category.js","sourceRoot":"","sources":["../../src/entity/Category.ts"],"names":[],"mappings":";;;;;;;;;;;;;;AAAA,
|
|
1
|
+
{"version":3,"file":"Category.js","sourceRoot":"","sources":["../../src/entity/Category.ts"],"names":[],"mappings":";;;;;;;;;;;;;;AAAA,qCAQiB;AACjB,kEAA0C;AAC1C,sEAA8C;AAC9C,gEAAwC;AAGxC,IAAqB,QAAQ,GAA7B,MAAqB,QAAS,SAAQ,sBAAY;CA2BjD,CAAA;AADQ,oBAAW,GAAG,GAAG,EAAE,CAAC,YAAY,CAAC;AAxBxC;IADC,gCAAsB,EAAE;;oCACd;AAGX;IADC,gBAAM,CAAC,SAAS,CAAC;;sCACL;AAGb;IADC,mBAAS,CAAC,GAAG,EAAE,CAAC,qBAAW,EAAE,CAAC,WAAW,EAAE,EAAE,CAAC,WAAW,CAAC,QAAQ,CAAC;;+CACvC;AAG7B;IADC,0BAAgB,EAAE;8BACR,IAAI;2CAAC;AAGhB;IADC,gBAAM,CAAC,SAAS,EAAE,EAAE,QAAQ,EAAE,IAAI,EAAE,CAAC;;sCACzB;AAGb;IADC,gBAAM,CAAC,SAAS,EAAE,EAAE,QAAQ,EAAE,IAAI,EAAE,CAAC;;2CACpB;AAOlB;IALC,mBAAS,CAAC,GAAG,EAAE,CAAC,wBAAc,EAAE,CAAC,cAA8B,EAAE,EAAE,CAAC,cAAc,CAAC,QAAQ,EAAE;QAC5F,KAAK,EAAE,IAAI;QACX,QAAQ,EAAE,SAAS;KACpB,CAAC;IACD,oBAAU,EAAE;8BACG,wBAAc;gDAAC;AAxBZ,QAAQ;IAD5B,gBAAM,EAAE;GACY,QAAQ,CA2B5B;kBA3BoB,QAAQ"}
|
|
@@ -0,0 +1,12 @@
|
|
|
1
|
+
import AuditedModel from './AuditedModel';
|
|
2
|
+
import Category from './Category';
|
|
3
|
+
export default class CategoryImages extends AuditedModel {
|
|
4
|
+
id: number;
|
|
5
|
+
deletedAt: Date;
|
|
6
|
+
srcn: string;
|
|
7
|
+
slug: string;
|
|
8
|
+
name: string;
|
|
9
|
+
src: string;
|
|
10
|
+
alt: string;
|
|
11
|
+
category: Category[];
|
|
12
|
+
}
|
|
@@ -0,0 +1,57 @@
|
|
|
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
|
+
var __importDefault = (this && this.__importDefault) || function (mod) {
|
|
12
|
+
return (mod && mod.__esModule) ? mod : { "default": mod };
|
|
13
|
+
};
|
|
14
|
+
Object.defineProperty(exports, "__esModule", { value: true });
|
|
15
|
+
const typeorm_1 = require("typeorm");
|
|
16
|
+
const AuditedModel_1 = __importDefault(require("./AuditedModel"));
|
|
17
|
+
const Category_1 = __importDefault(require("./Category"));
|
|
18
|
+
let CategoryImages = class CategoryImages extends AuditedModel_1.default {
|
|
19
|
+
};
|
|
20
|
+
__decorate([
|
|
21
|
+
typeorm_1.PrimaryGeneratedColumn(),
|
|
22
|
+
__metadata("design:type", Number)
|
|
23
|
+
], CategoryImages.prototype, "id", void 0);
|
|
24
|
+
__decorate([
|
|
25
|
+
typeorm_1.DeleteDateColumn(),
|
|
26
|
+
__metadata("design:type", Date)
|
|
27
|
+
], CategoryImages.prototype, "deletedAt", void 0);
|
|
28
|
+
__decorate([
|
|
29
|
+
typeorm_1.Column('varchar', { nullable: true }),
|
|
30
|
+
__metadata("design:type", String)
|
|
31
|
+
], CategoryImages.prototype, "srcn", void 0);
|
|
32
|
+
__decorate([
|
|
33
|
+
typeorm_1.Column('varchar', { nullable: true }),
|
|
34
|
+
__metadata("design:type", String)
|
|
35
|
+
], CategoryImages.prototype, "slug", void 0);
|
|
36
|
+
__decorate([
|
|
37
|
+
typeorm_1.Column('varchar', { nullable: true }),
|
|
38
|
+
__metadata("design:type", String)
|
|
39
|
+
], CategoryImages.prototype, "name", void 0);
|
|
40
|
+
__decorate([
|
|
41
|
+
typeorm_1.Column('varchar', { nullable: true }),
|
|
42
|
+
__metadata("design:type", String)
|
|
43
|
+
], CategoryImages.prototype, "src", void 0);
|
|
44
|
+
__decorate([
|
|
45
|
+
typeorm_1.Column('varchar', { nullable: true }),
|
|
46
|
+
__metadata("design:type", String)
|
|
47
|
+
], CategoryImages.prototype, "alt", void 0);
|
|
48
|
+
__decorate([
|
|
49
|
+
typeorm_1.OneToMany(() => Category_1.default, (category) => category.categoryImages, { cascade: true }),
|
|
50
|
+
typeorm_1.JoinColumn(),
|
|
51
|
+
__metadata("design:type", Array)
|
|
52
|
+
], CategoryImages.prototype, "category", void 0);
|
|
53
|
+
CategoryImages = __decorate([
|
|
54
|
+
typeorm_1.Entity()
|
|
55
|
+
], CategoryImages);
|
|
56
|
+
exports.default = CategoryImages;
|
|
57
|
+
//# sourceMappingURL=CategoryImages.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"CategoryImages.js","sourceRoot":"","sources":["../../src/entity/CategoryImages.ts"],"names":[],"mappings":";;;;;;;;;;;;;;AAAA,qCAOiB;AACjB,kEAA0C;AAC1C,0DAAkC;AAGlC,IAAqB,cAAc,GAAnC,MAAqB,cAAe,SAAQ,sBAAY;CAyBvD,CAAA;AAvBC;IADC,gCAAsB,EAAE;;0CACd;AAGX;IADC,0BAAgB,EAAE;8BACR,IAAI;iDAAC;AAGhB;IADC,gBAAM,CAAC,SAAS,EAAE,EAAE,QAAQ,EAAE,IAAI,EAAE,CAAC;;4CACzB;AAGb;IADC,gBAAM,CAAC,SAAS,EAAE,EAAE,QAAQ,EAAE,IAAI,EAAE,CAAC;;4CACzB;AAGb;IADC,gBAAM,CAAC,SAAS,EAAE,EAAE,QAAQ,EAAE,IAAI,EAAE,CAAC;;4CACzB;AAGb;IADC,gBAAM,CAAC,SAAS,EAAE,EAAE,QAAQ,EAAE,IAAI,EAAE,CAAC;;2CAC1B;AAGZ;IADC,gBAAM,CAAC,SAAS,EAAE,EAAE,QAAQ,EAAE,IAAI,EAAE,CAAC;;2CAC1B;AAIZ;IAFC,mBAAS,CAAC,GAAG,EAAE,CAAC,kBAAQ,EAAE,CAAC,QAAkB,EAAE,EAAE,CAAC,QAAQ,CAAC,cAAc,EAAE,EAAE,OAAO,EAAE,IAAI,EAAE,CAAC;IAC7F,oBAAU,EAAE;;gDACQ;AAxBF,cAAc;IADlC,gBAAM,EAAE;GACY,cAAc,CAyBlC;kBAzBoB,cAAc"}
|
|
@@ -10,6 +10,7 @@ import ImportedProduct from './ImportedProduct';
|
|
|
10
10
|
import { Price } from './Price.entity';
|
|
11
11
|
import ProductShipping from './modules/shipping/ProductShipping';
|
|
12
12
|
import { CustomProduct } from './CustomProduct';
|
|
13
|
+
import ProductAttribute from './ProductAttribute';
|
|
13
14
|
export declare class Product extends AuditedModel {
|
|
14
15
|
id: number;
|
|
15
16
|
deletedAt: Date;
|
|
@@ -54,6 +55,7 @@ export declare class Product extends AuditedModel {
|
|
|
54
55
|
revenue: number;
|
|
55
56
|
productShipping: ProductShipping[];
|
|
56
57
|
customProduct: CustomProduct;
|
|
58
|
+
productAttribute: ProductAttribute[];
|
|
57
59
|
convertNumerics(): void;
|
|
58
60
|
static getCacheKey(id: any, currency: any): string;
|
|
59
61
|
static invalidateCache(productId: any, removeCache: (key: any) => Promise<void>): Promise<void>;
|
|
@@ -38,6 +38,7 @@ const Currency_1 = require("../staticData/Currency");
|
|
|
38
38
|
const Price_entity_1 = require("./Price.entity");
|
|
39
39
|
const ProductShipping_1 = __importDefault(require("./modules/shipping/ProductShipping"));
|
|
40
40
|
const CustomProduct_1 = require("./CustomProduct");
|
|
41
|
+
const ProductAttribute_1 = __importDefault(require("./ProductAttribute"));
|
|
41
42
|
let Product = Product_1 = class Product extends AuditedModel_1.default {
|
|
42
43
|
convertNumerics() {
|
|
43
44
|
const diff = (this.referralFee * this.publicPrice) / 100;
|
|
@@ -243,6 +244,11 @@ __decorate([
|
|
|
243
244
|
typeorm_1.JoinColumn(),
|
|
244
245
|
__metadata("design:type", CustomProduct_1.CustomProduct)
|
|
245
246
|
], Product.prototype, "customProduct", void 0);
|
|
247
|
+
__decorate([
|
|
248
|
+
typeorm_1.OneToMany(() => ProductAttribute_1.default, (productAttribute) => productAttribute.product, { cascade: true }),
|
|
249
|
+
typeorm_1.JoinColumn(),
|
|
250
|
+
__metadata("design:type", Array)
|
|
251
|
+
], Product.prototype, "productAttribute", void 0);
|
|
246
252
|
__decorate([
|
|
247
253
|
typeorm_1.AfterLoad(),
|
|
248
254
|
__metadata("design:type", Function),
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"Product.entity.js","sourceRoot":"","sources":["../../src/entity/Product.entity.ts"],"names":[],"mappings":";;;;;;;;;;;;;;;;;;;;;;;;;AAAA,qCAaiB;AACjB,kDAA0B;AAC1B,gEAAwC;AACxC,wDAAgC;AAChC,kEAA0C;AAC1C,sDAA8B;AAC9B,oDAA4B;AAC5B,wDAAgC;AAChC,0DAAkC;AAClC,wEAAgD;AAChD,2CAAwC;AACxC,qDAAoD;AACpD,iDAAuC;AACvC,yFAAiE;AACjE,mDAAgD;
|
|
1
|
+
{"version":3,"file":"Product.entity.js","sourceRoot":"","sources":["../../src/entity/Product.entity.ts"],"names":[],"mappings":";;;;;;;;;;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AjLY,0BAAO"}
|
|
@@ -0,0 +1,9 @@
|
|
|
1
|
+
import Attribute from './Attribute';
|
|
2
|
+
import AuditedModel from './AuditedModel';
|
|
3
|
+
import { Product } from './Product.entity';
|
|
4
|
+
export default class ProductAttribute extends AuditedModel {
|
|
5
|
+
id: number;
|
|
6
|
+
deletedAt: Date;
|
|
7
|
+
attribute: Attribute;
|
|
8
|
+
product: Product;
|
|
9
|
+
}
|
|
@@ -0,0 +1,49 @@
|
|
|
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
|
+
var __importDefault = (this && this.__importDefault) || function (mod) {
|
|
12
|
+
return (mod && mod.__esModule) ? mod : { "default": mod };
|
|
13
|
+
};
|
|
14
|
+
Object.defineProperty(exports, "__esModule", { value: true });
|
|
15
|
+
const typeorm_1 = require("typeorm");
|
|
16
|
+
const Attribute_1 = __importDefault(require("./Attribute"));
|
|
17
|
+
const AuditedModel_1 = __importDefault(require("./AuditedModel"));
|
|
18
|
+
const Product_entity_1 = require("./Product.entity");
|
|
19
|
+
let ProductAttribute = class ProductAttribute extends AuditedModel_1.default {
|
|
20
|
+
};
|
|
21
|
+
__decorate([
|
|
22
|
+
typeorm_1.PrimaryGeneratedColumn(),
|
|
23
|
+
__metadata("design:type", Number)
|
|
24
|
+
], ProductAttribute.prototype, "id", void 0);
|
|
25
|
+
__decorate([
|
|
26
|
+
typeorm_1.DeleteDateColumn(),
|
|
27
|
+
__metadata("design:type", Date)
|
|
28
|
+
], ProductAttribute.prototype, "deletedAt", void 0);
|
|
29
|
+
__decorate([
|
|
30
|
+
typeorm_1.ManyToOne(() => Attribute_1.default, (attribute) => attribute.productAttribute, {
|
|
31
|
+
eager: true,
|
|
32
|
+
onDelete: 'CASCADE',
|
|
33
|
+
}),
|
|
34
|
+
typeorm_1.JoinColumn(),
|
|
35
|
+
__metadata("design:type", Attribute_1.default)
|
|
36
|
+
], ProductAttribute.prototype, "attribute", void 0);
|
|
37
|
+
__decorate([
|
|
38
|
+
typeorm_1.ManyToOne(() => Product_entity_1.Product, (product) => product.productAttribute, {
|
|
39
|
+
eager: true,
|
|
40
|
+
onDelete: 'CASCADE',
|
|
41
|
+
}),
|
|
42
|
+
typeorm_1.JoinColumn(),
|
|
43
|
+
__metadata("design:type", Product_entity_1.Product)
|
|
44
|
+
], ProductAttribute.prototype, "product", void 0);
|
|
45
|
+
ProductAttribute = __decorate([
|
|
46
|
+
typeorm_1.Entity()
|
|
47
|
+
], ProductAttribute);
|
|
48
|
+
exports.default = ProductAttribute;
|
|
49
|
+
//# sourceMappingURL=ProductAttribute.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"ProductAttribute.js","sourceRoot":"","sources":["../../src/entity/ProductAttribute.ts"],"names":[],"mappings":";;;;;;;;;;;;;;AAAA,qCAAkG;AAClG,4DAAoC;AACpC,kEAA0C;AAC1C,qDAA2C;AAG3C,IAAqB,gBAAgB,GAArC,MAAqB,gBAAiB,SAAQ,sBAAY;CAoBzD,CAAA;AAlBC;IADC,gCAAsB,EAAE;;4CACd;AAGX;IADC,0BAAgB,EAAE;8BACR,IAAI;mDAAC;AAOhB;IALC,mBAAS,CAAC,GAAG,EAAE,CAAC,mBAAS,EAAE,CAAC,SAAoB,EAAE,EAAE,CAAC,SAAS,CAAC,gBAAgB,EAAE;QAChF,KAAK,EAAE,IAAI;QACX,QAAQ,EAAE,SAAS;KACpB,CAAC;IACD,oBAAU,EAAE;8BACF,mBAAS;mDAAC;AAOrB;IALC,mBAAS,CAAC,GAAG,EAAE,CAAC,wBAAO,EAAE,CAAC,OAAgB,EAAE,EAAE,CAAC,OAAO,CAAC,gBAAgB,EAAE;QACxE,KAAK,EAAE,IAAI;QACX,QAAQ,EAAE,SAAS;KACpB,CAAC;IACD,oBAAU,EAAE;8BACJ,wBAAO;iDAAC;AAnBE,gBAAgB;IADpC,gBAAM,EAAE;GACY,gBAAgB,CAoBpC;kBApBoB,gBAAgB"}
|
package/dist/entity/index.d.ts
CHANGED
|
@@ -68,4 +68,7 @@ import ShippingCountry from './modules/shipping/ShippingCountry';
|
|
|
68
68
|
import CustomVariant from './CustomVariant';
|
|
69
69
|
import { CustomProduct } from './CustomProduct';
|
|
70
70
|
import CustomProductImage from './CustomProductImage';
|
|
71
|
-
|
|
71
|
+
import Attribute from './Attribute';
|
|
72
|
+
import ProductAttribute from './ProductAttribute';
|
|
73
|
+
import CategoryImages from './CategoryImages';
|
|
74
|
+
export { CustomVariant, CustomProduct, CustomProductImage, Cart, CartItem, Checkout, CheckoutBillingAddress, CheckoutShippingAddress, PriceData, ProductShipping, Shipping, ShippingCountry, Address, ApiCredential, AuditedModel, BankAccount, Business, BusinessProducts, CardRegistration, Category, Channel, Check, CheckoutMetadata, Contact, Country, Courier, FlatRate, FlatRateCountry, Fulfillment, Image, ImportedProduct, MagentoConnection, MetricActiveUser, Notification, Option, Order, OrderCustomer, OrderItem, OrderShipping, OrderTracking, Payment, PaymentShopify, Permission, Price, Product, Request, Return, ReturnAddress, Role, RolePermission, ShippingPackage, ShopifyConnection, Subcategory, User, UserRole, Variant, Wallet, WooConnection, UserTokenWolt, UserSettings, PaymentMethod, Collection, CollectionItem, CollectionShared, ChannelGroup, ChannelUser, ChannelUserProductSync, UserChannelApiKey, Currency, ExchangeRate, Attribute, ProductAttribute, CategoryImages, };
|
package/dist/entity/index.js
CHANGED
|
@@ -4,7 +4,7 @@ var __importDefault = (this && this.__importDefault) || function (mod) {
|
|
|
4
4
|
};
|
|
5
5
|
Object.defineProperty(exports, "__esModule", { value: true });
|
|
6
6
|
exports.RolePermission = exports.Role = exports.ReturnAddress = exports.Return = exports.Request = exports.Product = exports.Price = exports.Permission = exports.PaymentShopify = exports.Payment = exports.OrderTracking = exports.OrderShipping = exports.OrderItem = exports.OrderCustomer = exports.Order = exports.Option = exports.Notification = exports.MetricActiveUser = exports.MagentoConnection = exports.ImportedProduct = exports.Image = exports.Fulfillment = exports.FlatRateCountry = exports.FlatRate = exports.Courier = exports.Country = exports.Contact = exports.CheckoutMetadata = exports.Check = exports.Channel = exports.Category = exports.CardRegistration = exports.BusinessProducts = exports.Business = exports.BankAccount = exports.AuditedModel = exports.ApiCredential = exports.Address = exports.ShippingCountry = exports.Shipping = exports.ProductShipping = exports.PriceData = exports.CheckoutShippingAddress = exports.CheckoutBillingAddress = exports.Checkout = exports.CartItem = exports.Cart = exports.CustomProductImage = exports.CustomProduct = exports.CustomVariant = void 0;
|
|
7
|
-
exports.ExchangeRate = exports.Currency = exports.UserChannelApiKey = exports.ChannelUserProductSync = exports.ChannelUser = exports.ChannelGroup = exports.CollectionShared = exports.CollectionItem = exports.Collection = exports.PaymentMethod = exports.UserSettings = exports.UserTokenWolt = exports.WooConnection = exports.Wallet = exports.Variant = exports.UserRole = exports.User = exports.Subcategory = exports.ShopifyConnection = exports.ShippingPackage = void 0;
|
|
7
|
+
exports.CategoryImages = exports.ProductAttribute = exports.Attribute = exports.ExchangeRate = exports.Currency = exports.UserChannelApiKey = exports.ChannelUserProductSync = exports.ChannelUser = exports.ChannelGroup = exports.CollectionShared = exports.CollectionItem = exports.Collection = exports.PaymentMethod = exports.UserSettings = exports.UserTokenWolt = exports.WooConnection = exports.Wallet = exports.Variant = exports.UserRole = exports.User = exports.Subcategory = exports.ShopifyConnection = exports.ShippingPackage = void 0;
|
|
8
8
|
const Address_1 = __importDefault(require("./Address"));
|
|
9
9
|
exports.Address = Address_1.default;
|
|
10
10
|
const ApiCredential_1 = __importDefault(require("./ApiCredential"));
|
|
@@ -145,4 +145,10 @@ const CustomProduct_1 = require("./CustomProduct");
|
|
|
145
145
|
Object.defineProperty(exports, "CustomProduct", { enumerable: true, get: function () { return CustomProduct_1.CustomProduct; } });
|
|
146
146
|
const CustomProductImage_1 = __importDefault(require("./CustomProductImage"));
|
|
147
147
|
exports.CustomProductImage = CustomProductImage_1.default;
|
|
148
|
+
const Attribute_1 = __importDefault(require("./Attribute"));
|
|
149
|
+
exports.Attribute = Attribute_1.default;
|
|
150
|
+
const ProductAttribute_1 = __importDefault(require("./ProductAttribute"));
|
|
151
|
+
exports.ProductAttribute = ProductAttribute_1.default;
|
|
152
|
+
const CategoryImages_1 = __importDefault(require("./CategoryImages"));
|
|
153
|
+
exports.CategoryImages = CategoryImages_1.default;
|
|
148
154
|
//# sourceMappingURL=index.js.map
|
package/dist/entity/index.js.map
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"index.js","sourceRoot":"","sources":["../../src/entity/index.ts"],"names":[],"mappings":";;;;;;;AAAA,wDAAgC;
|
|
1
|
+
{"version":3,"file":"index.js","sourceRoot":"","sources":["../../src/entity/index.ts"],"names":[],"mappings":";;;;;;;AAAA,wDAAgC;AA6F9B,kBA7FK,iBAAO,CA6FL;AA5FT,oEAA4C;AA6F1C,wBA7FK,uBAAa,CA6FL;AA5Ff,kEAA0C;AA6FxC,uBA7FK,sBAAY,CA6FL;AA5Fd,gEAAwC;AA6FtC,sBA7FK,qBAAW,CA6FL;AA5Fb,0DAAkC;AA6FhC,mBA7FK,kBAAQ,CA6FL;AA5FV,0EAAkD;AA6FhD,2BA7FK,0BAAgB,CA6FL;AA5FlB,0EAAkD;AA6FhD,2BA7FK,0BAAgB,CA6FL;AA5FlB,0DAAkC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AvBN,2EAAmD;AAwBjD,mBAxBK,kBAAQ,CAwBL;AAvBV,2EAAmD;AAwBjD,mBAxBK,kBAAQ,CAwBL;AAvBV,sFAAmF;AAwBjF,uGAxBO,+CAAsB,OAwBP;AAvBxB,wFAAqF;AAwBnF,wGAxBO,iDAAuB,OAwBP;AAvBzB,4DAAyD;AAwBvD,0FAxBO,qBAAS,OAwBP;AArBX,yFAAiE;AAsB/D,0BAtBK,yBAAe,CAsBL;AArBjB,2EAAmD;AAsBjD,mBAtBK,kBAAQ,CAsBL;AArBV,yFAAiE;AAsB/D,0BAtBK,yBAAe,CAsBL;AApBjB,oEAA4C;AAS1C,wBATK,uBAAa,CASL;AARf,mDAAgD;AAS9C,8FATO,6BAAa,OASP;AARf,8EAAsD;AASpD,6BATK,4BAAkB,CASL;AAPpB,4DAAoC;AA2ElC,oBA3EK,mBAAS,CA2EL;AA1EX,0EAAkD;AA2EhD,2BA3EK,0BAAgB,CA2EL;AA1ElB,sEAA8C;AA2E5C,yBA3EK,wBAAc,CA2EL"}
|
|
@@ -47,6 +47,7 @@ export declare const findById: (id: any, loggedUser: any) => Promise<{
|
|
|
47
47
|
revenue: number;
|
|
48
48
|
productShipping: import("../../../entity").ProductShipping[];
|
|
49
49
|
customProduct: import("../../../entity").CustomProduct;
|
|
50
|
+
productAttribute: import("../../../entity").ProductAttribute[];
|
|
50
51
|
createdAt?: Date;
|
|
51
52
|
updatedAt?: Date;
|
|
52
53
|
}>;
|
|
@@ -0,0 +1,6 @@
|
|
|
1
|
+
import { MigrationInterface, QueryRunner } from "typeorm";
|
|
2
|
+
export declare class promoteToProduction202301031677706695399 implements MigrationInterface {
|
|
3
|
+
name: string;
|
|
4
|
+
up(queryRunner: QueryRunner): Promise<void>;
|
|
5
|
+
down(queryRunner: QueryRunner): Promise<void>;
|
|
6
|
+
}
|
|
@@ -0,0 +1,49 @@
|
|
|
1
|
+
"use strict";
|
|
2
|
+
var __awaiter = (this && this.__awaiter) || function (thisArg, _arguments, P, generator) {
|
|
3
|
+
function adopt(value) { return value instanceof P ? value : new P(function (resolve) { resolve(value); }); }
|
|
4
|
+
return new (P || (P = Promise))(function (resolve, reject) {
|
|
5
|
+
function fulfilled(value) { try { step(generator.next(value)); } catch (e) { reject(e); } }
|
|
6
|
+
function rejected(value) { try { step(generator["throw"](value)); } catch (e) { reject(e); } }
|
|
7
|
+
function step(result) { result.done ? resolve(result.value) : adopt(result.value).then(fulfilled, rejected); }
|
|
8
|
+
step((generator = generator.apply(thisArg, _arguments || [])).next());
|
|
9
|
+
});
|
|
10
|
+
};
|
|
11
|
+
Object.defineProperty(exports, "__esModule", { value: true });
|
|
12
|
+
exports.promoteToProduction202301031677706695399 = void 0;
|
|
13
|
+
class promoteToProduction202301031677706695399 {
|
|
14
|
+
constructor() {
|
|
15
|
+
this.name = 'promoteToProduction202301031677706695399';
|
|
16
|
+
}
|
|
17
|
+
up(queryRunner) {
|
|
18
|
+
return __awaiter(this, void 0, void 0, function* () {
|
|
19
|
+
yield queryRunner.query(`CREATE TABLE \`custom_product_image\` (\`id\` int NOT NULL AUTO_INCREMENT, \`deleted_at\` datetime(6) NULL, \`url\` varchar(255) NOT NULL, \`width\` int NULL, \`height\` int NULL, \`order\` int NOT NULL, \`product_id\` int NULL, PRIMARY KEY (\`id\`)) ENGINE=InnoDB`);
|
|
20
|
+
yield queryRunner.query(`CREATE TABLE \`custom_product\` (\`created_at\` datetime(6) NOT NULL DEFAULT CURRENT_TIMESTAMP(6), \`updated_at\` datetime(6) NOT NULL DEFAULT CURRENT_TIMESTAMP(6) ON UPDATE CURRENT_TIMESTAMP(6), \`id\` int NOT NULL AUTO_INCREMENT, \`deleted_at\` datetime(6) NULL, \`title\` varchar(255) NULL, \`description\` text NULL, \`description_two\` text NULL, \`public_price\` decimal(10,2) NULL, \`sku\` varchar(255) NULL, \`barcode\` varchar(255) NULL, \`visible\` tinyint NOT NULL DEFAULT 0, \`product_id\` int NULL, \`user_id\` int NULL, \`price_amount\` decimal(10,2) NULL, \`price_currency_code\` varchar(255) NULL, \`price_base_amount\` decimal(10,2) NULL, PRIMARY KEY (\`id\`)) ENGINE=InnoDB`);
|
|
21
|
+
yield queryRunner.query(`CREATE TABLE \`custom_variant\` (\`created_at\` datetime(6) NOT NULL DEFAULT CURRENT_TIMESTAMP(6), \`updated_at\` datetime(6) NOT NULL DEFAULT CURRENT_TIMESTAMP(6) ON UPDATE CURRENT_TIMESTAMP(6), \`id\` int NOT NULL AUTO_INCREMENT, \`deleted_at\` datetime(6) NULL, \`title\` varchar(255) NOT NULL, \`sku\` varchar(255) NOT NULL, \`barcode\` varchar(255) NULL, \`quantity\` int NOT NULL, \`custom_product_id\` int NULL, \`variant_id\` int NULL, PRIMARY KEY (\`id\`)) ENGINE=InnoDB`);
|
|
22
|
+
yield queryRunner.query(`ALTER TABLE \`user_settings\` ADD \`custom_products\` tinyint NOT NULL DEFAULT 0`);
|
|
23
|
+
yield queryRunner.query(`ALTER TABLE \`shipping\` ADD \`default\` tinyint NOT NULL DEFAULT 0`);
|
|
24
|
+
yield queryRunner.query(`ALTER TABLE \`product\` ADD \`active\` tinyint NOT NULL DEFAULT 0`);
|
|
25
|
+
yield queryRunner.query(`ALTER TABLE \`custom_product_image\` ADD CONSTRAINT \`FK_02a813811810b4faf6bac7361a4\` FOREIGN KEY (\`product_id\`) REFERENCES \`custom_product\`(\`id\`) ON DELETE CASCADE ON UPDATE NO ACTION`);
|
|
26
|
+
yield queryRunner.query(`ALTER TABLE \`custom_product\` ADD CONSTRAINT \`FK_7a615131bff0eb11f4709f77bcf\` FOREIGN KEY (\`product_id\`) REFERENCES \`product\`(\`id\`) ON DELETE NO ACTION ON UPDATE NO ACTION`);
|
|
27
|
+
yield queryRunner.query(`ALTER TABLE \`custom_product\` ADD CONSTRAINT \`FK_f89b6142de14e0db9655247b926\` FOREIGN KEY (\`user_id\`) REFERENCES \`user\`(\`id\`) ON DELETE NO ACTION ON UPDATE NO ACTION`);
|
|
28
|
+
yield queryRunner.query(`ALTER TABLE \`custom_variant\` ADD CONSTRAINT \`FK_c30da998f87bb92036e815ebdf6\` FOREIGN KEY (\`custom_product_id\`) REFERENCES \`custom_product\`(\`id\`) ON DELETE CASCADE ON UPDATE NO ACTION`);
|
|
29
|
+
yield queryRunner.query(`ALTER TABLE \`custom_variant\` ADD CONSTRAINT \`FK_2266fdf123653773d75afd951da\` FOREIGN KEY (\`variant_id\`) REFERENCES \`variant\`(\`id\`) ON DELETE CASCADE ON UPDATE NO ACTION`);
|
|
30
|
+
});
|
|
31
|
+
}
|
|
32
|
+
down(queryRunner) {
|
|
33
|
+
return __awaiter(this, void 0, void 0, function* () {
|
|
34
|
+
yield queryRunner.query(`ALTER TABLE \`custom_variant\` DROP FOREIGN KEY \`FK_2266fdf123653773d75afd951da\``);
|
|
35
|
+
yield queryRunner.query(`ALTER TABLE \`custom_variant\` DROP FOREIGN KEY \`FK_c30da998f87bb92036e815ebdf6\``);
|
|
36
|
+
yield queryRunner.query(`ALTER TABLE \`custom_product\` DROP FOREIGN KEY \`FK_f89b6142de14e0db9655247b926\``);
|
|
37
|
+
yield queryRunner.query(`ALTER TABLE \`custom_product\` DROP FOREIGN KEY \`FK_7a615131bff0eb11f4709f77bcf\``);
|
|
38
|
+
yield queryRunner.query(`ALTER TABLE \`custom_product_image\` DROP FOREIGN KEY \`FK_02a813811810b4faf6bac7361a4\``);
|
|
39
|
+
yield queryRunner.query(`ALTER TABLE \`product\` DROP COLUMN \`active\``);
|
|
40
|
+
yield queryRunner.query(`ALTER TABLE \`shipping\` DROP COLUMN \`default\``);
|
|
41
|
+
yield queryRunner.query(`ALTER TABLE \`user_settings\` DROP COLUMN \`custom_products\``);
|
|
42
|
+
yield queryRunner.query(`DROP TABLE \`custom_variant\``);
|
|
43
|
+
yield queryRunner.query(`DROP TABLE \`custom_product\``);
|
|
44
|
+
yield queryRunner.query(`DROP TABLE \`custom_product_image\``);
|
|
45
|
+
});
|
|
46
|
+
}
|
|
47
|
+
}
|
|
48
|
+
exports.promoteToProduction202301031677706695399 = promoteToProduction202301031677706695399;
|
|
49
|
+
//# sourceMappingURL=1677706695399-promote_to_production_2023_01_03.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"1677706695399-promote_to_production_2023_01_03.js","sourceRoot":"","sources":["../../src/migrations/1677706695399-promote_to_production_2023_01_03.ts"],"names":[],"mappings":";;;;;;;;;;;;AAEA,MAAa,wCAAwC;IAArD;QACI,SAAI,GAAG,0CAA0C,CAAA;IA8BrD,CAAC;IA5BgB,EAAE,CAAC,WAAwB;;YACpC,MAAM,WAAW,CAAC,KAAK,CAAC,0QAA0Q,CAAC,CAAC;YACpS,MAAM,WAAW,CAAC,KAAK,CAAC,qrBAAqrB,CAAC,CAAC;YAC/sB,MAAM,WAAW,CAAC,KAAK,CAAC,ieAAie,CAAC,CAAC;YAC3f,MAAM,WAAW,CAAC,KAAK,CAAC,kFAAkF,CAAC,CAAC;YAC5G,MAAM,WAAW,CAAC,KAAK,CAAC,qEAAqE,CAAC,CAAC;YAC/F,MAAM,WAAW,CAAC,KAAK,CAAC,mEAAmE,CAAC,CAAC;YAC7F,MAAM,WAAW,CAAC,KAAK,CAAC,iMAAiM,CAAC,CAAC;YAC3N,MAAM,WAAW,CAAC,KAAK,CAAC,sLAAsL,CAAC,CAAC;YAChN,MAAM,WAAW,CAAC,KAAK,CAAC,gLAAgL,CAAC,CAAC;YAC1M,MAAM,WAAW,CAAC,KAAK,CAAC,kMAAkM,CAAC,CAAC;YAC5N,MAAM,WAAW,CAAC,KAAK,CAAC,oLAAoL,CAAC,CAAC;QAClN,CAAC;KAAA;IAEY,IAAI,CAAC,WAAwB;;YACtC,MAAM,WAAW,CAAC,KAAK,CAAC,oFAAoF,CAAC,CAAC;YAC9G,MAAM,WAAW,CAAC,KAAK,CAAC,oFAAoF,CAAC,CAAC;YAC9G,MAAM,WAAW,CAAC,KAAK,CAAC,oFAAoF,CAAC,CAAC;YAC9G,MAAM,WAAW,CAAC,KAAK,CAAC,oFAAoF,CAAC,CAAC;YAC9G,MAAM,WAAW,CAAC,KAAK,CAAC,0FAA0F,CAAC,CAAC;YACpH,MAAM,WAAW,CAAC,KAAK,CAAC,gDAAgD,CAAC,CAAC;YAC1E,MAAM,WAAW,CAAC,KAAK,CAAC,kDAAkD,CAAC,CAAC;YAC5E,MAAM,WAAW,CAAC,KAAK,CAAC,+DAA+D,CAAC,CAAC;YACzF,MAAM,WAAW,CAAC,KAAK,CAAC,+BAA+B,CAAC,CAAC;YACzD,MAAM,WAAW,CAAC,KAAK,CAAC,+BAA+B,CAAC,CAAC;YACzD,MAAM,WAAW,CAAC,KAAK,CAAC,qCAAqC,CAAC,CAAC;QACnE,CAAC;KAAA;CAEJ;AA/BD,4FA+BC"}
|
|
@@ -49,9 +49,18 @@ import ExchangeRate from '../entity/ExchangeRate';
|
|
|
49
49
|
import CustomVariant from '../entity/CustomVariant';
|
|
50
50
|
import { CustomProduct } from '../entity/CustomProduct';
|
|
51
51
|
import CustomProductImage from '../entity/CustomProductImage';
|
|
52
|
+
import Attribute from '../entity/Attribute';
|
|
53
|
+
import ProductAttribute from '../entity/ProductAttribute';
|
|
54
|
+
import CategoryImages from '../entity/CategoryImages';
|
|
52
55
|
import { CartItemRepository, CartRepository, CheckoutBillingAddressRepository, CheckoutRepository, CheckoutShippingAddressRepository, PriceDataRepository } from './shopcart';
|
|
53
56
|
import { ProductShippingRepository, ShippingCountryRepository, ShippingRepository } from './shipping';
|
|
54
57
|
import { Repository } from 'typeorm';
|
|
58
|
+
export declare class CategoryImagesRepository extends Repository<CategoryImages> {
|
|
59
|
+
}
|
|
60
|
+
export declare class ProductAttributeRepository extends Repository<ProductAttribute> {
|
|
61
|
+
}
|
|
62
|
+
export declare class AttributeRepository extends Repository<Attribute> {
|
|
63
|
+
}
|
|
55
64
|
export declare class CustomVariantRepository extends Repository<CustomVariant> {
|
|
56
65
|
}
|
|
57
66
|
export declare class CustomProductRepository extends Repository<CustomProduct> {
|
|
@@ -9,8 +9,8 @@ var __importDefault = (this && this.__importDefault) || function (mod) {
|
|
|
9
9
|
return (mod && mod.__esModule) ? mod : { "default": mod };
|
|
10
10
|
};
|
|
11
11
|
Object.defineProperty(exports, "__esModule", { value: true });
|
|
12
|
-
exports.
|
|
13
|
-
exports.ShippingRepository = exports.ShippingCountryRepository = exports.ProductShippingRepository = exports.PriceDataRepository = exports.CheckoutShippingAddressRepository = exports.CheckoutRepository = exports.CheckoutBillingAddressRepository = exports.CartRepository = exports.CartItemRepository = exports.ExchangeRateRepository = void 0;
|
|
12
|
+
exports.ChannelUserRepository = exports.ChannelGroupRepository = exports.CollectionSharedRepository = exports.CollectionItemRepository = exports.CollectionRepository = exports.PaymentMethodRepository = exports.UserSettingsRepository = exports.UserTokenWoltRepository = exports.WooConnectionRepository = exports.WalletRepository = exports.VariantRepository = exports.UserRoleRepository = exports.UserRepository = exports.SubcategoryRepository = exports.ShopifyConnectionRepository = exports.ShippingPackageRepository = exports.RolePermissionRepository = exports.RoleRepository = exports.RequestRepository = exports.ProductRepository = exports.PermissionRepository = exports.PaymentShopifyRepository = exports.PaymentRepository = exports.OrderTrackingRepository = exports.OrderShippingRepository = exports.OrderItemRepository = exports.OrderRepository = exports.OptionRepository = exports.NotificationRepository = exports.MetricActiveUserRepository = exports.MagentoConnectionRepository = exports.ImportedProductRepository = exports.ImageRepository = exports.FlatRateCountryRepository = exports.FlatRateRepository = exports.CourierRepository = exports.CountryRepository = exports.CheckoutMetadataRepository = exports.ChannelRepository = exports.CategoryRepository = exports.CardRegistrationRepository = exports.BusinessRepository = exports.BankAccountRepository = exports.ApiCredentialRepository = exports.CustomProductImageRepository = exports.CustomProductRepository = exports.CustomVariantRepository = exports.AttributeRepository = exports.ProductAttributeRepository = exports.CategoryImagesRepository = void 0;
|
|
13
|
+
exports.ShippingRepository = exports.ShippingCountryRepository = exports.ProductShippingRepository = exports.PriceDataRepository = exports.CheckoutShippingAddressRepository = exports.CheckoutRepository = exports.CheckoutBillingAddressRepository = exports.CartRepository = exports.CartItemRepository = exports.ExchangeRateRepository = exports.CurrencyRepository = exports.UserChannelApiKeyRepository = exports.ChannelUserProductSyncRepository = void 0;
|
|
14
14
|
const ApiCredential_1 = __importDefault(require("../entity/ApiCredential"));
|
|
15
15
|
const BankAccount_1 = __importDefault(require("../entity/BankAccount"));
|
|
16
16
|
const Business_1 = __importDefault(require("../entity/Business"));
|
|
@@ -62,6 +62,9 @@ const ExchangeRate_1 = __importDefault(require("../entity/ExchangeRate"));
|
|
|
62
62
|
const CustomVariant_1 = __importDefault(require("../entity/CustomVariant"));
|
|
63
63
|
const CustomProduct_1 = require("../entity/CustomProduct");
|
|
64
64
|
const CustomProductImage_1 = __importDefault(require("../entity/CustomProductImage"));
|
|
65
|
+
const Attribute_1 = __importDefault(require("../entity/Attribute"));
|
|
66
|
+
const ProductAttribute_1 = __importDefault(require("../entity/ProductAttribute"));
|
|
67
|
+
const CategoryImages_1 = __importDefault(require("../entity/CategoryImages"));
|
|
65
68
|
const shopcart_1 = require("./shopcart");
|
|
66
69
|
Object.defineProperty(exports, "CartItemRepository", { enumerable: true, get: function () { return shopcart_1.CartItemRepository; } });
|
|
67
70
|
Object.defineProperty(exports, "CartRepository", { enumerable: true, get: function () { return shopcart_1.CartRepository; } });
|
|
@@ -74,6 +77,24 @@ Object.defineProperty(exports, "ProductShippingRepository", { enumerable: true,
|
|
|
74
77
|
Object.defineProperty(exports, "ShippingCountryRepository", { enumerable: true, get: function () { return shipping_1.ShippingCountryRepository; } });
|
|
75
78
|
Object.defineProperty(exports, "ShippingRepository", { enumerable: true, get: function () { return shipping_1.ShippingRepository; } });
|
|
76
79
|
const typeorm_1 = require("typeorm");
|
|
80
|
+
let CategoryImagesRepository = class CategoryImagesRepository extends typeorm_1.Repository {
|
|
81
|
+
};
|
|
82
|
+
CategoryImagesRepository = __decorate([
|
|
83
|
+
typeorm_1.EntityRepository(CategoryImages_1.default)
|
|
84
|
+
], CategoryImagesRepository);
|
|
85
|
+
exports.CategoryImagesRepository = CategoryImagesRepository;
|
|
86
|
+
let ProductAttributeRepository = class ProductAttributeRepository extends typeorm_1.Repository {
|
|
87
|
+
};
|
|
88
|
+
ProductAttributeRepository = __decorate([
|
|
89
|
+
typeorm_1.EntityRepository(ProductAttribute_1.default)
|
|
90
|
+
], ProductAttributeRepository);
|
|
91
|
+
exports.ProductAttributeRepository = ProductAttributeRepository;
|
|
92
|
+
let AttributeRepository = class AttributeRepository extends typeorm_1.Repository {
|
|
93
|
+
};
|
|
94
|
+
AttributeRepository = __decorate([
|
|
95
|
+
typeorm_1.EntityRepository(Attribute_1.default)
|
|
96
|
+
], AttributeRepository);
|
|
97
|
+
exports.AttributeRepository = AttributeRepository;
|
|
77
98
|
let CustomVariantRepository = class CustomVariantRepository extends typeorm_1.Repository {
|
|
78
99
|
};
|
|
79
100
|
CustomVariantRepository = __decorate([
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"index.js","sourceRoot":"","sources":["../../src/repositories/index.ts"],"names":[],"mappings":";;;;;;;;;;;;;AAAA,4EAAoD;AACpD,wEAAgD;AAChD,kEAA0C;AAC1C,kFAA0D;AAC1D,kEAA0C;AAC1C,gEAAwC;AACxC,kFAA0D;AAC1D,gEAAwC;AACxC,gEAAwC;AACxC,kEAA0C;AAC1C,gFAAwD;AACxD,4DAAoC;AACpC,gFAAwD;AACxD,iFAAuE;AACvE,kFAA0D;AAC1D,0EAAkD;AAClD,8DAAsC;AACtC,4DAAoC;AACpC,oEAA4C;AAC5C,4EAAoD;AACpD,4EAAoD;AACpD,gEAAwC;AACxC,8EAAsD;AACtD,sEAA8C;AAC9C,6DAAmD;AACnD,gEAAwC;AACxC,0DAAkC;AAClC,8EAAsD;AACtD,gFAAwD;AACxD,oFAA4D;AAC5D,wEAAgD;AAChD,0DAAkC;AAClC,kEAA0C;AAC1C,gEAAwC;AACxC,8DAAsC;AACtC,4EAAoD;AACpD,4EAAoD;AACpD,0EAAkD;AAClD,4EAAoD;AACpD,sEAA8C;AAC9C,8EAAsD;AACtD,kFAA0D;AAC1D,0EAAkD;AAClD,wEAAgD;AAChD,8FAAsE;AACtE,oFAA4D;AAC5D,kEAA0C;AAC1C,0EAAkD;AAElD,4EAAoD;AACpD,2DAAwD;AACxD,sFAA8D;AAE9D,yCAOoB;
|
|
1
|
+
{"version":3,"file":"index.js","sourceRoot":"","sources":["../../src/repositories/index.ts"],"names":[],"mappings":";;;;;;;;;;;;;AAAA,4EAAoD;AACpD,wEAAgD;AAChD,kEAA0C;AAC1C,kFAA0D;AAC1D,kEAA0C;AAC1C,gEAAwC;AACxC,kFAA0D;AAC1D,gEAAwC;AACxC,gEAAwC;AACxC,kEAA0C;AAC1C,gFAAwD;AACxD,4DAAoC;AACpC,gFAAwD;AACxD,iFAAuE;AACvE,kFAA0D;AAC1D,0EAAkD;AAClD,8DAAsC;AACtC,4DAAoC;AACpC,oEAA4C;AAC5C,4EAAoD;AACpD,4EAAoD;AACpD,gEAAwC;AACxC,8EAAsD;AACtD,sEAA8C;AAC9C,6DAAmD;AACnD,gEAAwC;AACxC,0DAAkC;AAClC,8EAAsD;AACtD,gFAAwD;AACxD,oFAA4D;AAC5D,wEAAgD;AAChD,0DAAkC;AAClC,kEAA0C;AAC1C,gEAAwC;AACxC,8DAAsC;AACtC,4EAAoD;AACpD,4EAAoD;AACpD,0EAAkD;AAClD,4EAAoD;AACpD,sEAA8C;AAC9C,8EAAsD;AACtD,kFAA0D;AAC1D,0EAAkD;AAClD,wEAAgD;AAChD,8FAAsE;AACtE,oFAA4D;AAC5D,kEAA0C;AAC1C,0EAAkD;AAElD,4EAAoD;AACpD,2DAAwD;AACxD,sFAA8D;AAE9D,oEAA4C;AAC5C,kFAA0D;AAC1D,8EAAsD;AAEtD,yCAOoB;AA6KlB,mGAnLA,6BAAkB,OAmLA;AAClB,+FAnLA,yBAAc,OAmLA;AACd,iHAnLA,2CAAgC,OAmLA;AAChC,mGAnLA,6BAAkB,OAmLA;AAClB,kHAnLA,4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1D,wDAAsB"}
|
|
@@ -1921,14 +1921,19 @@
|
|
|
1921
1921
|
"signature": "7ecfaf1bbfdc6d7a697c4132049105fc3c6ca0972a57f7dd845011d10294ad2b",
|
|
1922
1922
|
"affectsGlobalScope": false
|
|
1923
1923
|
},
|
|
1924
|
+
"../src/entity/categoryimages.ts": {
|
|
1925
|
+
"version": "c5866556048c851f9c616bab5c1a40b1f0bb899c87f72f5e3e0b3a8c8940fa49",
|
|
1926
|
+
"signature": "3bba1dcb724720a0a0adaadba003bc6ab47fb41ce4b095a1c6e1974168b15bd7",
|
|
1927
|
+
"affectsGlobalScope": false
|
|
1928
|
+
},
|
|
1924
1929
|
"../src/entity/subcategory.ts": {
|
|
1925
1930
|
"version": "73b85383e0bd1ef6ed0a103cc3e247ea0f4507bbdafcaf78b38930c39c61e49b",
|
|
1926
1931
|
"signature": "7b2670d549ce3013f7fe122e1ee02009ee3b2995a7ba2af385527d2f02329012",
|
|
1927
1932
|
"affectsGlobalScope": false
|
|
1928
1933
|
},
|
|
1929
1934
|
"../src/entity/category.ts": {
|
|
1930
|
-
"version": "
|
|
1931
|
-
"signature": "
|
|
1935
|
+
"version": "6c751f3828cd94ca0c58c9eb6233dfd53911c8b724dacc4914831ebbf7e813be",
|
|
1936
|
+
"signature": "d6ddb14959258ec40c16686f1507aefb5ab53fca69c6fba9f12f887cacd4a89b",
|
|
1932
1937
|
"affectsGlobalScope": false
|
|
1933
1938
|
},
|
|
1934
1939
|
"../src/entity/courier.ts": {
|
|
@@ -2451,9 +2456,19 @@
|
|
|
2451
2456
|
"signature": "2be82cb7b1d51d45793ac845f76e09caf9d61beaf6341095b5dd10a4480c73e2",
|
|
2452
2457
|
"affectsGlobalScope": false
|
|
2453
2458
|
},
|
|
2459
|
+
"../src/entity/attribute.ts": {
|
|
2460
|
+
"version": "a9121f448ea5883738db27a9aab8c6a001b11e1a6c06d8bc9261349df04e64f7",
|
|
2461
|
+
"signature": "eb72ead21fda7d0b46b85ec8090ec67349827f28d5e395496ae5e32937269ff9",
|
|
2462
|
+
"affectsGlobalScope": false
|
|
2463
|
+
},
|
|
2464
|
+
"../src/entity/productattribute.ts": {
|
|
2465
|
+
"version": "2387efcbc67e98783730e013f56448c114f6420014bd7d35a407a9304248b065",
|
|
2466
|
+
"signature": "ad4af02efb2513ca7f4195e57e966e7cdd7c36d89081c66eb3c7e429bbd3c027",
|
|
2467
|
+
"affectsGlobalScope": false
|
|
2468
|
+
},
|
|
2454
2469
|
"../src/entity/product.entity.ts": {
|
|
2455
|
-
"version": "
|
|
2456
|
-
"signature": "
|
|
2470
|
+
"version": "6cc247b47067da0a3020f8bc3c739841e185248db06e363cab7aea3a42545b2c",
|
|
2471
|
+
"signature": "a9727ab4468763426f159d56e046a2c6946eae96de4e53d98aeab749a5152f76",
|
|
2457
2472
|
"affectsGlobalScope": false
|
|
2458
2473
|
},
|
|
2459
2474
|
"../src/entity/collectionitem.ts": {
|
|
@@ -2607,8 +2622,8 @@
|
|
|
2607
2622
|
"affectsGlobalScope": false
|
|
2608
2623
|
},
|
|
2609
2624
|
"../src/entity/index.ts": {
|
|
2610
|
-
"version": "
|
|
2611
|
-
"signature": "
|
|
2625
|
+
"version": "144582c2fc899b1b172056c49b698fa1d904a0c0c241bca68ded469236ead98f",
|
|
2626
|
+
"signature": "c41c2724dee5f5006abbec545a39e37670f3a02b7c049271016b91e2c181f5cb",
|
|
2612
2627
|
"affectsGlobalScope": false
|
|
2613
2628
|
},
|
|
2614
2629
|
"../src/staticdata/productorigin.ts": {
|
|
@@ -2677,8 +2692,8 @@
|
|
|
2677
2692
|
"affectsGlobalScope": false
|
|
2678
2693
|
},
|
|
2679
2694
|
"../src/repositories/index.ts": {
|
|
2680
|
-
"version": "
|
|
2681
|
-
"signature": "
|
|
2695
|
+
"version": "41ae69bf0100fe747918ed8545f4f23e4732c4c3b6dcd82fc50d15c298ccfff9",
|
|
2696
|
+
"signature": "0f96ae2ba8cc8b0cdc018c24d6fb8798235c281c12e33413d116dadda1e0004f",
|
|
2682
2697
|
"affectsGlobalScope": false
|
|
2683
2698
|
},
|
|
2684
2699
|
"../src/subscribers/productsubscriber.ts": {
|
|
@@ -2798,7 +2813,7 @@
|
|
|
2798
2813
|
},
|
|
2799
2814
|
"../src/helpers/products/storage/search.ts": {
|
|
2800
2815
|
"version": "56182ffa45a3411aaf6498d7b99d2711f01f529a523ec0839f286d1967252fa7",
|
|
2801
|
-
"signature": "
|
|
2816
|
+
"signature": "5fa34362b2f18f0df3727649a39c4c1f75d575a7c08c6135d33d3571efd7ceb1",
|
|
2802
2817
|
"affectsGlobalScope": false
|
|
2803
2818
|
},
|
|
2804
2819
|
"../src/helpers/products/storage/index.ts": {
|
|
@@ -2981,6 +2996,11 @@
|
|
|
2981
2996
|
"signature": "0e5a2728f9688b495318366870eb0f07503b29fab2d3ceb79915e144778ae2ac",
|
|
2982
2997
|
"affectsGlobalScope": false
|
|
2983
2998
|
},
|
|
2999
|
+
"../src/migrations/1677706695399-promote_to_production_2023_01_03.ts": {
|
|
3000
|
+
"version": "a71be0c98f088d4bb023f1a0d066bdf806a1cfacb07f3969e14d403c68fbc9d7",
|
|
3001
|
+
"signature": "5c4edd69708ca8a11f2aa55bcf1acfb520678afefba346a893b7697974dbdb8b",
|
|
3002
|
+
"affectsGlobalScope": false
|
|
3003
|
+
},
|
|
2984
3004
|
"../src/migrations/execute/index.ts": {
|
|
2985
3005
|
"version": "8b5bf13d095aeb57afd593adf3d799681176a13c327e2f77e0028e178c4ee3b9",
|
|
2986
3006
|
"signature": "8e609bb71c20b858c77f0e9f90bb1319db8477b13f9f965f1a1e18524bf50881",
|
|
@@ -4917,6 +4937,11 @@
|
|
|
4917
4937
|
"../src/entity/auditedmodel.ts",
|
|
4918
4938
|
"../src/entity/user.ts"
|
|
4919
4939
|
],
|
|
4940
|
+
"../src/entity/attribute.ts": [
|
|
4941
|
+
"../node_modules/typeorm/index.d.ts",
|
|
4942
|
+
"../src/entity/auditedmodel.ts",
|
|
4943
|
+
"../src/entity/productattribute.ts"
|
|
4944
|
+
],
|
|
4920
4945
|
"../src/entity/auditedmodel.ts": [
|
|
4921
4946
|
"../node_modules/typeorm/index.d.ts"
|
|
4922
4947
|
],
|
|
@@ -4941,8 +4966,15 @@
|
|
|
4941
4966
|
],
|
|
4942
4967
|
"../src/entity/category.ts": [
|
|
4943
4968
|
"../node_modules/typeorm/index.d.ts",
|
|
4969
|
+
"../src/entity/auditedmodel.ts",
|
|
4970
|
+
"../src/entity/categoryimages.ts",
|
|
4944
4971
|
"../src/entity/subcategory.ts"
|
|
4945
4972
|
],
|
|
4973
|
+
"../src/entity/categoryimages.ts": [
|
|
4974
|
+
"../node_modules/typeorm/index.d.ts",
|
|
4975
|
+
"../src/entity/auditedmodel.ts",
|
|
4976
|
+
"../src/entity/category.ts"
|
|
4977
|
+
],
|
|
4946
4978
|
"../src/entity/channel.ts": [
|
|
4947
4979
|
"../node_modules/typeorm/index.d.ts",
|
|
4948
4980
|
"../src/entity/auditedmodel.ts",
|
|
@@ -5070,12 +5102,14 @@
|
|
|
5070
5102
|
"../src/entity/index.ts": [
|
|
5071
5103
|
"../src/entity/address.ts",
|
|
5072
5104
|
"../src/entity/apicredential.ts",
|
|
5105
|
+
"../src/entity/attribute.ts",
|
|
5073
5106
|
"../src/entity/auditedmodel.ts",
|
|
5074
5107
|
"../src/entity/bankaccount.ts",
|
|
5075
5108
|
"../src/entity/business.ts",
|
|
5076
5109
|
"../src/entity/businessproducts.ts",
|
|
5077
5110
|
"../src/entity/cardregistration.ts",
|
|
5078
5111
|
"../src/entity/category.ts",
|
|
5112
|
+
"../src/entity/categoryimages.ts",
|
|
5079
5113
|
"../src/entity/channel.ts",
|
|
5080
5114
|
"../src/entity/channelgroup.ts",
|
|
5081
5115
|
"../src/entity/channeluser.ts",
|
|
@@ -5122,6 +5156,7 @@
|
|
|
5122
5156
|
"../src/entity/permission.ts",
|
|
5123
5157
|
"../src/entity/price.entity.ts",
|
|
5124
5158
|
"../src/entity/product.entity.ts",
|
|
5159
|
+
"../src/entity/productattribute.ts",
|
|
5125
5160
|
"../src/entity/request.ts",
|
|
5126
5161
|
"../src/entity/return.ts",
|
|
5127
5162
|
"../src/entity/returnaddress.ts",
|
|
@@ -5272,11 +5307,18 @@
|
|
|
5272
5307
|
"../src/entity/modules/shipping/productshipping.ts",
|
|
5273
5308
|
"../src/entity/option.ts",
|
|
5274
5309
|
"../src/entity/price.entity.ts",
|
|
5310
|
+
"../src/entity/productattribute.ts",
|
|
5275
5311
|
"../src/entity/subcategory.ts",
|
|
5276
5312
|
"../src/entity/user.ts",
|
|
5277
5313
|
"../src/entity/variant.ts",
|
|
5278
5314
|
"../src/staticdata/currency.ts"
|
|
5279
5315
|
],
|
|
5316
|
+
"../src/entity/productattribute.ts": [
|
|
5317
|
+
"../node_modules/typeorm/index.d.ts",
|
|
5318
|
+
"../src/entity/attribute.ts",
|
|
5319
|
+
"../src/entity/auditedmodel.ts",
|
|
5320
|
+
"../src/entity/product.entity.ts"
|
|
5321
|
+
],
|
|
5280
5322
|
"../src/entity/request.ts": [
|
|
5281
5323
|
"../node_modules/typeorm/index.d.ts",
|
|
5282
5324
|
"../src/entity/auditedmodel.ts",
|
|
@@ -5538,6 +5580,9 @@
|
|
|
5538
5580
|
"../src/migrations/1676656657956-task-1084v1.ts": [
|
|
5539
5581
|
"../node_modules/typeorm/index.d.ts"
|
|
5540
5582
|
],
|
|
5583
|
+
"../src/migrations/1677706695399-promote_to_production_2023_01_03.ts": [
|
|
5584
|
+
"../node_modules/typeorm/index.d.ts"
|
|
5585
|
+
],
|
|
5541
5586
|
"../src/migrations/execute/index.ts": [
|
|
5542
5587
|
"../src/config/connect.ts"
|
|
5543
5588
|
],
|
|
@@ -5556,10 +5601,12 @@
|
|
|
5556
5601
|
"../src/repositories/index.ts": [
|
|
5557
5602
|
"../node_modules/typeorm/index.d.ts",
|
|
5558
5603
|
"../src/entity/apicredential.ts",
|
|
5604
|
+
"../src/entity/attribute.ts",
|
|
5559
5605
|
"../src/entity/bankaccount.ts",
|
|
5560
5606
|
"../src/entity/business.ts",
|
|
5561
5607
|
"../src/entity/cardregistration.ts",
|
|
5562
5608
|
"../src/entity/category.ts",
|
|
5609
|
+
"../src/entity/categoryimages.ts",
|
|
5563
5610
|
"../src/entity/channel.ts",
|
|
5564
5611
|
"../src/entity/channelgroup.ts",
|
|
5565
5612
|
"../src/entity/channeluser.ts",
|
|
@@ -5592,6 +5639,7 @@
|
|
|
5592
5639
|
"../src/entity/paymentshopify.ts",
|
|
5593
5640
|
"../src/entity/permission.ts",
|
|
5594
5641
|
"../src/entity/product.entity.ts",
|
|
5642
|
+
"../src/entity/productattribute.ts",
|
|
5595
5643
|
"../src/entity/request.ts",
|
|
5596
5644
|
"../src/entity/role.ts",
|
|
5597
5645
|
"../src/entity/rolepermission.ts",
|
|
@@ -7446,6 +7494,10 @@
|
|
|
7446
7494
|
"../src/entity/auditedmodel.ts",
|
|
7447
7495
|
"../src/entity/user.ts"
|
|
7448
7496
|
],
|
|
7497
|
+
"../src/entity/attribute.ts": [
|
|
7498
|
+
"../src/entity/auditedmodel.ts",
|
|
7499
|
+
"../src/entity/productattribute.ts"
|
|
7500
|
+
],
|
|
7449
7501
|
"../src/entity/bankaccount.ts": [
|
|
7450
7502
|
"../src/entity/auditedmodel.ts"
|
|
7451
7503
|
],
|
|
@@ -7460,8 +7512,14 @@
|
|
|
7460
7512
|
"../src/entity/auditedmodel.ts"
|
|
7461
7513
|
],
|
|
7462
7514
|
"../src/entity/category.ts": [
|
|
7515
|
+
"../src/entity/auditedmodel.ts",
|
|
7516
|
+
"../src/entity/categoryimages.ts",
|
|
7463
7517
|
"../src/entity/subcategory.ts"
|
|
7464
7518
|
],
|
|
7519
|
+
"../src/entity/categoryimages.ts": [
|
|
7520
|
+
"../src/entity/auditedmodel.ts",
|
|
7521
|
+
"../src/entity/category.ts"
|
|
7522
|
+
],
|
|
7465
7523
|
"../src/entity/channel.ts": [
|
|
7466
7524
|
"../src/entity/auditedmodel.ts",
|
|
7467
7525
|
"../src/entity/channeluser.ts",
|
|
@@ -7547,12 +7605,14 @@
|
|
|
7547
7605
|
"../src/entity/index.ts": [
|
|
7548
7606
|
"../src/entity/address.ts",
|
|
7549
7607
|
"../src/entity/apicredential.ts",
|
|
7608
|
+
"../src/entity/attribute.ts",
|
|
7550
7609
|
"../src/entity/auditedmodel.ts",
|
|
7551
7610
|
"../src/entity/bankaccount.ts",
|
|
7552
7611
|
"../src/entity/business.ts",
|
|
7553
7612
|
"../src/entity/businessproducts.ts",
|
|
7554
7613
|
"../src/entity/cardregistration.ts",
|
|
7555
7614
|
"../src/entity/category.ts",
|
|
7615
|
+
"../src/entity/categoryimages.ts",
|
|
7556
7616
|
"../src/entity/channel.ts",
|
|
7557
7617
|
"../src/entity/channelgroup.ts",
|
|
7558
7618
|
"../src/entity/channeluser.ts",
|
|
@@ -7599,6 +7659,7 @@
|
|
|
7599
7659
|
"../src/entity/permission.ts",
|
|
7600
7660
|
"../src/entity/price.entity.ts",
|
|
7601
7661
|
"../src/entity/product.entity.ts",
|
|
7662
|
+
"../src/entity/productattribute.ts",
|
|
7602
7663
|
"../src/entity/request.ts",
|
|
7603
7664
|
"../src/entity/return.ts",
|
|
7604
7665
|
"../src/entity/returnaddress.ts",
|
|
@@ -7716,10 +7777,16 @@
|
|
|
7716
7777
|
"../src/entity/modules/shipping/productshipping.ts",
|
|
7717
7778
|
"../src/entity/option.ts",
|
|
7718
7779
|
"../src/entity/price.entity.ts",
|
|
7780
|
+
"../src/entity/productattribute.ts",
|
|
7719
7781
|
"../src/entity/subcategory.ts",
|
|
7720
7782
|
"../src/entity/user.ts",
|
|
7721
7783
|
"../src/entity/variant.ts"
|
|
7722
7784
|
],
|
|
7785
|
+
"../src/entity/productattribute.ts": [
|
|
7786
|
+
"../src/entity/attribute.ts",
|
|
7787
|
+
"../src/entity/auditedmodel.ts",
|
|
7788
|
+
"../src/entity/product.entity.ts"
|
|
7789
|
+
],
|
|
7723
7790
|
"../src/entity/request.ts": [
|
|
7724
7791
|
"../src/entity/auditedmodel.ts",
|
|
7725
7792
|
"../src/entity/user.ts"
|
|
@@ -7943,6 +8010,9 @@
|
|
|
7943
8010
|
"../src/migrations/1676656657956-task-1084v1.ts": [
|
|
7944
8011
|
"../node_modules/typeorm/index.d.ts"
|
|
7945
8012
|
],
|
|
8013
|
+
"../src/migrations/1677706695399-promote_to_production_2023_01_03.ts": [
|
|
8014
|
+
"../node_modules/typeorm/index.d.ts"
|
|
8015
|
+
],
|
|
7946
8016
|
"../src/migrations/index.ts": [
|
|
7947
8017
|
"../src/migrations/1628474597284-initialschema.ts",
|
|
7948
8018
|
"../src/migrations/1630077596132-removemangopay.ts",
|
|
@@ -7958,10 +8028,12 @@
|
|
|
7958
8028
|
"../src/repositories/index.ts": [
|
|
7959
8029
|
"../node_modules/typeorm/index.d.ts",
|
|
7960
8030
|
"../src/entity/apicredential.ts",
|
|
8031
|
+
"../src/entity/attribute.ts",
|
|
7961
8032
|
"../src/entity/bankaccount.ts",
|
|
7962
8033
|
"../src/entity/business.ts",
|
|
7963
8034
|
"../src/entity/cardregistration.ts",
|
|
7964
8035
|
"../src/entity/category.ts",
|
|
8036
|
+
"../src/entity/categoryimages.ts",
|
|
7965
8037
|
"../src/entity/channel.ts",
|
|
7966
8038
|
"../src/entity/channelgroup.ts",
|
|
7967
8039
|
"../src/entity/channeluser.ts",
|
|
@@ -7994,6 +8066,7 @@
|
|
|
7994
8066
|
"../src/entity/paymentshopify.ts",
|
|
7995
8067
|
"../src/entity/permission.ts",
|
|
7996
8068
|
"../src/entity/product.entity.ts",
|
|
8069
|
+
"../src/entity/productattribute.ts",
|
|
7997
8070
|
"../src/entity/request.ts",
|
|
7998
8071
|
"../src/entity/role.ts",
|
|
7999
8072
|
"../src/entity/rolepermission.ts",
|
|
@@ -8537,12 +8610,14 @@
|
|
|
8537
8610
|
"../src/config/connect.ts",
|
|
8538
8611
|
"../src/entity/address.ts",
|
|
8539
8612
|
"../src/entity/apicredential.ts",
|
|
8613
|
+
"../src/entity/attribute.ts",
|
|
8540
8614
|
"../src/entity/auditedmodel.ts",
|
|
8541
8615
|
"../src/entity/bankaccount.ts",
|
|
8542
8616
|
"../src/entity/business.ts",
|
|
8543
8617
|
"../src/entity/businessproducts.ts",
|
|
8544
8618
|
"../src/entity/cardregistration.ts",
|
|
8545
8619
|
"../src/entity/category.ts",
|
|
8620
|
+
"../src/entity/categoryimages.ts",
|
|
8546
8621
|
"../src/entity/channel.ts",
|
|
8547
8622
|
"../src/entity/channelgroup.ts",
|
|
8548
8623
|
"../src/entity/channeluser.ts",
|
|
@@ -8590,6 +8665,7 @@
|
|
|
8590
8665
|
"../src/entity/permission.ts",
|
|
8591
8666
|
"../src/entity/price.entity.ts",
|
|
8592
8667
|
"../src/entity/product.entity.ts",
|
|
8668
|
+
"../src/entity/productattribute.ts",
|
|
8593
8669
|
"../src/entity/request.ts",
|
|
8594
8670
|
"../src/entity/return.ts",
|
|
8595
8671
|
"../src/entity/returnaddress.ts",
|
|
@@ -8657,6 +8733,7 @@
|
|
|
8657
8733
|
"../src/migrations/1676389900564-task-1062v4.ts",
|
|
8658
8734
|
"../src/migrations/1676558804200-task-1074v1.ts",
|
|
8659
8735
|
"../src/migrations/1676656657956-task-1084v1.ts",
|
|
8736
|
+
"../src/migrations/1677706695399-promote_to_production_2023_01_03.ts",
|
|
8660
8737
|
"../src/migrations/execute/index.ts",
|
|
8661
8738
|
"../src/migrations/index.ts",
|
|
8662
8739
|
"../src/repositories/index.ts",
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@reachu/database",
|
|
3
|
-
"version": "1.0.
|
|
3
|
+
"version": "1.0.2",
|
|
4
4
|
"description": "reachu-database",
|
|
5
5
|
"main": "dist/index.js",
|
|
6
6
|
"types": "dist/index.d.ts",
|
|
@@ -21,8 +21,8 @@
|
|
|
21
21
|
"author": "reachu",
|
|
22
22
|
"license": "ISC",
|
|
23
23
|
"dependencies": {
|
|
24
|
-
"@reachu/logger": "1.0.
|
|
25
|
-
"@reachu/utils": "1.0.
|
|
24
|
+
"@reachu/logger": "1.0.2",
|
|
25
|
+
"@reachu/utils": "1.0.2",
|
|
26
26
|
"dotenv": "8.0.0",
|
|
27
27
|
"express": "4.17.1",
|
|
28
28
|
"mysql2": "1.5.2",
|
|
@@ -0,0 +1,30 @@
|
|
|
1
|
+
import {
|
|
2
|
+
Entity,
|
|
3
|
+
PrimaryGeneratedColumn,
|
|
4
|
+
Column,
|
|
5
|
+
DeleteDateColumn,
|
|
6
|
+
OneToMany,
|
|
7
|
+
JoinColumn,
|
|
8
|
+
} from 'typeorm';
|
|
9
|
+
import AuditedModel from './AuditedModel';
|
|
10
|
+
import ProductAttribute from './ProductAttribute';
|
|
11
|
+
|
|
12
|
+
@Entity()
|
|
13
|
+
export default class Attribute extends AuditedModel {
|
|
14
|
+
@PrimaryGeneratedColumn()
|
|
15
|
+
id: number;
|
|
16
|
+
|
|
17
|
+
@DeleteDateColumn()
|
|
18
|
+
deletedAt: Date;
|
|
19
|
+
|
|
20
|
+
@Column('varchar', { nullable: false })
|
|
21
|
+
name: string;
|
|
22
|
+
|
|
23
|
+
@OneToMany(
|
|
24
|
+
() => ProductAttribute,
|
|
25
|
+
(productAttribute: ProductAttribute) => productAttribute.attribute,
|
|
26
|
+
{ cascade: true },
|
|
27
|
+
)
|
|
28
|
+
@JoinColumn()
|
|
29
|
+
productAttribute: ProductAttribute[];
|
|
30
|
+
}
|
package/src/entity/Category.ts
CHANGED
|
@@ -1,8 +1,18 @@
|
|
|
1
|
-
import {
|
|
1
|
+
import {
|
|
2
|
+
Entity,
|
|
3
|
+
PrimaryGeneratedColumn,
|
|
4
|
+
Column,
|
|
5
|
+
OneToMany,
|
|
6
|
+
DeleteDateColumn,
|
|
7
|
+
ManyToOne,
|
|
8
|
+
JoinColumn,
|
|
9
|
+
} from 'typeorm';
|
|
10
|
+
import AuditedModel from './AuditedModel';
|
|
11
|
+
import CategoryImages from './CategoryImages';
|
|
2
12
|
import Subcategory from './Subcategory';
|
|
3
13
|
|
|
4
14
|
@Entity()
|
|
5
|
-
export default class Category {
|
|
15
|
+
export default class Category extends AuditedModel {
|
|
6
16
|
@PrimaryGeneratedColumn()
|
|
7
17
|
id: number;
|
|
8
18
|
|
|
@@ -12,5 +22,21 @@ export default class Category {
|
|
|
12
22
|
@OneToMany(() => Subcategory, (subcategory) => subcategory.category)
|
|
13
23
|
subcategories: Subcategory[];
|
|
14
24
|
|
|
25
|
+
@DeleteDateColumn()
|
|
26
|
+
deletedAt: Date;
|
|
27
|
+
|
|
28
|
+
@Column('varchar', { nullable: true })
|
|
29
|
+
slug: string;
|
|
30
|
+
|
|
31
|
+
@Column('integer', { nullable: true })
|
|
32
|
+
menuOrder: number;
|
|
33
|
+
|
|
34
|
+
@ManyToOne(() => CategoryImages, (categoryImages: CategoryImages) => categoryImages.category, {
|
|
35
|
+
eager: true,
|
|
36
|
+
onDelete: 'CASCADE',
|
|
37
|
+
})
|
|
38
|
+
@JoinColumn()
|
|
39
|
+
categoryImages: CategoryImages;
|
|
40
|
+
|
|
15
41
|
static getCacheKey = () => 'CATEGORIES';
|
|
16
42
|
}
|
|
@@ -0,0 +1,38 @@
|
|
|
1
|
+
import {
|
|
2
|
+
Entity,
|
|
3
|
+
PrimaryGeneratedColumn,
|
|
4
|
+
Column,
|
|
5
|
+
OneToMany,
|
|
6
|
+
DeleteDateColumn,
|
|
7
|
+
JoinColumn,
|
|
8
|
+
} from 'typeorm';
|
|
9
|
+
import AuditedModel from './AuditedModel';
|
|
10
|
+
import Category from './Category';
|
|
11
|
+
|
|
12
|
+
@Entity()
|
|
13
|
+
export default class CategoryImages extends AuditedModel {
|
|
14
|
+
@PrimaryGeneratedColumn()
|
|
15
|
+
id: number;
|
|
16
|
+
|
|
17
|
+
@DeleteDateColumn()
|
|
18
|
+
deletedAt: Date;
|
|
19
|
+
|
|
20
|
+
@Column('varchar', { nullable: true })
|
|
21
|
+
srcn: string;
|
|
22
|
+
|
|
23
|
+
@Column('varchar', { nullable: true })
|
|
24
|
+
slug: string;
|
|
25
|
+
|
|
26
|
+
@Column('varchar', { nullable: true })
|
|
27
|
+
name: string;
|
|
28
|
+
|
|
29
|
+
@Column('varchar', { nullable: true })
|
|
30
|
+
src: string;
|
|
31
|
+
|
|
32
|
+
@Column('varchar', { nullable: true })
|
|
33
|
+
alt: string;
|
|
34
|
+
|
|
35
|
+
@OneToMany(() => Category, (category: Category) => category.categoryImages, { cascade: true })
|
|
36
|
+
@JoinColumn()
|
|
37
|
+
category: Category[];
|
|
38
|
+
}
|
|
@@ -26,6 +26,7 @@ import { currencies } from '../staticData/Currency';
|
|
|
26
26
|
import { Price } from './Price.entity';
|
|
27
27
|
import ProductShipping from './modules/shipping/ProductShipping';
|
|
28
28
|
import { CustomProduct } from './CustomProduct';
|
|
29
|
+
import ProductAttribute from './ProductAttribute';
|
|
29
30
|
|
|
30
31
|
@Entity()
|
|
31
32
|
export class Product extends AuditedModel {
|
|
@@ -169,6 +170,14 @@ export class Product extends AuditedModel {
|
|
|
169
170
|
@JoinColumn()
|
|
170
171
|
customProduct: CustomProduct;
|
|
171
172
|
|
|
173
|
+
@OneToMany(
|
|
174
|
+
() => ProductAttribute,
|
|
175
|
+
(productAttribute: ProductAttribute) => productAttribute.product,
|
|
176
|
+
{ cascade: true },
|
|
177
|
+
)
|
|
178
|
+
@JoinColumn()
|
|
179
|
+
productAttribute: ProductAttribute[];
|
|
180
|
+
|
|
172
181
|
@AfterLoad()
|
|
173
182
|
convertNumerics() {
|
|
174
183
|
const diff = (this.referralFee * this.publicPrice) / 100;
|
|
@@ -0,0 +1,27 @@
|
|
|
1
|
+
import { Entity, PrimaryGeneratedColumn, DeleteDateColumn, ManyToOne, JoinColumn } from 'typeorm';
|
|
2
|
+
import Attribute from './Attribute';
|
|
3
|
+
import AuditedModel from './AuditedModel';
|
|
4
|
+
import { Product } from './Product.entity';
|
|
5
|
+
|
|
6
|
+
@Entity()
|
|
7
|
+
export default class ProductAttribute extends AuditedModel {
|
|
8
|
+
@PrimaryGeneratedColumn()
|
|
9
|
+
id: number;
|
|
10
|
+
|
|
11
|
+
@DeleteDateColumn()
|
|
12
|
+
deletedAt: Date;
|
|
13
|
+
|
|
14
|
+
@ManyToOne(() => Attribute, (attribute: Attribute) => attribute.productAttribute, {
|
|
15
|
+
eager: true,
|
|
16
|
+
onDelete: 'CASCADE',
|
|
17
|
+
})
|
|
18
|
+
@JoinColumn()
|
|
19
|
+
attribute: Attribute;
|
|
20
|
+
|
|
21
|
+
@ManyToOne(() => Product, (product: Product) => product.productAttribute, {
|
|
22
|
+
eager: true,
|
|
23
|
+
onDelete: 'CASCADE',
|
|
24
|
+
})
|
|
25
|
+
@JoinColumn()
|
|
26
|
+
product: Product;
|
|
27
|
+
}
|
package/src/entity/index.ts
CHANGED
|
@@ -74,6 +74,10 @@ import CustomVariant from './CustomVariant';
|
|
|
74
74
|
import { CustomProduct } from './CustomProduct';
|
|
75
75
|
import CustomProductImage from './CustomProductImage';
|
|
76
76
|
|
|
77
|
+
import Attribute from './Attribute';
|
|
78
|
+
import ProductAttribute from './ProductAttribute';
|
|
79
|
+
import CategoryImages from './CategoryImages';
|
|
80
|
+
|
|
77
81
|
export {
|
|
78
82
|
CustomVariant,
|
|
79
83
|
CustomProduct,
|
|
@@ -145,4 +149,7 @@ export {
|
|
|
145
149
|
UserChannelApiKey,
|
|
146
150
|
Currency,
|
|
147
151
|
ExchangeRate,
|
|
152
|
+
Attribute,
|
|
153
|
+
ProductAttribute,
|
|
154
|
+
CategoryImages,
|
|
148
155
|
};
|
|
@@ -0,0 +1,34 @@
|
|
|
1
|
+
import {MigrationInterface, QueryRunner} from "typeorm";
|
|
2
|
+
|
|
3
|
+
export class promoteToProduction202301031677706695399 implements MigrationInterface {
|
|
4
|
+
name = 'promoteToProduction202301031677706695399'
|
|
5
|
+
|
|
6
|
+
public async up(queryRunner: QueryRunner): Promise<void> {
|
|
7
|
+
await queryRunner.query(`CREATE TABLE \`custom_product_image\` (\`id\` int NOT NULL AUTO_INCREMENT, \`deleted_at\` datetime(6) NULL, \`url\` varchar(255) NOT NULL, \`width\` int NULL, \`height\` int NULL, \`order\` int NOT NULL, \`product_id\` int NULL, PRIMARY KEY (\`id\`)) ENGINE=InnoDB`);
|
|
8
|
+
await queryRunner.query(`CREATE TABLE \`custom_product\` (\`created_at\` datetime(6) NOT NULL DEFAULT CURRENT_TIMESTAMP(6), \`updated_at\` datetime(6) NOT NULL DEFAULT CURRENT_TIMESTAMP(6) ON UPDATE CURRENT_TIMESTAMP(6), \`id\` int NOT NULL AUTO_INCREMENT, \`deleted_at\` datetime(6) NULL, \`title\` varchar(255) NULL, \`description\` text NULL, \`description_two\` text NULL, \`public_price\` decimal(10,2) NULL, \`sku\` varchar(255) NULL, \`barcode\` varchar(255) NULL, \`visible\` tinyint NOT NULL DEFAULT 0, \`product_id\` int NULL, \`user_id\` int NULL, \`price_amount\` decimal(10,2) NULL, \`price_currency_code\` varchar(255) NULL, \`price_base_amount\` decimal(10,2) NULL, PRIMARY KEY (\`id\`)) ENGINE=InnoDB`);
|
|
9
|
+
await queryRunner.query(`CREATE TABLE \`custom_variant\` (\`created_at\` datetime(6) NOT NULL DEFAULT CURRENT_TIMESTAMP(6), \`updated_at\` datetime(6) NOT NULL DEFAULT CURRENT_TIMESTAMP(6) ON UPDATE CURRENT_TIMESTAMP(6), \`id\` int NOT NULL AUTO_INCREMENT, \`deleted_at\` datetime(6) NULL, \`title\` varchar(255) NOT NULL, \`sku\` varchar(255) NOT NULL, \`barcode\` varchar(255) NULL, \`quantity\` int NOT NULL, \`custom_product_id\` int NULL, \`variant_id\` int NULL, PRIMARY KEY (\`id\`)) ENGINE=InnoDB`);
|
|
10
|
+
await queryRunner.query(`ALTER TABLE \`user_settings\` ADD \`custom_products\` tinyint NOT NULL DEFAULT 0`);
|
|
11
|
+
await queryRunner.query(`ALTER TABLE \`shipping\` ADD \`default\` tinyint NOT NULL DEFAULT 0`);
|
|
12
|
+
await queryRunner.query(`ALTER TABLE \`product\` ADD \`active\` tinyint NOT NULL DEFAULT 0`);
|
|
13
|
+
await queryRunner.query(`ALTER TABLE \`custom_product_image\` ADD CONSTRAINT \`FK_02a813811810b4faf6bac7361a4\` FOREIGN KEY (\`product_id\`) REFERENCES \`custom_product\`(\`id\`) ON DELETE CASCADE ON UPDATE NO ACTION`);
|
|
14
|
+
await queryRunner.query(`ALTER TABLE \`custom_product\` ADD CONSTRAINT \`FK_7a615131bff0eb11f4709f77bcf\` FOREIGN KEY (\`product_id\`) REFERENCES \`product\`(\`id\`) ON DELETE NO ACTION ON UPDATE NO ACTION`);
|
|
15
|
+
await queryRunner.query(`ALTER TABLE \`custom_product\` ADD CONSTRAINT \`FK_f89b6142de14e0db9655247b926\` FOREIGN KEY (\`user_id\`) REFERENCES \`user\`(\`id\`) ON DELETE NO ACTION ON UPDATE NO ACTION`);
|
|
16
|
+
await queryRunner.query(`ALTER TABLE \`custom_variant\` ADD CONSTRAINT \`FK_c30da998f87bb92036e815ebdf6\` FOREIGN KEY (\`custom_product_id\`) REFERENCES \`custom_product\`(\`id\`) ON DELETE CASCADE ON UPDATE NO ACTION`);
|
|
17
|
+
await queryRunner.query(`ALTER TABLE \`custom_variant\` ADD CONSTRAINT \`FK_2266fdf123653773d75afd951da\` FOREIGN KEY (\`variant_id\`) REFERENCES \`variant\`(\`id\`) ON DELETE CASCADE ON UPDATE NO ACTION`);
|
|
18
|
+
}
|
|
19
|
+
|
|
20
|
+
public async down(queryRunner: QueryRunner): Promise<void> {
|
|
21
|
+
await queryRunner.query(`ALTER TABLE \`custom_variant\` DROP FOREIGN KEY \`FK_2266fdf123653773d75afd951da\``);
|
|
22
|
+
await queryRunner.query(`ALTER TABLE \`custom_variant\` DROP FOREIGN KEY \`FK_c30da998f87bb92036e815ebdf6\``);
|
|
23
|
+
await queryRunner.query(`ALTER TABLE \`custom_product\` DROP FOREIGN KEY \`FK_f89b6142de14e0db9655247b926\``);
|
|
24
|
+
await queryRunner.query(`ALTER TABLE \`custom_product\` DROP FOREIGN KEY \`FK_7a615131bff0eb11f4709f77bcf\``);
|
|
25
|
+
await queryRunner.query(`ALTER TABLE \`custom_product_image\` DROP FOREIGN KEY \`FK_02a813811810b4faf6bac7361a4\``);
|
|
26
|
+
await queryRunner.query(`ALTER TABLE \`product\` DROP COLUMN \`active\``);
|
|
27
|
+
await queryRunner.query(`ALTER TABLE \`shipping\` DROP COLUMN \`default\``);
|
|
28
|
+
await queryRunner.query(`ALTER TABLE \`user_settings\` DROP COLUMN \`custom_products\``);
|
|
29
|
+
await queryRunner.query(`DROP TABLE \`custom_variant\``);
|
|
30
|
+
await queryRunner.query(`DROP TABLE \`custom_product\``);
|
|
31
|
+
await queryRunner.query(`DROP TABLE \`custom_product_image\``);
|
|
32
|
+
}
|
|
33
|
+
|
|
34
|
+
}
|
|
@@ -51,6 +51,10 @@ import CustomVariant from '../entity/CustomVariant';
|
|
|
51
51
|
import { CustomProduct } from '../entity/CustomProduct';
|
|
52
52
|
import CustomProductImage from '../entity/CustomProductImage';
|
|
53
53
|
|
|
54
|
+
import Attribute from '../entity/Attribute';
|
|
55
|
+
import ProductAttribute from '../entity/ProductAttribute';
|
|
56
|
+
import CategoryImages from '../entity/CategoryImages';
|
|
57
|
+
|
|
54
58
|
import {
|
|
55
59
|
CartItemRepository,
|
|
56
60
|
CartRepository,
|
|
@@ -68,6 +72,15 @@ import {
|
|
|
68
72
|
|
|
69
73
|
import { Repository, EntityRepository } from 'typeorm';
|
|
70
74
|
|
|
75
|
+
@EntityRepository(CategoryImages)
|
|
76
|
+
export class CategoryImagesRepository extends Repository<CategoryImages> {}
|
|
77
|
+
|
|
78
|
+
@EntityRepository(ProductAttribute)
|
|
79
|
+
export class ProductAttributeRepository extends Repository<ProductAttribute> {}
|
|
80
|
+
|
|
81
|
+
@EntityRepository(Attribute)
|
|
82
|
+
export class AttributeRepository extends Repository<Attribute> {}
|
|
83
|
+
|
|
71
84
|
@EntityRepository(CustomVariant)
|
|
72
85
|
export class CustomVariantRepository extends Repository<CustomVariant> {}
|
|
73
86
|
|