@reachu/database 1.0.76 → 1.0.79
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/ShopifyConnection.js +4 -4
- package/dist/entity/ShopifyConnection.js.map +1 -1
- package/dist/entity/modules/shipping/ShippingCountry.d.ts +2 -0
- package/dist/entity/modules/shipping/ShippingCountry.js +5 -0
- package/dist/entity/modules/shipping/ShippingCountry.js.map +1 -1
- package/dist/entity/modules/shopcart/Cart.d.ts +1 -0
- package/dist/entity/modules/shopcart/Cart.js +4 -0
- package/dist/entity/modules/shopcart/Cart.js.map +1 -1
- package/dist/entity/modules/shopcart/CartItem.d.ts +2 -0
- package/dist/entity/modules/shopcart/CartItem.js +10 -0
- package/dist/entity/modules/shopcart/CartItem.js.map +1 -1
- package/dist/migrations/1685123080409-externalRequest_v3.d.ts +6 -0
- package/dist/migrations/1685123080409-externalRequest_v3.js +31 -0
- package/dist/migrations/1685123080409-externalRequest_v3.js.map +1 -0
- package/dist/migrations/1685127311585-externalRequest_v4.d.ts +6 -0
- package/dist/migrations/1685127311585-externalRequest_v4.js +33 -0
- package/dist/migrations/1685127311585-externalRequest_v4.js.map +1 -0
- package/dist/migrations/1686235086187-fix-multiple-shops.d.ts +6 -0
- package/dist/migrations/1686235086187-fix-multiple-shops.js +31 -0
- package/dist/migrations/1686235086187-fix-multiple-shops.js.map +1 -0
- package/dist/migrations/1686309865248-cart_shipping_country.d.ts +6 -0
- package/dist/migrations/1686309865248-cart_shipping_country.js +33 -0
- package/dist/migrations/1686309865248-cart_shipping_country.js.map +1 -0
- package/dist/migrations/1686837392110-cart_shipping_default.d.ts +6 -0
- package/dist/migrations/1686837392110-cart_shipping_default.js +29 -0
- package/dist/migrations/1686837392110-cart_shipping_default.js.map +1 -0
- package/dist/tsconfig.tsbuildinfo +76 -12
- package/package.json +3 -3
- package/src/entity/ShopifyConnection.ts +5 -4
- package/src/entity/modules/shipping/ShippingCountry.ts +5 -0
- package/src/entity/modules/shopcart/Cart.ts +3 -0
- package/src/entity/modules/shopcart/CartItem.ts +13 -0
- package/src/migrations/1685123080409-externalRequest_v3.ts +21 -0
- package/src/migrations/1685127311585-externalRequest_v4.ts +25 -0
- package/src/migrations/1686235086187-fix-multiple-shops.ts +16 -0
- package/src/migrations/1686309865248-cart_shipping_country.ts +18 -0
- package/src/migrations/1686837392110-cart_shipping_default.ts +14 -0
|
@@ -30,13 +30,13 @@ __decorate([
|
|
|
30
30
|
__metadata("design:type", Boolean)
|
|
31
31
|
], ShopifyConnection.prototype, "importedProducts", void 0);
|
|
32
32
|
__decorate([
|
|
33
|
-
typeorm_1.
|
|
34
|
-
typeorm_1.JoinColumn({}),
|
|
33
|
+
typeorm_1.ManyToOne(() => User_1.default, (user) => user.shopifyReseller, { onDelete: 'CASCADE', nullable: true }),
|
|
34
|
+
typeorm_1.JoinColumn({ name: 'reseller_id', referencedColumnName: 'id' }),
|
|
35
35
|
__metadata("design:type", User_1.default)
|
|
36
36
|
], ShopifyConnection.prototype, "reseller", void 0);
|
|
37
37
|
__decorate([
|
|
38
|
-
typeorm_1.
|
|
39
|
-
typeorm_1.JoinColumn(),
|
|
38
|
+
typeorm_1.ManyToOne(() => User_1.default, (user) => user.shopifySupplier, { onDelete: 'CASCADE', nullable: true }),
|
|
39
|
+
typeorm_1.JoinColumn({ name: 'supplier_id', referencedColumnName: 'id' }),
|
|
40
40
|
__metadata("design:type", User_1.default)
|
|
41
41
|
], ShopifyConnection.prototype, "supplier", void 0);
|
|
42
42
|
__decorate([
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"ShopifyConnection.js","sourceRoot":"","sources":["../../src/entity/ShopifyConnection.ts"],"names":[],"mappings":";;;;;;;;;;;;;;AAAA,
|
|
1
|
+
{"version":3,"file":"ShopifyConnection.js","sourceRoot":"","sources":["../../src/entity/ShopifyConnection.ts"],"names":[],"mappings":";;;;;;;;;;;;;;AAAA,qCASiB;AACjB,kDAA0B;AAC1B,kEAA0C;AAK1C,IAAqB,iBAAiB,GAAtC,MAAqB,iBAAkB,SAAQ,sBAAY;CAmC1D,CAAA;AAjCC;IADC,gCAAsB,EAAE;;6CACd;AAGX;IADC,0BAAgB,EAAE;8BACR,IAAI;oDAAC;AAGhB;IADC,gBAAM,CAAC,EAAE,IAAI,EAAE,SAAS,EAAE,OAAO,EAAE,KAAK,EAAE,CAAC;;2DAClB;AAI1B;IAFC,mBAAS,CAAC,GAAG,EAAE,CAAC,cAAI,EAAE,CAAC,IAAI,EAAE,EAAE,CAAC,IAAI,CAAC,eAAe,EAAE,EAAE,QAAQ,EAAE,SAAS,EAAE,QAAQ,EAAE,IAAI,EAAE,CAAC;IAC9F,oBAAU,CAAC,EAAE,IAAI,EAAE,aAAa,EAAE,oBAAoB,EAAE,IAAI,EAAE,CAAC;8BACtD,cAAI;mDAAC;AAIf;IAFC,mBAAS,CAAC,GAAG,EAAE,CAAC,cAAI,EAAE,CAAC,IAAI,EAAE,EAAE,CAAC,IAAI,CAAC,eAAe,EAAE,EAAE,QAAQ,EAAE,SAAS,EAAE,QAAQ,EAAE,IAAI,EAAE,CAAC;IAC9F,oBAAU,CAAC,EAAE,IAAI,EAAE,aAAa,EAAE,oBAAoB,EAAE,IAAI,EAAE,CAAC;8BACtD,cAAI;mDAAC;AAGf;IADC,gBAAM,CAAC,SAAS,EAAE,EAAE,QAAQ,EAAE,IAAI,EAAE,CAAC;;sDAClB;AAGpB;IADC,gBAAM,CAAC,SAAS,EAAE,EAAE,QAAQ,EAAE,IAAI,EAAE,CAAC;;8CAC1B;AAGZ;IADC,gBAAM,CAAC,SAAS,EAAE,EAAE,QAAQ,EAAE,IAAI,EAAE,CAAC;;mDACpB;AAGlB;IADC,gBAAM,CAAC,SAAS,EAAE,EAAE,QAAQ,EAAE,IAAI,EAAE,CAAC;;oDACnB;AAGnB;IADC,gBAAM,CAAC,SAAS,EAAE,EAAE,QAAQ,EAAE,IAAI,EAAE,CAAC;;wDACf;AAGvB;IADC,gBAAM,CAAC,SAAS,EAAE,EAAE,QAAQ,EAAE,IAAI,EAAE,CAAC;;qDAClB;AAlCD,iBAAiB;IAHrC,gBAAM,EAAE;IACR,gBAAM,CAAC,CAAC,UAAU,EAAE,WAAW,CAAC,CAAC;IACjC,gBAAM,CAAC,CAAC,UAAU,EAAE,WAAW,CAAC,CAAC;GACb,iBAAiB,CAmCrC;kBAnCoB,iBAAiB"}
|
|
@@ -1,5 +1,6 @@
|
|
|
1
1
|
import AuditedModel from '../../AuditedModel';
|
|
2
2
|
import Shipping from './Shipping';
|
|
3
|
+
import CartItem from '../shopcart/CartItem';
|
|
3
4
|
export default class ShippingCountry extends AuditedModel {
|
|
4
5
|
id: string;
|
|
5
6
|
amount?: number;
|
|
@@ -7,4 +8,5 @@ export default class ShippingCountry extends AuditedModel {
|
|
|
7
8
|
deletedAt: Date;
|
|
8
9
|
currencyCode?: string;
|
|
9
10
|
shipping: Shipping;
|
|
11
|
+
cartItem: CartItem[];
|
|
10
12
|
}
|
|
@@ -15,6 +15,7 @@ Object.defineProperty(exports, "__esModule", { value: true });
|
|
|
15
15
|
const typeorm_1 = require("typeorm");
|
|
16
16
|
const AuditedModel_1 = __importDefault(require("../../AuditedModel"));
|
|
17
17
|
const Shipping_1 = __importDefault(require("./Shipping"));
|
|
18
|
+
const CartItem_1 = __importDefault(require("../shopcart/CartItem"));
|
|
18
19
|
let ShippingCountry = class ShippingCountry extends AuditedModel_1.default {
|
|
19
20
|
};
|
|
20
21
|
__decorate([
|
|
@@ -45,6 +46,10 @@ __decorate([
|
|
|
45
46
|
typeorm_1.JoinColumn(),
|
|
46
47
|
__metadata("design:type", Shipping_1.default)
|
|
47
48
|
], ShippingCountry.prototype, "shipping", void 0);
|
|
49
|
+
__decorate([
|
|
50
|
+
typeorm_1.OneToMany(() => CartItem_1.default, (cartItem) => cartItem.shipping, { cascade: true }),
|
|
51
|
+
__metadata("design:type", Array)
|
|
52
|
+
], ShippingCountry.prototype, "cartItem", void 0);
|
|
48
53
|
ShippingCountry = __decorate([
|
|
49
54
|
typeorm_1.Entity()
|
|
50
55
|
], ShippingCountry);
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"ShippingCountry.js","sourceRoot":"","sources":["../../../../src/entity/modules/shipping/ShippingCountry.ts"],"names":[],"mappings":";;;;;;;;;;;;;;AAAA,
|
|
1
|
+
{"version":3,"file":"ShippingCountry.js","sourceRoot":"","sources":["../../../../src/entity/modules/shipping/ShippingCountry.ts"],"names":[],"mappings":";;;;;;;;;;;;;;AAAA,qCAQiB;AACjB,sEAA8C;AAC9C,0DAAkC;AAClC,oEAA4C;AAG5C,IAAqB,eAAe,GAApC,MAAqB,eAAgB,SAAQ,sBAAY;CAyBxD,CAAA;AAvBC;IADC,gCAAsB,CAAC,MAAM,CAAC;;2CACpB;AAGX;IADC,gBAAM,CAAC,SAAS,EAAE,EAAE,SAAS,EAAE,EAAE,EAAE,KAAK,EAAE,CAAC,EAAE,OAAO,EAAE,CAAC,EAAE,CAAC;;+CAC3C;AAGhB;IADC,gBAAM,CAAC,SAAS,EAAE,EAAE,QAAQ,EAAE,IAAI,EAAE,CAAC;;gDACrB;AAGjB;IADC,0BAAgB,EAAE;8BACR,IAAI;kDAAC;AAGhB;IADC,gBAAM,CAAC,SAAS,EAAE,EAAE,QAAQ,EAAE,IAAI,EAAE,CAAC;;qDAChB;AAOtB;IALC,mBAAS,CAAC,GAAG,EAAE,CAAC,kBAAQ,EAAE,CAAC,QAAkB,EAAE,EAAE,CAAC,QAAQ,CAAC,eAAe,EAAE;QAC3E,KAAK,EAAE,IAAI;QACX,QAAQ,EAAE,SAAS;KACpB,CAAC;IACD,oBAAU,EAAE;8BACH,kBAAQ;iDAAC;AAGnB;IADC,mBAAS,CAAC,GAAG,EAAE,CAAC,kBAAQ,EAAE,CAAC,QAAkB,EAAE,EAAE,CAAC,QAAQ,CAAC,QAAQ,EAAE,EAAE,OAAO,EAAE,IAAI,EAAE,CAAC;;iDACnE;AAxBF,eAAe;IADnC,gBAAM,EAAE;GACY,eAAe,CAyBnC;kBAzBoB,eAAe"}
|
|
@@ -39,6 +39,10 @@ __decorate([
|
|
|
39
39
|
typeorm_1.DeleteDateColumn(),
|
|
40
40
|
__metadata("design:type", Date)
|
|
41
41
|
], Cart.prototype, "deletedAt", void 0);
|
|
42
|
+
__decorate([
|
|
43
|
+
typeorm_1.Column('varchar', { nullable: true }),
|
|
44
|
+
__metadata("design:type", String)
|
|
45
|
+
], Cart.prototype, "shippingCountry", void 0);
|
|
42
46
|
__decorate([
|
|
43
47
|
typeorm_1.ManyToOne(() => User_1.default, (user) => user.id, { eager: true, onDelete: 'CASCADE' }),
|
|
44
48
|
typeorm_1.JoinColumn(),
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"Cart.js","sourceRoot":"","sources":["../../../../src/entity/modules/shopcart/Cart.ts"],"names":[],"mappings":";;;;;;;;;;;;;;AAAA,qCASiB;AACjB,sEAA8C;AAC9C,0DAAkC;AAClC,0DAAkC;AAClC,sDAA8B;AAG9B,IAAqB,IAAI,GAAzB,MAAqB,IAAK,SAAQ,sBAAY;
|
|
1
|
+
{"version":3,"file":"Cart.js","sourceRoot":"","sources":["../../../../src/entity/modules/shopcart/Cart.ts"],"names":[],"mappings":";;;;;;;;;;;;;;AAAA,qCASiB;AACjB,sEAA8C;AAC9C,0DAAkC;AAClC,0DAAkC;AAClC,sDAA8B;AAG9B,IAAqB,IAAI,GAAzB,MAAqB,IAAK,SAAQ,sBAAY;CA6B7C,CAAA;AA3BC;IADC,gCAAsB,CAAC,MAAM,CAAC;;gCACpB;AAGX;IADC,gBAAM,CAAC,SAAS,EAAE,EAAE,QAAQ,EAAE,IAAI,EAAE,CAAC;;iDACV;AAG5B;IADC,gBAAM,CAAC,SAAS,EAAE,EAAE,QAAQ,EAAE,IAAI,EAAE,CAAC;;sCACpB;AAGlB;IADC,gBAAM,CAAC,SAAS,EAAE,EAAE,SAAS,EAAE,EAAE,EAAE,KAAK,EAAE,CAAC,EAAE,OAAO,EAAE,CAAC,EAAE,CAAC;;0CACrC;AAGtB;IADC,0BAAgB,EAAE;8BACR,IAAI;uCAAC;AAGhB;IADC,gBAAM,CAAC,SAAS,EAAE,EAAE,QAAQ,EAAE,IAAI,EAAE,CAAC;;6CACb;AAIzB;IAFC,mBAAS,CAAC,GAAG,EAAE,CAAC,cAAI,EAAE,CAAC,IAAU,EAAE,EAAE,CAAC,IAAI,CAAC,EAAE,EAAE,EAAE,KAAK,EAAE,IAAI,EAAE,QAAQ,EAAE,SAAS,EAAE,CAAC;IACpF,oBAAU,EAAE;8BACP,cAAI;kCAAC;AAIX;IAFC,mBAAS,CAAC,GAAG,EAAE,CAAC,kBAAQ,EAAE,CAAC,IAAc,EAAE,EAAE,CAAC,IAAI,CAAC,IAAI,EAAE,EAAE,OAAO,EAAE,IAAI,EAAE,CAAC;IAC3E,oBAAU,EAAE;;wCACU;AAGvB;IADC,mBAAS,CAAC,GAAG,EAAE,CAAC,kBAAQ,EAAE,CAAC,QAAkB,EAAE,EAAE,CAAC,QAAQ,CAAC,IAAI,EAAE,EAAE,OAAO,EAAE,IAAI,EAAE,CAAC;;4CACzD;AA5BR,IAAI;IADxB,gBAAM,EAAE;GACY,IAAI,CA6BxB;kBA7BoB,IAAI"}
|
|
@@ -3,6 +3,7 @@ import { PriceData } from './PriceData';
|
|
|
3
3
|
import Cart from './Cart';
|
|
4
4
|
import { Product } from '../../Product.entity';
|
|
5
5
|
import Shipping from '../shipping/Shipping';
|
|
6
|
+
import ShippingCountry from '../shipping/ShippingCountry';
|
|
6
7
|
export default class CartItem extends AuditedModel {
|
|
7
8
|
id: string;
|
|
8
9
|
deletedAt: Date;
|
|
@@ -12,4 +13,5 @@ export default class CartItem extends AuditedModel {
|
|
|
12
13
|
priceData: PriceData;
|
|
13
14
|
cart: Cart;
|
|
14
15
|
shipping: Shipping;
|
|
16
|
+
shippingCountry: ShippingCountry;
|
|
15
17
|
}
|
|
@@ -18,6 +18,7 @@ const PriceData_1 = require("./PriceData");
|
|
|
18
18
|
const Cart_1 = __importDefault(require("./Cart"));
|
|
19
19
|
const Product_entity_1 = require("../../Product.entity");
|
|
20
20
|
const Shipping_1 = __importDefault(require("../shipping/Shipping"));
|
|
21
|
+
const ShippingCountry_1 = __importDefault(require("../shipping/ShippingCountry"));
|
|
21
22
|
let CartItem = class CartItem extends AuditedModel_1.default {
|
|
22
23
|
};
|
|
23
24
|
__decorate([
|
|
@@ -59,6 +60,15 @@ __decorate([
|
|
|
59
60
|
typeorm_1.JoinColumn(),
|
|
60
61
|
__metadata("design:type", Shipping_1.default)
|
|
61
62
|
], CartItem.prototype, "shipping", void 0);
|
|
63
|
+
__decorate([
|
|
64
|
+
typeorm_1.ManyToOne(() => ShippingCountry_1.default, (shippingCountry) => shippingCountry.cartItem, {
|
|
65
|
+
eager: true,
|
|
66
|
+
onDelete: 'CASCADE',
|
|
67
|
+
nullable: true,
|
|
68
|
+
}),
|
|
69
|
+
typeorm_1.JoinColumn(),
|
|
70
|
+
__metadata("design:type", ShippingCountry_1.default)
|
|
71
|
+
], CartItem.prototype, "shippingCountry", void 0);
|
|
62
72
|
CartItem = __decorate([
|
|
63
73
|
typeorm_1.Entity()
|
|
64
74
|
], CartItem);
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"CartItem.js","sourceRoot":"","sources":["../../../../src/entity/modules/shopcart/CartItem.ts"],"names":[],"mappings":";;;;;;;;;;;;;;AAAA,qCAQiB;AACjB,sEAA8C;AAC9C,2CAAwC;AACxC,kDAA0B;AAC1B,yDAA+C;AAC/C,oEAA4C;
|
|
1
|
+
{"version":3,"file":"CartItem.js","sourceRoot":"","sources":["../../../../src/entity/modules/shopcart/CartItem.ts"],"names":[],"mappings":";;;;;;;;;;;;;;AAAA,qCAQiB;AACjB,sEAA8C;AAC9C,2CAAwC;AACxC,kDAA0B;AAC1B,yDAA+C;AAC/C,oEAA4C;AAC5C,kFAA0D;AAG1D,IAAqB,QAAQ,GAA7B,MAAqB,QAAS,SAAQ,sBAAY;CA2CjD,CAAA;AAzCC;IADC,gCAAsB,CAAC,MAAM,CAAC;;oCACpB;AAGX;IADC,0BAAgB,EAAE;8BACR,IAAI;2CAAC;AAIhB;IAFC,mBAAS,CAAC,GAAG,EAAE,CAAC,wBAAO,EAAE,CAAC,OAAO,EAAE,EAAE,CAAC,OAAO,CAAC,EAAE,EAAE,EAAE,KAAK,EAAE,IAAI,EAAE,QAAQ,EAAE,SAAS,EAAE,CAAC;IACvF,oBAAU,EAAE;8BACJ,wBAAO;yCAAC;AAGjB;IADC,gBAAM,CAAC,SAAS,EAAE,EAAE,QAAQ,EAAE,IAAI,EAAE,CAAC;;2CACnB;AAGnB;IADC,gBAAM,CAAC,SAAS,EAAE,EAAE,OAAO,EAAE,CAAC,EAAE,CAAC;;0CAChB;AAIlB;IAFC,kBAAQ,CAAC,GAAG,EAAE,CAAC,qBAAS,EAAE,CAAC,SAAS,EAAE,EAAE,CAAC,SAAS,CAAC,QAAQ,CAAC;IAC5D,oBAAU,EAAE;8BACF,qBAAS;2CAAC;AAIrB;IAFC,mBAAS,CAAC,GAAG,EAAE,CAAC,cAAI,EAAE,CAAC,IAAU,EAAE,EAAE,CAAC,IAAI,CAAC,UAAU,EAAE,EAAE,KAAK,EAAE,IAAI,EAAE,QAAQ,EAAE,SAAS,EAAE,CAAC;IAC5F,oBAAU,EAAE;8BACP,cAAI;sCAAC;AAOX;IALC,mBAAS,CAAC,GAAG,EAAE,CAAC,kBAAQ,EAAE,CAAC,QAAkB,EAAE,EAAE,CAAC,QAAQ,CAAC,QAAQ,EAAE;QACpE,KAAK,EAAE,IAAI;QACX,QAAQ,EAAE,SAAS;KACpB,CAAC;IACD,oBAAU,EAAE;8BACH,kBAAQ;0CAAC;AAYnB;IAVC,mBAAS,CACR,GAAG,EAAE,CAAC,yBAAe,EACrB,CAAC,eAAgC,EAAE,EAAE,CAAC,eAAe,CAAC,QAAQ,EAC9D;QACE,KAAK,EAAE,IAAI;QACX,QAAQ,EAAE,SAAS;QACnB,QAAQ,EAAE,IAAI;KACf,CACF;IACA,oBAAU,EAAE;8BACI,yBAAe;iDAAC;AA1Cd,QAAQ;IAD5B,gBAAM,EAAE;GACY,QAAQ,CA2C5B;kBA3CoB,QAAQ"}
|
|
@@ -0,0 +1,31 @@
|
|
|
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.externalRequestV31685123080409 = void 0;
|
|
13
|
+
class externalRequestV31685123080409 {
|
|
14
|
+
constructor() {
|
|
15
|
+
this.name = 'externalRequestV31685123080409';
|
|
16
|
+
}
|
|
17
|
+
up(queryRunner) {
|
|
18
|
+
return __awaiter(this, void 0, void 0, function* () {
|
|
19
|
+
yield queryRunner.query(`ALTER TABLE \`external_request\` DROP COLUMN \`collection_id\``);
|
|
20
|
+
yield queryRunner.query(`ALTER TABLE \`external_request\` ADD \`collection_id\` varchar(255) NULL`);
|
|
21
|
+
});
|
|
22
|
+
}
|
|
23
|
+
down(queryRunner) {
|
|
24
|
+
return __awaiter(this, void 0, void 0, function* () {
|
|
25
|
+
yield queryRunner.query(`ALTER TABLE \`external_request\` ADD \`collection_id\` int NULL DEFAULT '0'`);
|
|
26
|
+
yield queryRunner.query(`ALTER TABLE \`external_request\` CHANGE \`collection_id\` \`collection\` int NULL DEFAULT '0'`);
|
|
27
|
+
});
|
|
28
|
+
}
|
|
29
|
+
}
|
|
30
|
+
exports.externalRequestV31685123080409 = externalRequestV31685123080409;
|
|
31
|
+
//# sourceMappingURL=1685123080409-externalRequest_v3.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"1685123080409-externalRequest_v3.js","sourceRoot":"","sources":["../../src/migrations/1685123080409-externalRequest_v3.ts"],"names":[],"mappings":";;;;;;;;;;;;AAEA,MAAa,8BAA8B;IAA3C;QACE,SAAI,GAAG,gCAAgC,CAAC;IAiB1C,CAAC;IAfc,EAAE,CAAC,WAAwB;;YACtC,MAAM,WAAW,CAAC,KAAK,CAAC,gEAAgE,CAAC,CAAC;YAC1F,MAAM,WAAW,CAAC,KAAK,CACrB,0EAA0E,CAC3E,CAAC;QACJ,CAAC;KAAA;IAEY,IAAI,CAAC,WAAwB;;YACxC,MAAM,WAAW,CAAC,KAAK,CACrB,6EAA6E,CAC9E,CAAC;YACF,MAAM,WAAW,CAAC,KAAK,CACrB,+FAA+F,CAChG,CAAC;QACJ,CAAC;KAAA;CACF;AAlBD,wEAkBC"}
|
|
@@ -0,0 +1,33 @@
|
|
|
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.externalRequestV41685127311585 = void 0;
|
|
13
|
+
class externalRequestV41685127311585 {
|
|
14
|
+
constructor() {
|
|
15
|
+
this.name = 'externalRequestV41685127311585';
|
|
16
|
+
}
|
|
17
|
+
up(queryRunner) {
|
|
18
|
+
return __awaiter(this, void 0, void 0, function* () {
|
|
19
|
+
yield queryRunner.query(`ALTER TABLE \`external_request\` CHANGE \`collection_id\` \`collection_ids\` varchar(255) NULL`);
|
|
20
|
+
yield queryRunner.query(`ALTER TABLE \`external_request\` DROP COLUMN \`collection_ids\``);
|
|
21
|
+
yield queryRunner.query(`ALTER TABLE \`external_request\` ADD \`collection_ids\` varchar(255) NULL`);
|
|
22
|
+
});
|
|
23
|
+
}
|
|
24
|
+
down(queryRunner) {
|
|
25
|
+
return __awaiter(this, void 0, void 0, function* () {
|
|
26
|
+
yield queryRunner.query(`ALTER TABLE \`external_request\` DROP COLUMN \`collection_ids\``);
|
|
27
|
+
yield queryRunner.query(`ALTER TABLE \`external_request\` ADD \`collection_ids\` varchar(255) NULL`);
|
|
28
|
+
yield queryRunner.query(`ALTER TABLE \`external_request\` CHANGE \`collection_ids\` \`collection_id\` varchar(255) NULL`);
|
|
29
|
+
});
|
|
30
|
+
}
|
|
31
|
+
}
|
|
32
|
+
exports.externalRequestV41685127311585 = externalRequestV41685127311585;
|
|
33
|
+
//# sourceMappingURL=1685127311585-externalRequest_v4.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"1685127311585-externalRequest_v4.js","sourceRoot":"","sources":["../../src/migrations/1685127311585-externalRequest_v4.ts"],"names":[],"mappings":";;;;;;;;;;;;AAEA,MAAa,8BAA8B;IAA3C;QACE,SAAI,GAAG,gCAAgC,CAAC;IAqB1C,CAAC;IAnBc,EAAE,CAAC,WAAwB;;YACtC,MAAM,WAAW,CAAC,KAAK,CACrB,gGAAgG,CACjG,CAAC;YACF,MAAM,WAAW,CAAC,KAAK,CAAC,iEAAiE,CAAC,CAAC;YAC3F,MAAM,WAAW,CAAC,KAAK,CACrB,2EAA2E,CAC5E,CAAC;QACJ,CAAC;KAAA;IAEY,IAAI,CAAC,WAAwB;;YACxC,MAAM,WAAW,CAAC,KAAK,CAAC,iEAAiE,CAAC,CAAC;YAC3F,MAAM,WAAW,CAAC,KAAK,CACrB,2EAA2E,CAC5E,CAAC;YACF,MAAM,WAAW,CAAC,KAAK,CACrB,gGAAgG,CACjG,CAAC;QACJ,CAAC;KAAA;CACF;AAtBD,wEAsBC"}
|
|
@@ -0,0 +1,31 @@
|
|
|
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.fixMultipleShops1686235086187 = void 0;
|
|
13
|
+
class fixMultipleShops1686235086187 {
|
|
14
|
+
constructor() {
|
|
15
|
+
this.name = 'fixMultipleShops1686235086187';
|
|
16
|
+
}
|
|
17
|
+
up(queryRunner) {
|
|
18
|
+
return __awaiter(this, void 0, void 0, function* () {
|
|
19
|
+
yield queryRunner.query(`DROP INDEX \`REL_9499974cf522429803e172a627\` ON \`shopify_connection\``);
|
|
20
|
+
yield queryRunner.query(`DROP INDEX \`REL_98158a497be5c13a12fad50554\` ON \`shopify_connection\``);
|
|
21
|
+
});
|
|
22
|
+
}
|
|
23
|
+
down(queryRunner) {
|
|
24
|
+
return __awaiter(this, void 0, void 0, function* () {
|
|
25
|
+
yield queryRunner.query(`CREATE UNIQUE INDEX \`REL_98158a497be5c13a12fad50554\` ON \`shopify_connection\` (\`supplier_id\`)`);
|
|
26
|
+
yield queryRunner.query(`CREATE UNIQUE INDEX \`REL_9499974cf522429803e172a627\` ON \`shopify_connection\` (\`reseller_id\`)`);
|
|
27
|
+
});
|
|
28
|
+
}
|
|
29
|
+
}
|
|
30
|
+
exports.fixMultipleShops1686235086187 = fixMultipleShops1686235086187;
|
|
31
|
+
//# sourceMappingURL=1686235086187-fix-multiple-shops.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"1686235086187-fix-multiple-shops.js","sourceRoot":"","sources":["../../src/migrations/1686235086187-fix-multiple-shops.ts"],"names":[],"mappings":";;;;;;;;;;;;AAEA,MAAa,6BAA6B;IAA1C;QACI,SAAI,GAAG,+BAA+B,CAAA;IAY1C,CAAC;IAVgB,EAAE,CAAC,WAAwB;;YACpC,MAAM,WAAW,CAAC,KAAK,CAAC,yEAAyE,CAAC,CAAC;YACnG,MAAM,WAAW,CAAC,KAAK,CAAC,yEAAyE,CAAC,CAAC;QACvG,CAAC;KAAA;IAEY,IAAI,CAAC,WAAwB;;YACtC,MAAM,WAAW,CAAC,KAAK,CAAC,oGAAoG,CAAC,CAAC;YAC9H,MAAM,WAAW,CAAC,KAAK,CAAC,oGAAoG,CAAC,CAAC;QAClI,CAAC;KAAA;CAEJ;AAbD,sEAaC"}
|
|
@@ -0,0 +1,33 @@
|
|
|
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.cartShippingCountry1686309865248 = void 0;
|
|
13
|
+
class cartShippingCountry1686309865248 {
|
|
14
|
+
constructor() {
|
|
15
|
+
this.name = 'cartShippingCountry1686309865248';
|
|
16
|
+
}
|
|
17
|
+
up(queryRunner) {
|
|
18
|
+
return __awaiter(this, void 0, void 0, function* () {
|
|
19
|
+
yield queryRunner.query(`ALTER TABLE \`cart\` ADD \`shipping_country\` varchar(255) NULL DEFAULT 'NO'`);
|
|
20
|
+
yield queryRunner.query(`ALTER TABLE \`cart_item\` ADD \`shipping_country_id\` varchar(36) NULL`);
|
|
21
|
+
yield queryRunner.query(`ALTER TABLE \`cart_item\` ADD CONSTRAINT \`FK_3bc8725061c3cea8a94060bfc9d\` FOREIGN KEY (\`shipping_country_id\`) REFERENCES \`shipping_country\`(\`id\`) ON DELETE CASCADE ON UPDATE NO ACTION`);
|
|
22
|
+
});
|
|
23
|
+
}
|
|
24
|
+
down(queryRunner) {
|
|
25
|
+
return __awaiter(this, void 0, void 0, function* () {
|
|
26
|
+
yield queryRunner.query(`ALTER TABLE \`cart_item\` DROP FOREIGN KEY \`FK_3bc8725061c3cea8a94060bfc9d\``);
|
|
27
|
+
yield queryRunner.query(`ALTER TABLE \`cart_item\` DROP COLUMN \`shipping_country_id\``);
|
|
28
|
+
yield queryRunner.query(`ALTER TABLE \`cart\` DROP COLUMN \`shipping_country\``);
|
|
29
|
+
});
|
|
30
|
+
}
|
|
31
|
+
}
|
|
32
|
+
exports.cartShippingCountry1686309865248 = cartShippingCountry1686309865248;
|
|
33
|
+
//# sourceMappingURL=1686309865248-cart_shipping_country.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"1686309865248-cart_shipping_country.js","sourceRoot":"","sources":["../../src/migrations/1686309865248-cart_shipping_country.ts"],"names":[],"mappings":";;;;;;;;;;;;AAEA,MAAa,gCAAgC;IAA7C;QACI,SAAI,GAAG,kCAAkC,CAAA;IAc7C,CAAC;IAZgB,EAAE,CAAC,WAAwB;;YACpC,MAAM,WAAW,CAAC,KAAK,CAAC,8EAA8E,CAAC,CAAC;YACxG,MAAM,WAAW,CAAC,KAAK,CAAC,wEAAwE,CAAC,CAAC;YAClG,MAAM,WAAW,CAAC,KAAK,CAAC,iMAAiM,CAAC,CAAC;QAC/N,CAAC;KAAA;IAEY,IAAI,CAAC,WAAwB;;YACtC,MAAM,WAAW,CAAC,KAAK,CAAC,+EAA+E,CAAC,CAAC;YACzG,MAAM,WAAW,CAAC,KAAK,CAAC,+DAA+D,CAAC,CAAC;YACzF,MAAM,WAAW,CAAC,KAAK,CAAC,uDAAuD,CAAC,CAAC;QACrF,CAAC;KAAA;CAEJ;AAfD,4EAeC"}
|
|
@@ -0,0 +1,29 @@
|
|
|
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.cartShippingDefault1686837392110 = void 0;
|
|
13
|
+
class cartShippingDefault1686837392110 {
|
|
14
|
+
constructor() {
|
|
15
|
+
this.name = 'cartShippingDefault1686837392110';
|
|
16
|
+
}
|
|
17
|
+
up(queryRunner) {
|
|
18
|
+
return __awaiter(this, void 0, void 0, function* () {
|
|
19
|
+
yield queryRunner.query(`ALTER TABLE \`cart\` CHANGE \`shipping_country\` \`shipping_country\` varchar(255) NULL`);
|
|
20
|
+
});
|
|
21
|
+
}
|
|
22
|
+
down(queryRunner) {
|
|
23
|
+
return __awaiter(this, void 0, void 0, function* () {
|
|
24
|
+
yield queryRunner.query(`ALTER TABLE \`cart\` CHANGE \`shipping_country\` \`shipping_country\` varchar(255) NULL DEFAULT 'NO'`);
|
|
25
|
+
});
|
|
26
|
+
}
|
|
27
|
+
}
|
|
28
|
+
exports.cartShippingDefault1686837392110 = cartShippingDefault1686837392110;
|
|
29
|
+
//# sourceMappingURL=1686837392110-cart_shipping_default.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"1686837392110-cart_shipping_default.js","sourceRoot":"","sources":["../../src/migrations/1686837392110-cart_shipping_default.ts"],"names":[],"mappings":";;;;;;;;;;;;AAEA,MAAa,gCAAgC;IAA7C;QACI,SAAI,GAAG,kCAAkC,CAAA;IAU7C,CAAC;IARgB,EAAE,CAAC,WAAwB;;YACpC,MAAM,WAAW,CAAC,KAAK,CAAC,yFAAyF,CAAC,CAAC;QACvH,CAAC;KAAA;IAEY,IAAI,CAAC,WAAwB;;YACtC,MAAM,WAAW,CAAC,KAAK,CAAC,sGAAsG,CAAC,CAAC;QACpI,CAAC;KAAA;CAEJ;AAXD,4EAWC"}
|
|
@@ -1997,7 +1997,7 @@
|
|
|
1997
1997
|
"affectsGlobalScope": false
|
|
1998
1998
|
},
|
|
1999
1999
|
"../src/entity/shopifyconnection.ts": {
|
|
2000
|
-
"version": "
|
|
2000
|
+
"version": "4ef581e4d8009900db6482b22b4c5718a71c2b166bd8874d3e78acd449ab32c7",
|
|
2001
2001
|
"signature": "deaaa620213450b2c981971e6fa519cb8e39ada9d97973a431bc95bcb877e4ea",
|
|
2002
2002
|
"affectsGlobalScope": false
|
|
2003
2003
|
},
|
|
@@ -2376,11 +2376,6 @@
|
|
|
2376
2376
|
"signature": "78e59eccdbf0169d76492247a9901ce89e61eddc9fcb7091b454191b0dc0ae98",
|
|
2377
2377
|
"affectsGlobalScope": false
|
|
2378
2378
|
},
|
|
2379
|
-
"../src/entity/modules/shipping/shippingcountry.ts": {
|
|
2380
|
-
"version": "53e5b2e673f14c86dfdb42d019cebf946419bbcb6c06ac9e12497f307a2e9c1e",
|
|
2381
|
-
"signature": "73164413026740d05b068b957927b9dd5744fbaceee0d4dd12b0e6c25110ca8d",
|
|
2382
|
-
"affectsGlobalScope": false
|
|
2383
|
-
},
|
|
2384
2379
|
"../src/entity/modules/shopcart/pricedata.ts": {
|
|
2385
2380
|
"version": "8d198c8a4b9ec24a576f38c6ce228e98e23d517ec03c1c7d7d8a4d956665497c",
|
|
2386
2381
|
"signature": "13f818e7a8b123df9357122492988375966183e1659533220999b24700bda43f",
|
|
@@ -2537,13 +2532,18 @@
|
|
|
2537
2532
|
"affectsGlobalScope": false
|
|
2538
2533
|
},
|
|
2539
2534
|
"../src/entity/modules/shopcart/cart.ts": {
|
|
2540
|
-
"version": "
|
|
2541
|
-
"signature": "
|
|
2535
|
+
"version": "84b4499307f11ddde7581eeaf49a0f31adeb4c86ae7d6a989f01e5f2f1e41994",
|
|
2536
|
+
"signature": "adbc8777a55c898e936e713c8fc967ce21b5383a9d7dbb4f6f2df3667128198a",
|
|
2542
2537
|
"affectsGlobalScope": false
|
|
2543
2538
|
},
|
|
2544
2539
|
"../src/entity/modules/shopcart/cartitem.ts": {
|
|
2545
|
-
"version": "
|
|
2546
|
-
"signature": "
|
|
2540
|
+
"version": "e9e1012ecd73a1467aa3305aac0a8c713d158a9df635238a84f03a548e3b6b5c",
|
|
2541
|
+
"signature": "a2fe2123e7ce3ace21aad87f324d1eb106cc611bc9b33af97570fb2db69e0db7",
|
|
2542
|
+
"affectsGlobalScope": false
|
|
2543
|
+
},
|
|
2544
|
+
"../src/entity/modules/shipping/shippingcountry.ts": {
|
|
2545
|
+
"version": "5a4f3a3c1cc8def7c03d4061531b8805c55c0cb09e9340e391a2669454e82c89",
|
|
2546
|
+
"signature": "f2ef645f5cef9ef978253264dd5a9b13259b08b467746d71c5a454f59f2f6f0e",
|
|
2547
2547
|
"affectsGlobalScope": false
|
|
2548
2548
|
},
|
|
2549
2549
|
"../src/entity/modules/shipping/shipping.ts": {
|
|
@@ -3266,11 +3266,36 @@
|
|
|
3266
3266
|
"signature": "6869bda9a903b7fb311947f1f1b107a0f4e8ac8c4f1ca0613b77809276d20cef",
|
|
3267
3267
|
"affectsGlobalScope": false
|
|
3268
3268
|
},
|
|
3269
|
+
"../src/migrations/1685123080409-externalrequest_v3.ts": {
|
|
3270
|
+
"version": "691028871831a3fc7e86c1aacef96957badd1ee3cf83dd4037d0c033a610f2e4",
|
|
3271
|
+
"signature": "37774fe87cd36ade780682b2feb3ee58689275d065047435320547de3cbaae22",
|
|
3272
|
+
"affectsGlobalScope": false
|
|
3273
|
+
},
|
|
3274
|
+
"../src/migrations/1685127311585-externalrequest_v4.ts": {
|
|
3275
|
+
"version": "4a51b8a6fb6d9e9864542f2e5320a317fe22af5448b85e19ef6d817041a289a3",
|
|
3276
|
+
"signature": "2bc9eed0ead66507f963a1da33823389b23234082925537aa2c793b556397ce1",
|
|
3277
|
+
"affectsGlobalScope": false
|
|
3278
|
+
},
|
|
3269
3279
|
"../src/migrations/1685128263295-external-request-update.ts": {
|
|
3270
3280
|
"version": "42a088cec62a5aec977d89940e5d2d842365f8d3eed0524839eb2591b991211b",
|
|
3271
3281
|
"signature": "3911090dc53367cd46bdbd59297c8b2e5c1f55ab13960bd178302a448ff59315",
|
|
3272
3282
|
"affectsGlobalScope": false
|
|
3273
3283
|
},
|
|
3284
|
+
"../src/migrations/1686235086187-fix-multiple-shops.ts": {
|
|
3285
|
+
"version": "dfe8972fca1ab8ed654e0666d2afd8dcc049833599364a59d3254576a7bb8ce8",
|
|
3286
|
+
"signature": "6c4b9412e21a89065db0fbe98b44cb0a31e1433f1d399e6278cd203c955e4468",
|
|
3287
|
+
"affectsGlobalScope": false
|
|
3288
|
+
},
|
|
3289
|
+
"../src/migrations/1686309865248-cart_shipping_country.ts": {
|
|
3290
|
+
"version": "6586ce470567e645e78d79e5d9fe80c0c8dcf514e10b0f6c5babe0de6d32e214",
|
|
3291
|
+
"signature": "99a202a7045ba79ab1da4a491827bd45a8ee31fb7f0992253bb978f3be75db31",
|
|
3292
|
+
"affectsGlobalScope": false
|
|
3293
|
+
},
|
|
3294
|
+
"../src/migrations/1686837392110-cart_shipping_default.ts": {
|
|
3295
|
+
"version": "39853b8addabb44339316a6b97d54f42e90076e08afb1c8b152b2fc1a5e8e3bb",
|
|
3296
|
+
"signature": "5b52ac63ec6fdb68511463c2cc3785ea6c3bd4a54540433d0416e87b9c7cdc21",
|
|
3297
|
+
"affectsGlobalScope": false
|
|
3298
|
+
},
|
|
3274
3299
|
"../src/migrations/execute/index.ts": {
|
|
3275
3300
|
"version": "8b5bf13d095aeb57afd593adf3d799681176a13c327e2f77e0028e178c4ee3b9",
|
|
3276
3301
|
"signature": "8e609bb71c20b858c77f0e9f90bb1319db8477b13f9f965f1a1e18524bf50881",
|
|
@@ -5506,7 +5531,8 @@
|
|
|
5506
5531
|
"../src/entity/modules/shipping/shippingcountry.ts": [
|
|
5507
5532
|
"../node_modules/typeorm/index.d.ts",
|
|
5508
5533
|
"../src/entity/auditedmodel.ts",
|
|
5509
|
-
"../src/entity/modules/shipping/shipping.ts"
|
|
5534
|
+
"../src/entity/modules/shipping/shipping.ts",
|
|
5535
|
+
"../src/entity/modules/shopcart/cartitem.ts"
|
|
5510
5536
|
],
|
|
5511
5537
|
"../src/entity/modules/shopcart/cart.ts": [
|
|
5512
5538
|
"../node_modules/typeorm/index.d.ts",
|
|
@@ -5519,6 +5545,7 @@
|
|
|
5519
5545
|
"../node_modules/typeorm/index.d.ts",
|
|
5520
5546
|
"../src/entity/auditedmodel.ts",
|
|
5521
5547
|
"../src/entity/modules/shipping/shipping.ts",
|
|
5548
|
+
"../src/entity/modules/shipping/shippingcountry.ts",
|
|
5522
5549
|
"../src/entity/modules/shopcart/cart.ts",
|
|
5523
5550
|
"../src/entity/modules/shopcart/pricedata.ts",
|
|
5524
5551
|
"../src/entity/product.entity.ts"
|
|
@@ -6095,9 +6122,24 @@
|
|
|
6095
6122
|
"../src/migrations/1684975416295-shopify-conn-2.ts": [
|
|
6096
6123
|
"../node_modules/typeorm/index.d.ts"
|
|
6097
6124
|
],
|
|
6125
|
+
"../src/migrations/1685123080409-externalrequest_v3.ts": [
|
|
6126
|
+
"../node_modules/typeorm/index.d.ts"
|
|
6127
|
+
],
|
|
6128
|
+
"../src/migrations/1685127311585-externalrequest_v4.ts": [
|
|
6129
|
+
"../node_modules/typeorm/index.d.ts"
|
|
6130
|
+
],
|
|
6098
6131
|
"../src/migrations/1685128263295-external-request-update.ts": [
|
|
6099
6132
|
"../node_modules/typeorm/index.d.ts"
|
|
6100
6133
|
],
|
|
6134
|
+
"../src/migrations/1686235086187-fix-multiple-shops.ts": [
|
|
6135
|
+
"../node_modules/typeorm/index.d.ts"
|
|
6136
|
+
],
|
|
6137
|
+
"../src/migrations/1686309865248-cart_shipping_country.ts": [
|
|
6138
|
+
"../node_modules/typeorm/index.d.ts"
|
|
6139
|
+
],
|
|
6140
|
+
"../src/migrations/1686837392110-cart_shipping_default.ts": [
|
|
6141
|
+
"../node_modules/typeorm/index.d.ts"
|
|
6142
|
+
],
|
|
6101
6143
|
"../src/migrations/execute/index.ts": [
|
|
6102
6144
|
"../src/config/connect.ts"
|
|
6103
6145
|
],
|
|
@@ -8273,7 +8315,8 @@
|
|
|
8273
8315
|
],
|
|
8274
8316
|
"../src/entity/modules/shipping/shippingcountry.ts": [
|
|
8275
8317
|
"../src/entity/auditedmodel.ts",
|
|
8276
|
-
"../src/entity/modules/shipping/shipping.ts"
|
|
8318
|
+
"../src/entity/modules/shipping/shipping.ts",
|
|
8319
|
+
"../src/entity/modules/shopcart/cartitem.ts"
|
|
8277
8320
|
],
|
|
8278
8321
|
"../src/entity/modules/shopcart/cart.ts": [
|
|
8279
8322
|
"../src/entity/auditedmodel.ts",
|
|
@@ -8284,6 +8327,7 @@
|
|
|
8284
8327
|
"../src/entity/modules/shopcart/cartitem.ts": [
|
|
8285
8328
|
"../src/entity/auditedmodel.ts",
|
|
8286
8329
|
"../src/entity/modules/shipping/shipping.ts",
|
|
8330
|
+
"../src/entity/modules/shipping/shippingcountry.ts",
|
|
8287
8331
|
"../src/entity/modules/shopcart/cart.ts",
|
|
8288
8332
|
"../src/entity/modules/shopcart/pricedata.ts",
|
|
8289
8333
|
"../src/entity/product.entity.ts"
|
|
@@ -8777,9 +8821,24 @@
|
|
|
8777
8821
|
"../src/migrations/1684975416295-shopify-conn-2.ts": [
|
|
8778
8822
|
"../node_modules/typeorm/index.d.ts"
|
|
8779
8823
|
],
|
|
8824
|
+
"../src/migrations/1685123080409-externalrequest_v3.ts": [
|
|
8825
|
+
"../node_modules/typeorm/index.d.ts"
|
|
8826
|
+
],
|
|
8827
|
+
"../src/migrations/1685127311585-externalrequest_v4.ts": [
|
|
8828
|
+
"../node_modules/typeorm/index.d.ts"
|
|
8829
|
+
],
|
|
8780
8830
|
"../src/migrations/1685128263295-external-request-update.ts": [
|
|
8781
8831
|
"../node_modules/typeorm/index.d.ts"
|
|
8782
8832
|
],
|
|
8833
|
+
"../src/migrations/1686235086187-fix-multiple-shops.ts": [
|
|
8834
|
+
"../node_modules/typeorm/index.d.ts"
|
|
8835
|
+
],
|
|
8836
|
+
"../src/migrations/1686309865248-cart_shipping_country.ts": [
|
|
8837
|
+
"../node_modules/typeorm/index.d.ts"
|
|
8838
|
+
],
|
|
8839
|
+
"../src/migrations/1686837392110-cart_shipping_default.ts": [
|
|
8840
|
+
"../node_modules/typeorm/index.d.ts"
|
|
8841
|
+
],
|
|
8783
8842
|
"../src/migrations/index.ts": [
|
|
8784
8843
|
"../src/migrations/1628474597284-initialschema.ts",
|
|
8785
8844
|
"../src/migrations/1630077596132-removemangopay.ts",
|
|
@@ -9581,7 +9640,12 @@
|
|
|
9581
9640
|
"../src/migrations/1684452476996-externalrequest_v2.ts",
|
|
9582
9641
|
"../src/migrations/1684935064606-shopify-conn.ts",
|
|
9583
9642
|
"../src/migrations/1684975416295-shopify-conn-2.ts",
|
|
9643
|
+
"../src/migrations/1685123080409-externalrequest_v3.ts",
|
|
9644
|
+
"../src/migrations/1685127311585-externalrequest_v4.ts",
|
|
9584
9645
|
"../src/migrations/1685128263295-external-request-update.ts",
|
|
9646
|
+
"../src/migrations/1686235086187-fix-multiple-shops.ts",
|
|
9647
|
+
"../src/migrations/1686309865248-cart_shipping_country.ts",
|
|
9648
|
+
"../src/migrations/1686837392110-cart_shipping_default.ts",
|
|
9585
9649
|
"../src/migrations/execute/index.ts",
|
|
9586
9650
|
"../src/migrations/index.ts",
|
|
9587
9651
|
"../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.79",
|
|
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.79",
|
|
25
|
+
"@reachu/utils": "1.0.79",
|
|
26
26
|
"dotenv": "8.0.0",
|
|
27
27
|
"express": "4.17.1",
|
|
28
28
|
"mysql2": "1.5.2",
|
|
@@ -3,6 +3,7 @@ import {
|
|
|
3
3
|
DeleteDateColumn,
|
|
4
4
|
Entity,
|
|
5
5
|
JoinColumn,
|
|
6
|
+
ManyToOne,
|
|
6
7
|
OneToOne,
|
|
7
8
|
PrimaryGeneratedColumn,
|
|
8
9
|
Unique,
|
|
@@ -23,12 +24,12 @@ export default class ShopifyConnection extends AuditedModel {
|
|
|
23
24
|
@Column({ type: 'boolean', default: false })
|
|
24
25
|
importedProducts: boolean;
|
|
25
26
|
|
|
26
|
-
@
|
|
27
|
-
@JoinColumn({})
|
|
27
|
+
@ManyToOne(() => User, (user) => user.shopifyReseller, { onDelete: 'CASCADE', nullable: true })
|
|
28
|
+
@JoinColumn({ name: 'reseller_id', referencedColumnName: 'id' })
|
|
28
29
|
reseller: User;
|
|
29
30
|
|
|
30
|
-
@
|
|
31
|
-
@JoinColumn()
|
|
31
|
+
@ManyToOne(() => User, (user) => user.shopifySupplier, { onDelete: 'CASCADE', nullable: true })
|
|
32
|
+
@JoinColumn({ name: 'supplier_id', referencedColumnName: 'id' })
|
|
32
33
|
supplier: User;
|
|
33
34
|
|
|
34
35
|
@Column('varchar', { nullable: true })
|
|
@@ -5,9 +5,11 @@ import {
|
|
|
5
5
|
Column,
|
|
6
6
|
ManyToOne,
|
|
7
7
|
JoinColumn,
|
|
8
|
+
OneToMany,
|
|
8
9
|
} from 'typeorm';
|
|
9
10
|
import AuditedModel from '../../AuditedModel';
|
|
10
11
|
import Shipping from './Shipping';
|
|
12
|
+
import CartItem from '../shopcart/CartItem';
|
|
11
13
|
|
|
12
14
|
@Entity()
|
|
13
15
|
export default class ShippingCountry extends AuditedModel {
|
|
@@ -32,4 +34,7 @@ export default class ShippingCountry extends AuditedModel {
|
|
|
32
34
|
})
|
|
33
35
|
@JoinColumn()
|
|
34
36
|
shipping: Shipping;
|
|
37
|
+
|
|
38
|
+
@OneToMany(() => CartItem, (cartItem: CartItem) => cartItem.shipping, { cascade: true })
|
|
39
|
+
cartItem: CartItem[];
|
|
35
40
|
}
|
|
@@ -30,6 +30,9 @@ export default class Cart extends AuditedModel {
|
|
|
30
30
|
@DeleteDateColumn()
|
|
31
31
|
deletedAt: Date;
|
|
32
32
|
|
|
33
|
+
@Column('varchar', { nullable: true })
|
|
34
|
+
shippingCountry?: string;
|
|
35
|
+
|
|
33
36
|
@ManyToOne(() => User, (user: User) => user.id, { eager: true, onDelete: 'CASCADE' })
|
|
34
37
|
@JoinColumn()
|
|
35
38
|
user: User;
|
|
@@ -12,6 +12,7 @@ import { PriceData } from './PriceData';
|
|
|
12
12
|
import Cart from './Cart';
|
|
13
13
|
import { Product } from '../../Product.entity';
|
|
14
14
|
import Shipping from '../shipping/Shipping';
|
|
15
|
+
import ShippingCountry from '../shipping/ShippingCountry';
|
|
15
16
|
|
|
16
17
|
@Entity()
|
|
17
18
|
export default class CartItem extends AuditedModel {
|
|
@@ -45,4 +46,16 @@ export default class CartItem extends AuditedModel {
|
|
|
45
46
|
})
|
|
46
47
|
@JoinColumn()
|
|
47
48
|
shipping: Shipping;
|
|
49
|
+
|
|
50
|
+
@ManyToOne(
|
|
51
|
+
() => ShippingCountry,
|
|
52
|
+
(shippingCountry: ShippingCountry) => shippingCountry.cartItem,
|
|
53
|
+
{
|
|
54
|
+
eager: true,
|
|
55
|
+
onDelete: 'CASCADE',
|
|
56
|
+
nullable: true,
|
|
57
|
+
},
|
|
58
|
+
)
|
|
59
|
+
@JoinColumn()
|
|
60
|
+
shippingCountry: ShippingCountry;
|
|
48
61
|
}
|
|
@@ -0,0 +1,21 @@
|
|
|
1
|
+
import { MigrationInterface, QueryRunner } from 'typeorm';
|
|
2
|
+
|
|
3
|
+
export class externalRequestV31685123080409 implements MigrationInterface {
|
|
4
|
+
name = 'externalRequestV31685123080409';
|
|
5
|
+
|
|
6
|
+
public async up(queryRunner: QueryRunner): Promise<void> {
|
|
7
|
+
await queryRunner.query(`ALTER TABLE \`external_request\` DROP COLUMN \`collection_id\``);
|
|
8
|
+
await queryRunner.query(
|
|
9
|
+
`ALTER TABLE \`external_request\` ADD \`collection_id\` varchar(255) NULL`,
|
|
10
|
+
);
|
|
11
|
+
}
|
|
12
|
+
|
|
13
|
+
public async down(queryRunner: QueryRunner): Promise<void> {
|
|
14
|
+
await queryRunner.query(
|
|
15
|
+
`ALTER TABLE \`external_request\` ADD \`collection_id\` int NULL DEFAULT '0'`,
|
|
16
|
+
);
|
|
17
|
+
await queryRunner.query(
|
|
18
|
+
`ALTER TABLE \`external_request\` CHANGE \`collection_id\` \`collection\` int NULL DEFAULT '0'`,
|
|
19
|
+
);
|
|
20
|
+
}
|
|
21
|
+
}
|
|
@@ -0,0 +1,25 @@
|
|
|
1
|
+
import { MigrationInterface, QueryRunner } from 'typeorm';
|
|
2
|
+
|
|
3
|
+
export class externalRequestV41685127311585 implements MigrationInterface {
|
|
4
|
+
name = 'externalRequestV41685127311585';
|
|
5
|
+
|
|
6
|
+
public async up(queryRunner: QueryRunner): Promise<void> {
|
|
7
|
+
await queryRunner.query(
|
|
8
|
+
`ALTER TABLE \`external_request\` CHANGE \`collection_id\` \`collection_ids\` varchar(255) NULL`,
|
|
9
|
+
);
|
|
10
|
+
await queryRunner.query(`ALTER TABLE \`external_request\` DROP COLUMN \`collection_ids\``);
|
|
11
|
+
await queryRunner.query(
|
|
12
|
+
`ALTER TABLE \`external_request\` ADD \`collection_ids\` varchar(255) NULL`,
|
|
13
|
+
);
|
|
14
|
+
}
|
|
15
|
+
|
|
16
|
+
public async down(queryRunner: QueryRunner): Promise<void> {
|
|
17
|
+
await queryRunner.query(`ALTER TABLE \`external_request\` DROP COLUMN \`collection_ids\``);
|
|
18
|
+
await queryRunner.query(
|
|
19
|
+
`ALTER TABLE \`external_request\` ADD \`collection_ids\` varchar(255) NULL`,
|
|
20
|
+
);
|
|
21
|
+
await queryRunner.query(
|
|
22
|
+
`ALTER TABLE \`external_request\` CHANGE \`collection_ids\` \`collection_id\` varchar(255) NULL`,
|
|
23
|
+
);
|
|
24
|
+
}
|
|
25
|
+
}
|
|
@@ -0,0 +1,16 @@
|
|
|
1
|
+
import {MigrationInterface, QueryRunner} from "typeorm";
|
|
2
|
+
|
|
3
|
+
export class fixMultipleShops1686235086187 implements MigrationInterface {
|
|
4
|
+
name = 'fixMultipleShops1686235086187'
|
|
5
|
+
|
|
6
|
+
public async up(queryRunner: QueryRunner): Promise<void> {
|
|
7
|
+
await queryRunner.query(`DROP INDEX \`REL_9499974cf522429803e172a627\` ON \`shopify_connection\``);
|
|
8
|
+
await queryRunner.query(`DROP INDEX \`REL_98158a497be5c13a12fad50554\` ON \`shopify_connection\``);
|
|
9
|
+
}
|
|
10
|
+
|
|
11
|
+
public async down(queryRunner: QueryRunner): Promise<void> {
|
|
12
|
+
await queryRunner.query(`CREATE UNIQUE INDEX \`REL_98158a497be5c13a12fad50554\` ON \`shopify_connection\` (\`supplier_id\`)`);
|
|
13
|
+
await queryRunner.query(`CREATE UNIQUE INDEX \`REL_9499974cf522429803e172a627\` ON \`shopify_connection\` (\`reseller_id\`)`);
|
|
14
|
+
}
|
|
15
|
+
|
|
16
|
+
}
|
|
@@ -0,0 +1,18 @@
|
|
|
1
|
+
import {MigrationInterface, QueryRunner} from "typeorm";
|
|
2
|
+
|
|
3
|
+
export class cartShippingCountry1686309865248 implements MigrationInterface {
|
|
4
|
+
name = 'cartShippingCountry1686309865248'
|
|
5
|
+
|
|
6
|
+
public async up(queryRunner: QueryRunner): Promise<void> {
|
|
7
|
+
await queryRunner.query(`ALTER TABLE \`cart\` ADD \`shipping_country\` varchar(255) NULL DEFAULT 'NO'`);
|
|
8
|
+
await queryRunner.query(`ALTER TABLE \`cart_item\` ADD \`shipping_country_id\` varchar(36) NULL`);
|
|
9
|
+
await queryRunner.query(`ALTER TABLE \`cart_item\` ADD CONSTRAINT \`FK_3bc8725061c3cea8a94060bfc9d\` FOREIGN KEY (\`shipping_country_id\`) REFERENCES \`shipping_country\`(\`id\`) ON DELETE CASCADE ON UPDATE NO ACTION`);
|
|
10
|
+
}
|
|
11
|
+
|
|
12
|
+
public async down(queryRunner: QueryRunner): Promise<void> {
|
|
13
|
+
await queryRunner.query(`ALTER TABLE \`cart_item\` DROP FOREIGN KEY \`FK_3bc8725061c3cea8a94060bfc9d\``);
|
|
14
|
+
await queryRunner.query(`ALTER TABLE \`cart_item\` DROP COLUMN \`shipping_country_id\``);
|
|
15
|
+
await queryRunner.query(`ALTER TABLE \`cart\` DROP COLUMN \`shipping_country\``);
|
|
16
|
+
}
|
|
17
|
+
|
|
18
|
+
}
|
|
@@ -0,0 +1,14 @@
|
|
|
1
|
+
import {MigrationInterface, QueryRunner} from "typeorm";
|
|
2
|
+
|
|
3
|
+
export class cartShippingDefault1686837392110 implements MigrationInterface {
|
|
4
|
+
name = 'cartShippingDefault1686837392110'
|
|
5
|
+
|
|
6
|
+
public async up(queryRunner: QueryRunner): Promise<void> {
|
|
7
|
+
await queryRunner.query(`ALTER TABLE \`cart\` CHANGE \`shipping_country\` \`shipping_country\` varchar(255) NULL`);
|
|
8
|
+
}
|
|
9
|
+
|
|
10
|
+
public async down(queryRunner: QueryRunner): Promise<void> {
|
|
11
|
+
await queryRunner.query(`ALTER TABLE \`cart\` CHANGE \`shipping_country\` \`shipping_country\` varchar(255) NULL DEFAULT 'NO'`);
|
|
12
|
+
}
|
|
13
|
+
|
|
14
|
+
}
|