@reachu/database 1.0.193 → 1.0.194
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/ChannelUserProducts.d.ts +2 -23
- package/dist/entity/ChannelUserProducts.js +8 -88
- package/dist/entity/ChannelUserProducts.js.map +1 -1
- package/dist/migrations/1727356029415-channelUserProducts-v2.d.ts +6 -0
- package/dist/migrations/1727356029415-channelUserProducts-v2.js +75 -0
- package/dist/migrations/1727356029415-channelUserProducts-v2.js.map +1 -0
- package/dist/tsconfig.tsbuildinfo +27 -7
- package/package.json +3 -3
- package/src/entity/ChannelUserProducts.ts +7 -68
- package/src/migrations/1727356029415-channelUserProducts-v2.ts +60 -0
|
@@ -1,13 +1,14 @@
|
|
|
1
1
|
import AuditedModel from './AuditedModel';
|
|
2
2
|
import ChannelUser from './ChannelUser';
|
|
3
3
|
import { Price } from './Price.entity';
|
|
4
|
+
import Collection from './Collection';
|
|
4
5
|
export default class ChannelUserProducts extends AuditedModel {
|
|
5
6
|
deletedAt: Date;
|
|
6
7
|
id: number;
|
|
7
8
|
channelUser: ChannelUser;
|
|
8
9
|
productId?: number;
|
|
10
|
+
collection: Collection;
|
|
9
11
|
title?: string;
|
|
10
|
-
status: number;
|
|
11
12
|
description?: string;
|
|
12
13
|
publicPrice?: number;
|
|
13
14
|
price: Price;
|
|
@@ -16,30 +17,8 @@ export default class ChannelUserProducts extends AuditedModel {
|
|
|
16
17
|
sku?: string;
|
|
17
18
|
barcode?: string;
|
|
18
19
|
quantity?: number;
|
|
19
|
-
allowPurchaseOutOfStock: boolean;
|
|
20
|
-
weight?: number;
|
|
21
|
-
shipTo?: string;
|
|
22
|
-
width?: number;
|
|
23
|
-
height?: number;
|
|
24
|
-
depth?: number;
|
|
25
20
|
optionsEnabled: boolean;
|
|
26
21
|
digital: boolean;
|
|
27
22
|
origin?: string;
|
|
28
|
-
originId?: string;
|
|
29
|
-
originUrl?: string;
|
|
30
|
-
originVariantId?: string;
|
|
31
23
|
brand?: string;
|
|
32
|
-
totalOrders?: string;
|
|
33
|
-
totalImports?: string;
|
|
34
|
-
imported?: number;
|
|
35
|
-
shopifyId?: string;
|
|
36
|
-
wooId?: string;
|
|
37
|
-
userIsSender?: string;
|
|
38
|
-
userIsReceiver?: string;
|
|
39
|
-
rate: number;
|
|
40
|
-
migrated: boolean;
|
|
41
|
-
active: boolean;
|
|
42
|
-
revenue: number;
|
|
43
|
-
testOrigen: boolean;
|
|
44
|
-
demo: boolean;
|
|
45
24
|
}
|
|
@@ -16,6 +16,7 @@ const typeorm_1 = require("typeorm");
|
|
|
16
16
|
const AuditedModel_1 = __importDefault(require("./AuditedModel"));
|
|
17
17
|
const ChannelUser_1 = __importDefault(require("./ChannelUser"));
|
|
18
18
|
const Price_entity_1 = require("./Price.entity");
|
|
19
|
+
const Collection_1 = __importDefault(require("./Collection"));
|
|
19
20
|
let ChannelUserProducts = class ChannelUserProducts extends AuditedModel_1.default {
|
|
20
21
|
};
|
|
21
22
|
__decorate([
|
|
@@ -37,14 +38,17 @@ __decorate([
|
|
|
37
38
|
typeorm_1.Column('integer', { nullable: true }),
|
|
38
39
|
__metadata("design:type", Number)
|
|
39
40
|
], ChannelUserProducts.prototype, "productId", void 0);
|
|
41
|
+
__decorate([
|
|
42
|
+
typeorm_1.ManyToOne(() => Collection_1.default, (collection) => collection.id, {
|
|
43
|
+
onDelete: 'CASCADE',
|
|
44
|
+
}),
|
|
45
|
+
typeorm_1.JoinColumn(),
|
|
46
|
+
__metadata("design:type", Collection_1.default)
|
|
47
|
+
], ChannelUserProducts.prototype, "collection", void 0);
|
|
40
48
|
__decorate([
|
|
41
49
|
typeorm_1.Column('varchar', { nullable: true }),
|
|
42
50
|
__metadata("design:type", String)
|
|
43
51
|
], ChannelUserProducts.prototype, "title", void 0);
|
|
44
|
-
__decorate([
|
|
45
|
-
typeorm_1.Column('integer', { default: 0 }),
|
|
46
|
-
__metadata("design:type", Number)
|
|
47
|
-
], ChannelUserProducts.prototype, "status", void 0);
|
|
48
52
|
__decorate([
|
|
49
53
|
typeorm_1.Column('text', { nullable: true }),
|
|
50
54
|
__metadata("design:type", String)
|
|
@@ -77,30 +81,6 @@ __decorate([
|
|
|
77
81
|
typeorm_1.Column('integer', { nullable: true }),
|
|
78
82
|
__metadata("design:type", Number)
|
|
79
83
|
], ChannelUserProducts.prototype, "quantity", void 0);
|
|
80
|
-
__decorate([
|
|
81
|
-
typeorm_1.Column('boolean', { default: false }),
|
|
82
|
-
__metadata("design:type", Boolean)
|
|
83
|
-
], ChannelUserProducts.prototype, "allowPurchaseOutOfStock", void 0);
|
|
84
|
-
__decorate([
|
|
85
|
-
typeorm_1.Column('decimal', { precision: 10, scale: 2, nullable: true }),
|
|
86
|
-
__metadata("design:type", Number)
|
|
87
|
-
], ChannelUserProducts.prototype, "weight", void 0);
|
|
88
|
-
__decorate([
|
|
89
|
-
typeorm_1.Column('text', { nullable: true }),
|
|
90
|
-
__metadata("design:type", String)
|
|
91
|
-
], ChannelUserProducts.prototype, "shipTo", void 0);
|
|
92
|
-
__decorate([
|
|
93
|
-
typeorm_1.Column('decimal', { precision: 10, scale: 2, nullable: true }),
|
|
94
|
-
__metadata("design:type", Number)
|
|
95
|
-
], ChannelUserProducts.prototype, "width", void 0);
|
|
96
|
-
__decorate([
|
|
97
|
-
typeorm_1.Column('decimal', { precision: 10, scale: 2, nullable: true }),
|
|
98
|
-
__metadata("design:type", Number)
|
|
99
|
-
], ChannelUserProducts.prototype, "height", void 0);
|
|
100
|
-
__decorate([
|
|
101
|
-
typeorm_1.Column('decimal', { precision: 10, scale: 2, nullable: true }),
|
|
102
|
-
__metadata("design:type", Number)
|
|
103
|
-
], ChannelUserProducts.prototype, "depth", void 0);
|
|
104
84
|
__decorate([
|
|
105
85
|
typeorm_1.Column('boolean', { default: false }),
|
|
106
86
|
__metadata("design:type", Boolean)
|
|
@@ -113,70 +93,10 @@ __decorate([
|
|
|
113
93
|
typeorm_1.Column('varchar', { nullable: true }),
|
|
114
94
|
__metadata("design:type", String)
|
|
115
95
|
], ChannelUserProducts.prototype, "origin", void 0);
|
|
116
|
-
__decorate([
|
|
117
|
-
typeorm_1.Column('varchar', { nullable: true }),
|
|
118
|
-
__metadata("design:type", String)
|
|
119
|
-
], ChannelUserProducts.prototype, "originId", void 0);
|
|
120
|
-
__decorate([
|
|
121
|
-
typeorm_1.Column('varchar', { nullable: true }),
|
|
122
|
-
__metadata("design:type", String)
|
|
123
|
-
], ChannelUserProducts.prototype, "originUrl", void 0);
|
|
124
|
-
__decorate([
|
|
125
|
-
typeorm_1.Column('varchar', { nullable: true }),
|
|
126
|
-
__metadata("design:type", String)
|
|
127
|
-
], ChannelUserProducts.prototype, "originVariantId", void 0);
|
|
128
96
|
__decorate([
|
|
129
97
|
typeorm_1.Column('varchar', { nullable: true }),
|
|
130
98
|
__metadata("design:type", String)
|
|
131
99
|
], ChannelUserProducts.prototype, "brand", void 0);
|
|
132
|
-
__decorate([
|
|
133
|
-
typeorm_1.Column('varchar', { nullable: true, select: false }),
|
|
134
|
-
__metadata("design:type", String)
|
|
135
|
-
], ChannelUserProducts.prototype, "totalOrders", void 0);
|
|
136
|
-
__decorate([
|
|
137
|
-
typeorm_1.Column('varchar', { nullable: true, select: false }),
|
|
138
|
-
__metadata("design:type", String)
|
|
139
|
-
], ChannelUserProducts.prototype, "totalImports", void 0);
|
|
140
|
-
__decorate([
|
|
141
|
-
typeorm_1.Column('integer', { nullable: true, select: false }),
|
|
142
|
-
__metadata("design:type", Number)
|
|
143
|
-
], ChannelUserProducts.prototype, "imported", void 0);
|
|
144
|
-
__decorate([
|
|
145
|
-
typeorm_1.Column('varchar', { nullable: true, select: false }),
|
|
146
|
-
__metadata("design:type", String)
|
|
147
|
-
], ChannelUserProducts.prototype, "shopifyId", void 0);
|
|
148
|
-
__decorate([
|
|
149
|
-
typeorm_1.Column('varchar', { nullable: true, select: false }),
|
|
150
|
-
__metadata("design:type", String)
|
|
151
|
-
], ChannelUserProducts.prototype, "wooId", void 0);
|
|
152
|
-
__decorate([
|
|
153
|
-
typeorm_1.Column('varchar', { nullable: true, select: false }),
|
|
154
|
-
__metadata("design:type", String)
|
|
155
|
-
], ChannelUserProducts.prototype, "userIsSender", void 0);
|
|
156
|
-
__decorate([
|
|
157
|
-
typeorm_1.Column('varchar', { nullable: true, select: false }),
|
|
158
|
-
__metadata("design:type", String)
|
|
159
|
-
], ChannelUserProducts.prototype, "userIsReceiver", void 0);
|
|
160
|
-
__decorate([
|
|
161
|
-
typeorm_1.Column('integer', { default: 0 }),
|
|
162
|
-
__metadata("design:type", Number)
|
|
163
|
-
], ChannelUserProducts.prototype, "rate", void 0);
|
|
164
|
-
__decorate([
|
|
165
|
-
typeorm_1.Column('boolean', { default: false }),
|
|
166
|
-
__metadata("design:type", Boolean)
|
|
167
|
-
], ChannelUserProducts.prototype, "migrated", void 0);
|
|
168
|
-
__decorate([
|
|
169
|
-
typeorm_1.Column('boolean', { default: false }),
|
|
170
|
-
__metadata("design:type", Boolean)
|
|
171
|
-
], ChannelUserProducts.prototype, "active", void 0);
|
|
172
|
-
__decorate([
|
|
173
|
-
typeorm_1.Column('boolean', { default: false }),
|
|
174
|
-
__metadata("design:type", Boolean)
|
|
175
|
-
], ChannelUserProducts.prototype, "testOrigen", void 0);
|
|
176
|
-
__decorate([
|
|
177
|
-
typeorm_1.Column('boolean', { default: false }),
|
|
178
|
-
__metadata("design:type", Boolean)
|
|
179
|
-
], ChannelUserProducts.prototype, "demo", void 0);
|
|
180
100
|
ChannelUserProducts = __decorate([
|
|
181
101
|
typeorm_1.Entity()
|
|
182
102
|
], ChannelUserProducts);
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"ChannelUserProducts.js","sourceRoot":"","sources":["../../src/entity/ChannelUserProducts.ts"],"names":[],"mappings":";;;;;;;;;;;;;;AAAA,qCAOiB;AACjB,kEAA0C;AAC1C,gEAAwC;AACxC,iDAAuC;
|
|
1
|
+
{"version":3,"file":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EAAE,EAAE,EAAE,CAAC;;wDACf;AAGpB;IADC,gBAAM,CAAC,SAAS,EAAE,EAAE,OAAO,EAAE,EAAE,EAAE,QAAQ,EAAE,IAAI,EAAE,CAAC;;iDACrC;AAGd;IADC,gBAAM,CAAC,SAAS,EAAE,EAAE,QAAQ,EAAE,IAAI,EAAE,CAAC;;gDACzB;AAGb;IADC,gBAAM,CAAC,SAAS,EAAE,EAAE,QAAQ,EAAE,IAAI,EAAE,CAAC;;oDACrB;AAGjB;IADC,gBAAM,CAAC,SAAS,EAAE,EAAE,QAAQ,EAAE,IAAI,EAAE,CAAC;;qDACpB;AAGlB;IADC,gBAAM,CAAC,SAAS,EAAE,EAAE,OAAO,EAAE,KAAK,EAAE,CAAC;;2DACd;AAGxB;IADC,gBAAM,CAAC,SAAS,EAAE,EAAE,OAAO,EAAE,KAAK,EAAE,CAAC;;oDACrB;AAGjB;IADC,gBAAM,CAAC,SAAS,EAAE,EAAE,QAAQ,EAAE,IAAI,EAAE,CAAC;;mDACtB;AAGhB;IADC,gBAAM,CAAC,SAAS,EAAE,EAAE,QAAQ,EAAE,IAAI,EAAE,CAAC;;kDACvB;AA3DI,mBAAmB;IADvC,gBAAM,EAAE;GACY,mBAAmB,CA4DvC;kBA5DoB,mBAAmB"}
|
|
@@ -0,0 +1,75 @@
|
|
|
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.channelUserProductsV21727356029415 = void 0;
|
|
13
|
+
class channelUserProductsV21727356029415 {
|
|
14
|
+
constructor() {
|
|
15
|
+
this.name = 'channelUserProductsV21727356029415';
|
|
16
|
+
}
|
|
17
|
+
up(queryRunner) {
|
|
18
|
+
return __awaiter(this, void 0, void 0, function* () {
|
|
19
|
+
yield queryRunner.query(`ALTER TABLE \`channel_user_products\` DROP COLUMN \`status\``);
|
|
20
|
+
yield queryRunner.query(`ALTER TABLE \`channel_user_products\` DROP COLUMN \`allow_purchase_out_of_stock\``);
|
|
21
|
+
yield queryRunner.query(`ALTER TABLE \`channel_user_products\` DROP COLUMN \`weight\``);
|
|
22
|
+
yield queryRunner.query(`ALTER TABLE \`channel_user_products\` DROP COLUMN \`ship_to\``);
|
|
23
|
+
yield queryRunner.query(`ALTER TABLE \`channel_user_products\` DROP COLUMN \`width\``);
|
|
24
|
+
yield queryRunner.query(`ALTER TABLE \`channel_user_products\` DROP COLUMN \`height\``);
|
|
25
|
+
yield queryRunner.query(`ALTER TABLE \`channel_user_products\` DROP COLUMN \`depth\``);
|
|
26
|
+
yield queryRunner.query(`ALTER TABLE \`channel_user_products\` DROP COLUMN \`origin_id\``);
|
|
27
|
+
yield queryRunner.query(`ALTER TABLE \`channel_user_products\` DROP COLUMN \`origin_url\``);
|
|
28
|
+
yield queryRunner.query(`ALTER TABLE \`channel_user_products\` DROP COLUMN \`origin_variant_id\``);
|
|
29
|
+
yield queryRunner.query(`ALTER TABLE \`channel_user_products\` DROP COLUMN \`total_orders\``);
|
|
30
|
+
yield queryRunner.query(`ALTER TABLE \`channel_user_products\` DROP COLUMN \`total_imports\``);
|
|
31
|
+
yield queryRunner.query(`ALTER TABLE \`channel_user_products\` DROP COLUMN \`imported\``);
|
|
32
|
+
yield queryRunner.query(`ALTER TABLE \`channel_user_products\` DROP COLUMN \`shopify_id\``);
|
|
33
|
+
yield queryRunner.query(`ALTER TABLE \`channel_user_products\` DROP COLUMN \`woo_id\``);
|
|
34
|
+
yield queryRunner.query(`ALTER TABLE \`channel_user_products\` DROP COLUMN \`user_is_sender\``);
|
|
35
|
+
yield queryRunner.query(`ALTER TABLE \`channel_user_products\` DROP COLUMN \`user_is_receiver\``);
|
|
36
|
+
yield queryRunner.query(`ALTER TABLE \`channel_user_products\` DROP COLUMN \`rate\``);
|
|
37
|
+
yield queryRunner.query(`ALTER TABLE \`channel_user_products\` DROP COLUMN \`migrated\``);
|
|
38
|
+
yield queryRunner.query(`ALTER TABLE \`channel_user_products\` DROP COLUMN \`active\``);
|
|
39
|
+
yield queryRunner.query(`ALTER TABLE \`channel_user_products\` DROP COLUMN \`test_origen\``);
|
|
40
|
+
yield queryRunner.query(`ALTER TABLE \`channel_user_products\` DROP COLUMN \`demo\``);
|
|
41
|
+
yield queryRunner.query(`ALTER TABLE \`channel_user_products\` ADD \`collection_id\` varchar(10) NULL`);
|
|
42
|
+
yield queryRunner.query(`ALTER TABLE \`channel_user_products\` ADD CONSTRAINT \`FK_6a15e1ba4f071b0fa85f8188756\` FOREIGN KEY (\`collection_id\`) REFERENCES \`collection\`(\`id\`) ON DELETE CASCADE ON UPDATE NO ACTION`);
|
|
43
|
+
});
|
|
44
|
+
}
|
|
45
|
+
down(queryRunner) {
|
|
46
|
+
return __awaiter(this, void 0, void 0, function* () {
|
|
47
|
+
yield queryRunner.query(`ALTER TABLE \`channel_user_products\` DROP FOREIGN KEY \`FK_6a15e1ba4f071b0fa85f8188756\``);
|
|
48
|
+
yield queryRunner.query(`ALTER TABLE \`channel_user_products\` DROP COLUMN \`collection_id\``);
|
|
49
|
+
yield queryRunner.query(`ALTER TABLE \`channel_user_products\` ADD \`demo\` tinyint NOT NULL DEFAULT '0'`);
|
|
50
|
+
yield queryRunner.query(`ALTER TABLE \`channel_user_products\` ADD \`test_origen\` tinyint NOT NULL DEFAULT '0'`);
|
|
51
|
+
yield queryRunner.query(`ALTER TABLE \`channel_user_products\` ADD \`active\` tinyint NOT NULL DEFAULT '0'`);
|
|
52
|
+
yield queryRunner.query(`ALTER TABLE \`channel_user_products\` ADD \`migrated\` tinyint NOT NULL DEFAULT '0'`);
|
|
53
|
+
yield queryRunner.query(`ALTER TABLE \`channel_user_products\` ADD \`rate\` int NOT NULL DEFAULT '0'`);
|
|
54
|
+
yield queryRunner.query(`ALTER TABLE \`channel_user_products\` ADD \`user_is_receiver\` varchar(255) NULL`);
|
|
55
|
+
yield queryRunner.query(`ALTER TABLE \`channel_user_products\` ADD \`user_is_sender\` varchar(255) NULL`);
|
|
56
|
+
yield queryRunner.query(`ALTER TABLE \`channel_user_products\` ADD \`woo_id\` varchar(255) NULL`);
|
|
57
|
+
yield queryRunner.query(`ALTER TABLE \`channel_user_products\` ADD \`shopify_id\` varchar(255) NULL`);
|
|
58
|
+
yield queryRunner.query(`ALTER TABLE \`channel_user_products\` ADD \`imported\` int NULL`);
|
|
59
|
+
yield queryRunner.query(`ALTER TABLE \`channel_user_products\` ADD \`total_imports\` varchar(255) NULL`);
|
|
60
|
+
yield queryRunner.query(`ALTER TABLE \`channel_user_products\` ADD \`total_orders\` varchar(255) NULL`);
|
|
61
|
+
yield queryRunner.query(`ALTER TABLE \`channel_user_products\` ADD \`origin_variant_id\` varchar(255) NULL`);
|
|
62
|
+
yield queryRunner.query(`ALTER TABLE \`channel_user_products\` ADD \`origin_url\` varchar(255) NULL`);
|
|
63
|
+
yield queryRunner.query(`ALTER TABLE \`channel_user_products\` ADD \`origin_id\` varchar(255) NULL`);
|
|
64
|
+
yield queryRunner.query(`ALTER TABLE \`channel_user_products\` ADD \`depth\` decimal(10,2) NULL`);
|
|
65
|
+
yield queryRunner.query(`ALTER TABLE \`channel_user_products\` ADD \`height\` decimal(10,2) NULL`);
|
|
66
|
+
yield queryRunner.query(`ALTER TABLE \`channel_user_products\` ADD \`width\` decimal(10,2) NULL`);
|
|
67
|
+
yield queryRunner.query(`ALTER TABLE \`channel_user_products\` ADD \`ship_to\` text NULL`);
|
|
68
|
+
yield queryRunner.query(`ALTER TABLE \`channel_user_products\` ADD \`weight\` decimal(10,2) NULL`);
|
|
69
|
+
yield queryRunner.query(`ALTER TABLE \`channel_user_products\` ADD \`allow_purchase_out_of_stock\` tinyint NOT NULL DEFAULT '0'`);
|
|
70
|
+
yield queryRunner.query(`ALTER TABLE \`channel_user_products\` ADD \`status\` int NOT NULL DEFAULT '0'`);
|
|
71
|
+
});
|
|
72
|
+
}
|
|
73
|
+
}
|
|
74
|
+
exports.channelUserProductsV21727356029415 = channelUserProductsV21727356029415;
|
|
75
|
+
//# sourceMappingURL=1727356029415-channelUserProducts-v2.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"1727356029415-channelUserProducts-v2.js","sourceRoot":"","sources":["../../src/migrations/1727356029415-channelUserProducts-v2.ts"],"names":[],"mappings":";;;;;;;;;;;;AAEA,MAAa,kCAAkC;IAA/C;QACI,SAAI,GAAG,oCAAoC,CAAA;IAwD/C,CAAC;IAtDgB,EAAE,CAAC,WAAwB;;YACpC,MAAM,WAAW,CAAC,KAAK,CAAC,8DAA8D,CAAC,CAAC;YACxF,MAAM,WAAW,CAAC,KAAK,CAAC,mFAAmF,CAAC,CAAC;YAC7G,MAAM,WAAW,CAAC,KAAK,CAAC,8DAA8D,CAAC,CAAC;YACxF,MAAM,WAAW,CAAC,KAAK,CAAC,+DAA+D,CAAC,CAAC;YACzF,MAAM,WAAW,CAAC,KAAK,CAAC,6DAA6D,CAAC,CAAC;YACvF,MAAM,WAAW,CAAC,KAAK,CAAC,8DAA8D,CAAC,CAAC;YACxF,MAAM,WAAW,CAAC,KAAK,CAAC,6DAA6D,CAAC,CAAC;YACvF,MAAM,WAAW,CAAC,KAAK,CAAC,iEAAiE,CAAC,CAAC;YAC3F,MAAM,WAAW,CAAC,KAAK,CAAC,kEAAkE,CAAC,CAAC;YAC5F,MAAM,WAAW,CAAC,KAAK,CAAC,yEAAyE,CAAC,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2239
|
+
"../node_modules/@types/send/node_modules/@types/mime/index.d.ts": {
|
|
2240
2240
|
"version": "d3f2d715f57df3f04bf7b16dde01dec10366f64fce44503c92b8f78f614c1769",
|
|
2241
2241
|
"signature": "d3f2d715f57df3f04bf7b16dde01dec10366f64fce44503c92b8f78f614c1769",
|
|
2242
2242
|
"affectsGlobalScope": false
|
|
@@ -2792,8 +2792,8 @@
|
|
|
2792
2792
|
"affectsGlobalScope": false
|
|
2793
2793
|
},
|
|
2794
2794
|
"../src/entity/channeluserproducts.ts": {
|
|
2795
|
-
"version": "
|
|
2796
|
-
"signature": "
|
|
2795
|
+
"version": "d7ca758953476e1c828cc6ef09e961e00d7d4f6e378fbc9e6921a715991669c2",
|
|
2796
|
+
"signature": "fb07ff74273a5ca076b076db83768cc6c79e96d96541192487ff374470ab9186",
|
|
2797
2797
|
"affectsGlobalScope": false
|
|
2798
2798
|
},
|
|
2799
2799
|
"../src/entity/index.ts": {
|
|
@@ -3816,6 +3816,11 @@
|
|
|
3816
3816
|
"signature": "ee8f77f1018dfc031f2a84a22287c9f062c9e257563f83b486bd5e9f3cb009a1",
|
|
3817
3817
|
"affectsGlobalScope": false
|
|
3818
3818
|
},
|
|
3819
|
+
"../src/migrations/1727356029415-channeluserproducts-v2.ts": {
|
|
3820
|
+
"version": "a248fd292deb2256ccf72e87fda99872aa3e8a9aed44ad49f7cbf45cbf959208",
|
|
3821
|
+
"signature": "00f56855cf75c60fc023b38b5ab47f1ae0339d105c32b756df2871a09b85d9ba",
|
|
3822
|
+
"affectsGlobalScope": false
|
|
3823
|
+
},
|
|
3819
3824
|
"../src/migrations/execute/index.ts": {
|
|
3820
3825
|
"version": "8b5bf13d095aeb57afd593adf3d799681176a13c327e2f77e0028e178c4ee3b9",
|
|
3821
3826
|
"signature": "8e609bb71c20b858c77f0e9f90bb1319db8477b13f9f965f1a1e18524bf50881",
|
|
@@ -3916,6 +3921,11 @@
|
|
|
3916
3921
|
"signature": "f3d8c757e148ad968f0d98697987db363070abada5f503da3c06aefd9d4248c1",
|
|
3917
3922
|
"affectsGlobalScope": false
|
|
3918
3923
|
},
|
|
3924
|
+
"../node_modules/@types/mime/index.d.ts": {
|
|
3925
|
+
"version": "d3f2d715f57df3f04bf7b16dde01dec10366f64fce44503c92b8f78f614c1769",
|
|
3926
|
+
"signature": "d3f2d715f57df3f04bf7b16dde01dec10366f64fce44503c92b8f78f614c1769",
|
|
3927
|
+
"affectsGlobalScope": false
|
|
3928
|
+
},
|
|
3919
3929
|
"../node_modules/@types/prettier/index.d.ts": {
|
|
3920
3930
|
"version": "d88a5e779faf033be3d52142a04fbe1cb96009868e3bbdd296b2bc6c59e06c0e",
|
|
3921
3931
|
"signature": "d88a5e779faf033be3d52142a04fbe1cb96009868e3bbdd296b2bc6c59e06c0e",
|
|
@@ -4238,10 +4248,10 @@
|
|
|
4238
4248
|
"../node_modules/@types/node/stream.d.ts"
|
|
4239
4249
|
],
|
|
4240
4250
|
"../node_modules/@types/send/index.d.ts": [
|
|
4241
|
-
"../node_modules/@types/mime/index.d.ts",
|
|
4242
4251
|
"../node_modules/@types/node/fs.d.ts",
|
|
4243
4252
|
"../node_modules/@types/node/index.d.ts",
|
|
4244
|
-
"../node_modules/@types/node/stream.d.ts"
|
|
4253
|
+
"../node_modules/@types/node/stream.d.ts",
|
|
4254
|
+
"../node_modules/@types/send/node_modules/@types/mime/index.d.ts"
|
|
4245
4255
|
],
|
|
4246
4256
|
"../node_modules/@types/serve-static/index.d.ts": [
|
|
4247
4257
|
"../node_modules/@types/http-errors/index.d.ts",
|
|
@@ -5826,6 +5836,7 @@
|
|
|
5826
5836
|
"../node_modules/typeorm/index.d.ts",
|
|
5827
5837
|
"../src/entity/auditedmodel.ts",
|
|
5828
5838
|
"../src/entity/channeluser.ts",
|
|
5839
|
+
"../src/entity/collection.ts",
|
|
5829
5840
|
"../src/entity/price.entity.ts"
|
|
5830
5841
|
],
|
|
5831
5842
|
"../src/entity/channeluserproductsync.ts": [
|
|
@@ -7032,6 +7043,9 @@
|
|
|
7032
7043
|
"../src/migrations/1727281200911-channeluserproducts.ts": [
|
|
7033
7044
|
"../node_modules/typeorm/index.d.ts"
|
|
7034
7045
|
],
|
|
7046
|
+
"../src/migrations/1727356029415-channeluserproducts-v2.ts": [
|
|
7047
|
+
"../node_modules/typeorm/index.d.ts"
|
|
7048
|
+
],
|
|
7035
7049
|
"../src/migrations/execute/index.ts": [
|
|
7036
7050
|
"../src/config/connect.ts"
|
|
7037
7051
|
],
|
|
@@ -7481,10 +7495,10 @@
|
|
|
7481
7495
|
"../node_modules/@types/node/stream.d.ts"
|
|
7482
7496
|
],
|
|
7483
7497
|
"../node_modules/@types/send/index.d.ts": [
|
|
7484
|
-
"../node_modules/@types/mime/index.d.ts",
|
|
7485
7498
|
"../node_modules/@types/node/fs.d.ts",
|
|
7486
7499
|
"../node_modules/@types/node/index.d.ts",
|
|
7487
|
-
"../node_modules/@types/node/stream.d.ts"
|
|
7500
|
+
"../node_modules/@types/node/stream.d.ts",
|
|
7501
|
+
"../node_modules/@types/send/node_modules/@types/mime/index.d.ts"
|
|
7488
7502
|
],
|
|
7489
7503
|
"../node_modules/@types/serve-static/index.d.ts": [
|
|
7490
7504
|
"../node_modules/@types/http-errors/index.d.ts",
|
|
@@ -9047,6 +9061,7 @@
|
|
|
9047
9061
|
"../src/entity/channeluserproducts.ts": [
|
|
9048
9062
|
"../src/entity/auditedmodel.ts",
|
|
9049
9063
|
"../src/entity/channeluser.ts",
|
|
9064
|
+
"../src/entity/collection.ts",
|
|
9050
9065
|
"../src/entity/price.entity.ts"
|
|
9051
9066
|
],
|
|
9052
9067
|
"../src/entity/channeluserproductsync.ts": [
|
|
@@ -10100,6 +10115,9 @@
|
|
|
10100
10115
|
"../src/migrations/1727281200911-channeluserproducts.ts": [
|
|
10101
10116
|
"../node_modules/typeorm/index.d.ts"
|
|
10102
10117
|
],
|
|
10118
|
+
"../src/migrations/1727356029415-channeluserproducts-v2.ts": [
|
|
10119
|
+
"../node_modules/typeorm/index.d.ts"
|
|
10120
|
+
],
|
|
10103
10121
|
"../src/migrations/index.ts": [
|
|
10104
10122
|
"../src/migrations/1628474597284-initialschema.ts",
|
|
10105
10123
|
"../src/migrations/1630077596132-removemangopay.ts",
|
|
@@ -10353,6 +10371,7 @@
|
|
|
10353
10371
|
"../node_modules/@types/qs/index.d.ts",
|
|
10354
10372
|
"../node_modules/@types/range-parser/index.d.ts",
|
|
10355
10373
|
"../node_modules/@types/send/index.d.ts",
|
|
10374
|
+
"../node_modules/@types/send/node_modules/@types/mime/index.d.ts",
|
|
10356
10375
|
"../node_modules/@types/serve-static/index.d.ts",
|
|
10357
10376
|
"../node_modules/@types/stack-utils/index.d.ts",
|
|
10358
10377
|
"../node_modules/@types/yargs-parser/index.d.ts",
|
|
@@ -11027,6 +11046,7 @@
|
|
|
11027
11046
|
"../src/migrations/1718892353107-add_channel_user_discount.ts",
|
|
11028
11047
|
"../src/migrations/1719530172075-woopricesincludetax.ts",
|
|
11029
11048
|
"../src/migrations/1727281200911-channeluserproducts.ts",
|
|
11049
|
+
"../src/migrations/1727356029415-channeluserproducts-v2.ts",
|
|
11030
11050
|
"../src/migrations/execute/index.ts",
|
|
11031
11051
|
"../src/migrations/index.ts",
|
|
11032
11052
|
"../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.194",
|
|
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.194",
|
|
25
|
+
"@reachu/utils": "1.0.194",
|
|
26
26
|
"dotenv": "8.0.0",
|
|
27
27
|
"express": "4.17.1",
|
|
28
28
|
"mysql2": "1.5.2",
|
|
@@ -9,6 +9,7 @@ import {
|
|
|
9
9
|
import AuditedModel from './AuditedModel';
|
|
10
10
|
import ChannelUser from './ChannelUser';
|
|
11
11
|
import { Price } from './Price.entity';
|
|
12
|
+
import Collection from './Collection';
|
|
12
13
|
|
|
13
14
|
@Entity()
|
|
14
15
|
export default class ChannelUserProducts extends AuditedModel {
|
|
@@ -27,12 +28,15 @@ export default class ChannelUserProducts extends AuditedModel {
|
|
|
27
28
|
@Column('integer', { nullable: true })
|
|
28
29
|
productId?: number;
|
|
29
30
|
|
|
31
|
+
@ManyToOne(() => Collection, (collection) => collection.id, {
|
|
32
|
+
onDelete: 'CASCADE',
|
|
33
|
+
})
|
|
34
|
+
@JoinColumn()
|
|
35
|
+
collection: Collection;
|
|
36
|
+
|
|
30
37
|
@Column('varchar', { nullable: true })
|
|
31
38
|
title?: string;
|
|
32
39
|
|
|
33
|
-
@Column('integer', { default: 0 })
|
|
34
|
-
status: number;
|
|
35
|
-
|
|
36
40
|
@Column('text', { nullable: true })
|
|
37
41
|
description?: string;
|
|
38
42
|
|
|
@@ -57,24 +61,6 @@ export default class ChannelUserProducts extends AuditedModel {
|
|
|
57
61
|
@Column('integer', { nullable: true })
|
|
58
62
|
quantity?: number;
|
|
59
63
|
|
|
60
|
-
@Column('boolean', { default: false })
|
|
61
|
-
allowPurchaseOutOfStock: boolean;
|
|
62
|
-
|
|
63
|
-
@Column('decimal', { precision: 10, scale: 2, nullable: true })
|
|
64
|
-
weight?: number;
|
|
65
|
-
|
|
66
|
-
@Column('text', { nullable: true })
|
|
67
|
-
shipTo?: string;
|
|
68
|
-
|
|
69
|
-
@Column('decimal', { precision: 10, scale: 2, nullable: true })
|
|
70
|
-
width?: number;
|
|
71
|
-
|
|
72
|
-
@Column('decimal', { precision: 10, scale: 2, nullable: true })
|
|
73
|
-
height?: number;
|
|
74
|
-
|
|
75
|
-
@Column('decimal', { precision: 10, scale: 2, nullable: true })
|
|
76
|
-
depth?: number;
|
|
77
|
-
|
|
78
64
|
@Column('boolean', { default: false })
|
|
79
65
|
optionsEnabled: boolean;
|
|
80
66
|
|
|
@@ -84,53 +70,6 @@ export default class ChannelUserProducts extends AuditedModel {
|
|
|
84
70
|
@Column('varchar', { nullable: true })
|
|
85
71
|
origin?: string;
|
|
86
72
|
|
|
87
|
-
@Column('varchar', { nullable: true })
|
|
88
|
-
originId?: string;
|
|
89
|
-
|
|
90
|
-
@Column('varchar', { nullable: true })
|
|
91
|
-
originUrl?: string;
|
|
92
|
-
|
|
93
|
-
@Column('varchar', { nullable: true })
|
|
94
|
-
originVariantId?: string;
|
|
95
|
-
|
|
96
73
|
@Column('varchar', { nullable: true })
|
|
97
74
|
brand?: string;
|
|
98
|
-
|
|
99
|
-
@Column('varchar', { nullable: true, select: false })
|
|
100
|
-
totalOrders?: string;
|
|
101
|
-
|
|
102
|
-
@Column('varchar', { nullable: true, select: false })
|
|
103
|
-
totalImports?: string;
|
|
104
|
-
|
|
105
|
-
@Column('integer', { nullable: true, select: false })
|
|
106
|
-
imported?: number;
|
|
107
|
-
|
|
108
|
-
@Column('varchar', { nullable: true, select: false })
|
|
109
|
-
shopifyId?: string;
|
|
110
|
-
|
|
111
|
-
@Column('varchar', { nullable: true, select: false })
|
|
112
|
-
wooId?: string;
|
|
113
|
-
|
|
114
|
-
@Column('varchar', { nullable: true, select: false })
|
|
115
|
-
userIsSender?: string;
|
|
116
|
-
|
|
117
|
-
@Column('varchar', { nullable: true, select: false })
|
|
118
|
-
userIsReceiver?: string;
|
|
119
|
-
|
|
120
|
-
@Column('integer', { default: 0 })
|
|
121
|
-
rate: number;
|
|
122
|
-
|
|
123
|
-
@Column('boolean', { default: false })
|
|
124
|
-
migrated: boolean;
|
|
125
|
-
|
|
126
|
-
@Column('boolean', { default: false })
|
|
127
|
-
active: boolean;
|
|
128
|
-
|
|
129
|
-
revenue: number;
|
|
130
|
-
|
|
131
|
-
@Column('boolean', { default: false })
|
|
132
|
-
testOrigen: boolean;
|
|
133
|
-
|
|
134
|
-
@Column('boolean', { default: false })
|
|
135
|
-
demo: boolean;
|
|
136
75
|
}
|
|
@@ -0,0 +1,60 @@
|
|
|
1
|
+
import {MigrationInterface, QueryRunner} from "typeorm";
|
|
2
|
+
|
|
3
|
+
export class channelUserProductsV21727356029415 implements MigrationInterface {
|
|
4
|
+
name = 'channelUserProductsV21727356029415'
|
|
5
|
+
|
|
6
|
+
public async up(queryRunner: QueryRunner): Promise<void> {
|
|
7
|
+
await queryRunner.query(`ALTER TABLE \`channel_user_products\` DROP COLUMN \`status\``);
|
|
8
|
+
await queryRunner.query(`ALTER TABLE \`channel_user_products\` DROP COLUMN \`allow_purchase_out_of_stock\``);
|
|
9
|
+
await queryRunner.query(`ALTER TABLE \`channel_user_products\` DROP COLUMN \`weight\``);
|
|
10
|
+
await queryRunner.query(`ALTER TABLE \`channel_user_products\` DROP COLUMN \`ship_to\``);
|
|
11
|
+
await queryRunner.query(`ALTER TABLE \`channel_user_products\` DROP COLUMN \`width\``);
|
|
12
|
+
await queryRunner.query(`ALTER TABLE \`channel_user_products\` DROP COLUMN \`height\``);
|
|
13
|
+
await queryRunner.query(`ALTER TABLE \`channel_user_products\` DROP COLUMN \`depth\``);
|
|
14
|
+
await queryRunner.query(`ALTER TABLE \`channel_user_products\` DROP COLUMN \`origin_id\``);
|
|
15
|
+
await queryRunner.query(`ALTER TABLE \`channel_user_products\` DROP COLUMN \`origin_url\``);
|
|
16
|
+
await queryRunner.query(`ALTER TABLE \`channel_user_products\` DROP COLUMN \`origin_variant_id\``);
|
|
17
|
+
await queryRunner.query(`ALTER TABLE \`channel_user_products\` DROP COLUMN \`total_orders\``);
|
|
18
|
+
await queryRunner.query(`ALTER TABLE \`channel_user_products\` DROP COLUMN \`total_imports\``);
|
|
19
|
+
await queryRunner.query(`ALTER TABLE \`channel_user_products\` DROP COLUMN \`imported\``);
|
|
20
|
+
await queryRunner.query(`ALTER TABLE \`channel_user_products\` DROP COLUMN \`shopify_id\``);
|
|
21
|
+
await queryRunner.query(`ALTER TABLE \`channel_user_products\` DROP COLUMN \`woo_id\``);
|
|
22
|
+
await queryRunner.query(`ALTER TABLE \`channel_user_products\` DROP COLUMN \`user_is_sender\``);
|
|
23
|
+
await queryRunner.query(`ALTER TABLE \`channel_user_products\` DROP COLUMN \`user_is_receiver\``);
|
|
24
|
+
await queryRunner.query(`ALTER TABLE \`channel_user_products\` DROP COLUMN \`rate\``);
|
|
25
|
+
await queryRunner.query(`ALTER TABLE \`channel_user_products\` DROP COLUMN \`migrated\``);
|
|
26
|
+
await queryRunner.query(`ALTER TABLE \`channel_user_products\` DROP COLUMN \`active\``);
|
|
27
|
+
await queryRunner.query(`ALTER TABLE \`channel_user_products\` DROP COLUMN \`test_origen\``);
|
|
28
|
+
await queryRunner.query(`ALTER TABLE \`channel_user_products\` DROP COLUMN \`demo\``);
|
|
29
|
+
await queryRunner.query(`ALTER TABLE \`channel_user_products\` ADD \`collection_id\` varchar(10) NULL`);
|
|
30
|
+
await queryRunner.query(`ALTER TABLE \`channel_user_products\` ADD CONSTRAINT \`FK_6a15e1ba4f071b0fa85f8188756\` FOREIGN KEY (\`collection_id\`) REFERENCES \`collection\`(\`id\`) ON DELETE CASCADE ON UPDATE NO ACTION`);
|
|
31
|
+
}
|
|
32
|
+
|
|
33
|
+
public async down(queryRunner: QueryRunner): Promise<void> {
|
|
34
|
+
await queryRunner.query(`ALTER TABLE \`channel_user_products\` DROP FOREIGN KEY \`FK_6a15e1ba4f071b0fa85f8188756\``);
|
|
35
|
+
await queryRunner.query(`ALTER TABLE \`channel_user_products\` DROP COLUMN \`collection_id\``);
|
|
36
|
+
await queryRunner.query(`ALTER TABLE \`channel_user_products\` ADD \`demo\` tinyint NOT NULL DEFAULT '0'`);
|
|
37
|
+
await queryRunner.query(`ALTER TABLE \`channel_user_products\` ADD \`test_origen\` tinyint NOT NULL DEFAULT '0'`);
|
|
38
|
+
await queryRunner.query(`ALTER TABLE \`channel_user_products\` ADD \`active\` tinyint NOT NULL DEFAULT '0'`);
|
|
39
|
+
await queryRunner.query(`ALTER TABLE \`channel_user_products\` ADD \`migrated\` tinyint NOT NULL DEFAULT '0'`);
|
|
40
|
+
await queryRunner.query(`ALTER TABLE \`channel_user_products\` ADD \`rate\` int NOT NULL DEFAULT '0'`);
|
|
41
|
+
await queryRunner.query(`ALTER TABLE \`channel_user_products\` ADD \`user_is_receiver\` varchar(255) NULL`);
|
|
42
|
+
await queryRunner.query(`ALTER TABLE \`channel_user_products\` ADD \`user_is_sender\` varchar(255) NULL`);
|
|
43
|
+
await queryRunner.query(`ALTER TABLE \`channel_user_products\` ADD \`woo_id\` varchar(255) NULL`);
|
|
44
|
+
await queryRunner.query(`ALTER TABLE \`channel_user_products\` ADD \`shopify_id\` varchar(255) NULL`);
|
|
45
|
+
await queryRunner.query(`ALTER TABLE \`channel_user_products\` ADD \`imported\` int NULL`);
|
|
46
|
+
await queryRunner.query(`ALTER TABLE \`channel_user_products\` ADD \`total_imports\` varchar(255) NULL`);
|
|
47
|
+
await queryRunner.query(`ALTER TABLE \`channel_user_products\` ADD \`total_orders\` varchar(255) NULL`);
|
|
48
|
+
await queryRunner.query(`ALTER TABLE \`channel_user_products\` ADD \`origin_variant_id\` varchar(255) NULL`);
|
|
49
|
+
await queryRunner.query(`ALTER TABLE \`channel_user_products\` ADD \`origin_url\` varchar(255) NULL`);
|
|
50
|
+
await queryRunner.query(`ALTER TABLE \`channel_user_products\` ADD \`origin_id\` varchar(255) NULL`);
|
|
51
|
+
await queryRunner.query(`ALTER TABLE \`channel_user_products\` ADD \`depth\` decimal(10,2) NULL`);
|
|
52
|
+
await queryRunner.query(`ALTER TABLE \`channel_user_products\` ADD \`height\` decimal(10,2) NULL`);
|
|
53
|
+
await queryRunner.query(`ALTER TABLE \`channel_user_products\` ADD \`width\` decimal(10,2) NULL`);
|
|
54
|
+
await queryRunner.query(`ALTER TABLE \`channel_user_products\` ADD \`ship_to\` text NULL`);
|
|
55
|
+
await queryRunner.query(`ALTER TABLE \`channel_user_products\` ADD \`weight\` decimal(10,2) NULL`);
|
|
56
|
+
await queryRunner.query(`ALTER TABLE \`channel_user_products\` ADD \`allow_purchase_out_of_stock\` tinyint NOT NULL DEFAULT '0'`);
|
|
57
|
+
await queryRunner.query(`ALTER TABLE \`channel_user_products\` ADD \`status\` int NOT NULL DEFAULT '0'`);
|
|
58
|
+
}
|
|
59
|
+
|
|
60
|
+
}
|