@reachu/database 1.0.161 → 1.0.162
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/Order.d.ts +2 -0
- package/dist/entity/Order.js +6 -0
- package/dist/entity/Order.js.map +1 -1
- package/dist/migrations/1708039535580-order-channel-user.d.ts +6 -0
- package/dist/migrations/1708039535580-order-channel-user.js +31 -0
- package/dist/migrations/1708039535580-order-channel-user.js.map +1 -0
- package/dist/tsconfig.tsbuildinfo +16 -2
- package/package.json +3 -3
- package/src/entity/Order.ts +5 -0
- package/src/migrations/1708039535580-order-channel-user.ts +16 -0
package/dist/entity/Order.d.ts
CHANGED
|
@@ -6,6 +6,7 @@ import OrderTracking from './OrderTracking';
|
|
|
6
6
|
import Currency from '../staticData/Currency';
|
|
7
7
|
import OrderShipping from './OrderShipping';
|
|
8
8
|
import { Price } from './Price.entity';
|
|
9
|
+
import ChannelUser from './ChannelUser';
|
|
9
10
|
declare class Order extends AuditedModel {
|
|
10
11
|
id?: number;
|
|
11
12
|
channel: string;
|
|
@@ -26,5 +27,6 @@ declare class Order extends AuditedModel {
|
|
|
26
27
|
deletedAt: Date;
|
|
27
28
|
price: Price;
|
|
28
29
|
testOrigen: boolean;
|
|
30
|
+
channelUser: ChannelUser;
|
|
29
31
|
}
|
|
30
32
|
export default Order;
|
package/dist/entity/Order.js
CHANGED
|
@@ -21,6 +21,7 @@ const OrderTracking_1 = __importDefault(require("./OrderTracking"));
|
|
|
21
21
|
const Currency_1 = __importDefault(require("../staticData/Currency"));
|
|
22
22
|
const OrderShipping_1 = __importDefault(require("./OrderShipping"));
|
|
23
23
|
const Price_entity_1 = require("./Price.entity");
|
|
24
|
+
const ChannelUser_1 = __importDefault(require("./ChannelUser"));
|
|
24
25
|
let Order = class Order extends AuditedModel_1.default {
|
|
25
26
|
};
|
|
26
27
|
__decorate([
|
|
@@ -103,6 +104,11 @@ __decorate([
|
|
|
103
104
|
typeorm_1.Column('boolean', { default: false }),
|
|
104
105
|
__metadata("design:type", Boolean)
|
|
105
106
|
], Order.prototype, "testOrigen", void 0);
|
|
107
|
+
__decorate([
|
|
108
|
+
typeorm_1.ManyToOne(() => ChannelUser_1.default, (channelUser) => channelUser.id, { nullable: true }),
|
|
109
|
+
typeorm_1.JoinColumn(),
|
|
110
|
+
__metadata("design:type", ChannelUser_1.default)
|
|
111
|
+
], Order.prototype, "channelUser", void 0);
|
|
106
112
|
Order = __decorate([
|
|
107
113
|
typeorm_1.Entity()
|
|
108
114
|
], Order);
|
package/dist/entity/Order.js.map
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"Order.js","sourceRoot":"","sources":["../../src/entity/Order.ts"],"names":[],"mappings":";;;;;;;;;;;;;;AAAA,qCAQiB;AACjB,kDAA0B;AAC1B,kEAA0C;AAC1C,4DAAoC;AACpC,oEAA4C;AAC5C,oEAA4C;AAC5C,sEAA8C;AAC9C,oEAA4C;AAC5C,iDAAuC;
|
|
1
|
+
{"version":3,"file":"Order.js","sourceRoot":"","sources":["../../src/entity/Order.ts"],"names":[],"mappings":";;;;;;;;;;;;;;AAAA,qCAQiB;AACjB,kDAA0B;AAC1B,kEAA0C;AAC1C,4DAAoC;AACpC,oEAA4C;AAC5C,oEAA4C;AAC5C,sEAA8C;AAC9C,oEAA4C;AAC5C,iDAAuC;AACvC,gEAAwC;AAGxC,IAAM,KAAK,GAAX,MAAM,KAAM,SAAQ,sBAAY;CAiE/B,CAAA;AA/DC;IADC,gCAAsB,EAAE;;iCACb;AAGZ;IADC,gBAAM,CAAC,SAAS,CAAC;;sCACF;AAGhB;IADC,gBAAM,CAAC,SAAS,CAAC;;wCACA;AAGlB;IADC,gBAAM,CAAC,SAAS,EAAE,EAAE,OAAO,EAAE,EAAE,EAAE,CAAC;;+CACV;AAGzB;IADC,gBAAM,CAAC,UAAU,CAAC;8BACC,IAAI;iDAAC;AAGzB;IADC,gBAAM,CAAC,SAAS,CAAC;;uCACC;AAG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AG3B;IADC,0BAAgB,EAAE;8BACR,IAAI;wCAAC;AAGhB;IADC,gBAAM,CAAC,GAAG,EAAE,CAAC,oBAAK,EAAE,EAAE,MAAM,EAAE,QAAQ,EAAE,CAAC;8BACnC,oBAAK;oCAAC;AAGb;IADC,gBAAM,CAAC,SAAS,EAAE,EAAE,OAAO,EAAE,KAAK,EAAE,CAAC;;yCAClB;AAIpB;IAFC,mBAAS,CAAC,GAAG,EAAE,CAAC,qBAAW,EAAE,CAAC,WAAW,EAAE,EAAE,CAAC,WAAW,CAAC,EAAE,EAAE,EAAE,QAAQ,EAAE,IAAI,EAAE,CAAC;IACjF,oBAAU,EAAE;8BACA,qBAAW;0CAAC;AAhErB,KAAK;IADV,gBAAM,EAAE;GACH,KAAK,CAiEV;AAED,kBAAe,KAAK,CAAC"}
|
|
@@ -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.orderChannelUser1708039535580 = void 0;
|
|
13
|
+
class orderChannelUser1708039535580 {
|
|
14
|
+
constructor() {
|
|
15
|
+
this.name = 'orderChannelUser1708039535580';
|
|
16
|
+
}
|
|
17
|
+
up(queryRunner) {
|
|
18
|
+
return __awaiter(this, void 0, void 0, function* () {
|
|
19
|
+
yield queryRunner.query(`ALTER TABLE \`order\` ADD \`channel_user_id\` int NULL`);
|
|
20
|
+
yield queryRunner.query(`ALTER TABLE \`order\` ADD CONSTRAINT \`FK_d1254e4dc50ab0aca711d375fb6\` FOREIGN KEY (\`channel_user_id\`) REFERENCES \`channel_user\`(\`id\`) ON DELETE NO ACTION ON UPDATE NO ACTION`);
|
|
21
|
+
});
|
|
22
|
+
}
|
|
23
|
+
down(queryRunner) {
|
|
24
|
+
return __awaiter(this, void 0, void 0, function* () {
|
|
25
|
+
yield queryRunner.query(`ALTER TABLE \`order\` DROP FOREIGN KEY \`FK_d1254e4dc50ab0aca711d375fb6\``);
|
|
26
|
+
yield queryRunner.query(`ALTER TABLE \`order\` DROP COLUMN \`channel_user_id\``);
|
|
27
|
+
});
|
|
28
|
+
}
|
|
29
|
+
}
|
|
30
|
+
exports.orderChannelUser1708039535580 = orderChannelUser1708039535580;
|
|
31
|
+
//# sourceMappingURL=1708039535580-order-channel-user.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"1708039535580-order-channel-user.js","sourceRoot":"","sources":["../../src/migrations/1708039535580-order-channel-user.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,wDAAwD,CAAC,CAAC;YAClF,MAAM,WAAW,CAAC,KAAK,CAAC,uLAAuL,CAAC,CAAC;QACrN,CAAC;KAAA;IAEY,IAAI,CAAC,WAAwB;;YACtC,MAAM,WAAW,CAAC,KAAK,CAAC,2EAA2E,CAAC,CAAC;YACrG,MAAM,WAAW,CAAC,KAAK,CAAC,uDAAuD,CAAC,CAAC;QACrF,CAAC;KAAA;CAEJ;AAbD,sEAaC"}
|
|
@@ -2537,8 +2537,8 @@
|
|
|
2537
2537
|
"affectsGlobalScope": false
|
|
2538
2538
|
},
|
|
2539
2539
|
"../src/entity/order.ts": {
|
|
2540
|
-
"version": "
|
|
2541
|
-
"signature": "
|
|
2540
|
+
"version": "d6dbded0493dcf615ee0ba6ae1447506769a712c4a987b31757a01a90b70b0aa",
|
|
2541
|
+
"signature": "c05e9c98cd0decd8b9c28fc57cfa93450427260e85ac0eefe3299fe73905a1b8",
|
|
2542
2542
|
"affectsGlobalScope": false
|
|
2543
2543
|
},
|
|
2544
2544
|
"../src/entity/modules/shopcart/checkout.ts": {
|
|
@@ -3701,6 +3701,11 @@
|
|
|
3701
3701
|
"signature": "ff6ad2ee862922eb10effdd0fc84f84dff4f2c44a3c8d9751cceb8d6089ebfc6",
|
|
3702
3702
|
"affectsGlobalScope": false
|
|
3703
3703
|
},
|
|
3704
|
+
"../src/migrations/1708039535580-order-channel-user.ts": {
|
|
3705
|
+
"version": "5713c518367802850c064060021e9c9c818e8487b2b1a3eb9227d6621f236000",
|
|
3706
|
+
"signature": "7cc7d57e7b8d8064a350346af4fac982fbd8dab6c2f076576e215566ac50780c",
|
|
3707
|
+
"affectsGlobalScope": false
|
|
3708
|
+
},
|
|
3704
3709
|
"../src/migrations/execute/index.ts": {
|
|
3705
3710
|
"version": "8b5bf13d095aeb57afd593adf3d799681176a13c327e2f77e0028e178c4ee3b9",
|
|
3706
3711
|
"signature": "8e609bb71c20b858c77f0e9f90bb1319db8477b13f9f965f1a1e18524bf50881",
|
|
@@ -6164,6 +6169,7 @@
|
|
|
6164
6169
|
"../src/entity/order.ts": [
|
|
6165
6170
|
"../node_modules/typeorm/index.d.ts",
|
|
6166
6171
|
"../src/entity/auditedmodel.ts",
|
|
6172
|
+
"../src/entity/channeluser.ts",
|
|
6167
6173
|
"../src/entity/ordercustomer.ts",
|
|
6168
6174
|
"../src/entity/orderitem.ts",
|
|
6169
6175
|
"../src/entity/ordershipping.ts",
|
|
@@ -6835,6 +6841,9 @@
|
|
|
6835
6841
|
"../src/migrations/1708027064933-woo-user-delete.ts": [
|
|
6836
6842
|
"../node_modules/typeorm/index.d.ts"
|
|
6837
6843
|
],
|
|
6844
|
+
"../src/migrations/1708039535580-order-channel-user.ts": [
|
|
6845
|
+
"../node_modules/typeorm/index.d.ts"
|
|
6846
|
+
],
|
|
6838
6847
|
"../src/migrations/execute/index.ts": [
|
|
6839
6848
|
"../src/config/connect.ts"
|
|
6840
6849
|
],
|
|
@@ -9216,6 +9225,7 @@
|
|
|
9216
9225
|
],
|
|
9217
9226
|
"../src/entity/order.ts": [
|
|
9218
9227
|
"../src/entity/auditedmodel.ts",
|
|
9228
|
+
"../src/entity/channeluser.ts",
|
|
9219
9229
|
"../src/entity/ordercustomer.ts",
|
|
9220
9230
|
"../src/entity/orderitem.ts",
|
|
9221
9231
|
"../src/entity/ordershipping.ts",
|
|
@@ -9823,6 +9833,9 @@
|
|
|
9823
9833
|
"../src/migrations/1708027064933-woo-user-delete.ts": [
|
|
9824
9834
|
"../node_modules/typeorm/index.d.ts"
|
|
9825
9835
|
],
|
|
9836
|
+
"../src/migrations/1708039535580-order-channel-user.ts": [
|
|
9837
|
+
"../node_modules/typeorm/index.d.ts"
|
|
9838
|
+
],
|
|
9826
9839
|
"../src/migrations/index.ts": [
|
|
9827
9840
|
"../src/migrations/1628474597284-initialschema.ts",
|
|
9828
9841
|
"../src/migrations/1630077596132-removemangopay.ts",
|
|
@@ -10723,6 +10736,7 @@
|
|
|
10723
10736
|
"../src/migrations/1706273488135-promote_to_production_26_01_2024.ts",
|
|
10724
10737
|
"../src/migrations/1707768053927-shopify-supplier-delete.ts",
|
|
10725
10738
|
"../src/migrations/1708027064933-woo-user-delete.ts",
|
|
10739
|
+
"../src/migrations/1708039535580-order-channel-user.ts",
|
|
10726
10740
|
"../src/migrations/execute/index.ts",
|
|
10727
10741
|
"../src/migrations/index.ts",
|
|
10728
10742
|
"../src/repositories/discount/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.162",
|
|
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.162",
|
|
25
|
+
"@reachu/utils": "1.0.162",
|
|
26
26
|
"dotenv": "8.0.0",
|
|
27
27
|
"express": "4.17.1",
|
|
28
28
|
"mysql2": "1.5.2",
|
package/src/entity/Order.ts
CHANGED
|
@@ -15,6 +15,7 @@ import OrderTracking from './OrderTracking';
|
|
|
15
15
|
import Currency from '../staticData/Currency';
|
|
16
16
|
import OrderShipping from './OrderShipping';
|
|
17
17
|
import { Price } from './Price.entity';
|
|
18
|
+
import ChannelUser from './ChannelUser';
|
|
18
19
|
|
|
19
20
|
@Entity()
|
|
20
21
|
class Order extends AuditedModel {
|
|
@@ -78,6 +79,10 @@ class Order extends AuditedModel {
|
|
|
78
79
|
|
|
79
80
|
@Column('boolean', { default: false })
|
|
80
81
|
testOrigen: boolean;
|
|
82
|
+
|
|
83
|
+
@ManyToOne(() => ChannelUser, (channelUser) => channelUser.id, { nullable: true })
|
|
84
|
+
@JoinColumn()
|
|
85
|
+
channelUser: ChannelUser;
|
|
81
86
|
}
|
|
82
87
|
|
|
83
88
|
export default Order;
|
|
@@ -0,0 +1,16 @@
|
|
|
1
|
+
import {MigrationInterface, QueryRunner} from "typeorm";
|
|
2
|
+
|
|
3
|
+
export class orderChannelUser1708039535580 implements MigrationInterface {
|
|
4
|
+
name = 'orderChannelUser1708039535580'
|
|
5
|
+
|
|
6
|
+
public async up(queryRunner: QueryRunner): Promise<void> {
|
|
7
|
+
await queryRunner.query(`ALTER TABLE \`order\` ADD \`channel_user_id\` int NULL`);
|
|
8
|
+
await queryRunner.query(`ALTER TABLE \`order\` ADD CONSTRAINT \`FK_d1254e4dc50ab0aca711d375fb6\` FOREIGN KEY (\`channel_user_id\`) REFERENCES \`channel_user\`(\`id\`) ON DELETE NO ACTION ON UPDATE NO ACTION`);
|
|
9
|
+
}
|
|
10
|
+
|
|
11
|
+
public async down(queryRunner: QueryRunner): Promise<void> {
|
|
12
|
+
await queryRunner.query(`ALTER TABLE \`order\` DROP FOREIGN KEY \`FK_d1254e4dc50ab0aca711d375fb6\``);
|
|
13
|
+
await queryRunner.query(`ALTER TABLE \`order\` DROP COLUMN \`channel_user_id\``);
|
|
14
|
+
}
|
|
15
|
+
|
|
16
|
+
}
|