@rytass/wms-module-core 0.2.0 → 0.3.0
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/README.md +2 -2
- package/index.cjs.js +825 -775
- package/index.js +1 -1
- package/lib/core.module.js +7 -1
- package/lib/events/index.d.ts +2 -2
- package/lib/events/stock-change.subscriber.d.ts +11 -2
- package/lib/events/stock-change.subscriber.js +49 -4
- package/lib/events/wms-event.tokens.d.ts +4 -0
- package/lib/events/wms-event.tokens.js +5 -1
- package/lib/events/wms-event.types.d.ts +33 -1
- package/lib/models/models.module.js +1 -6
- package/lib/typings/core-module-options.d.ts +7 -0
- package/package.json +1 -1
package/index.cjs.js
CHANGED
|
@@ -3,10 +3,10 @@
|
|
|
3
3
|
var tslib = require('tslib');
|
|
4
4
|
var common = require('@nestjs/common');
|
|
5
5
|
var wmsBaseNestjsModule = require('@rytass/wms-base-nestjs-module');
|
|
6
|
-
var typeorm = require('@nestjs/typeorm');
|
|
6
|
+
var typeorm$1 = require('@nestjs/typeorm');
|
|
7
7
|
var node_async_hooks = require('node:async_hooks');
|
|
8
|
-
var typeorm$1 = require('typeorm');
|
|
9
8
|
var warehouseMap_entity = require('@rytass/wms-base-nestjs-module/models/warehouse-map.entity');
|
|
9
|
+
var typeorm = require('typeorm');
|
|
10
10
|
var luxon = require('luxon');
|
|
11
11
|
|
|
12
12
|
/**
|
|
@@ -52,166 +52,6 @@ exports.WmsEventCollector = tslib.__decorate([
|
|
|
52
52
|
common.Injectable()
|
|
53
53
|
], exports.WmsEventCollector);
|
|
54
54
|
|
|
55
|
-
exports.StockStatus = void 0;
|
|
56
|
-
(function (StockStatus) {
|
|
57
|
-
StockStatus["PENDING_INSPECTION"] = "PENDING_INSPECTION";
|
|
58
|
-
StockStatus["INSPECTION_FAILED"] = "INSPECTION_FAILED";
|
|
59
|
-
StockStatus["HELD"] = "HELD";
|
|
60
|
-
StockStatus["IN_TRANSFER"] = "IN_TRANSFER";
|
|
61
|
-
StockStatus["IN_SHIPMENT"] = "IN_SHIPMENT";
|
|
62
|
-
StockStatus["ALLOCATED"] = "ALLOCATED";
|
|
63
|
-
StockStatus["VENDOR_INVENTORY"] = "VENDOR_INVENTORY";
|
|
64
|
-
StockStatus["CUSTOMER_INVENTORY"] = "CUSTOMER_INVENTORY";
|
|
65
|
-
StockStatus["FREE"] = "FREE";
|
|
66
|
-
})(exports.StockStatus || (exports.StockStatus = {}));
|
|
67
|
-
exports.ChangeType = void 0;
|
|
68
|
-
(function (ChangeType) {
|
|
69
|
-
// receive-inventory-order-change.entity.ts
|
|
70
|
-
ChangeType["RECEIVED"] = "RECEIVED";
|
|
71
|
-
// ship-inventory-order-change.entity.ts, change > 0
|
|
72
|
-
ChangeType["IN_SHIPMENT"] = "IN_SHIPMENT";
|
|
73
|
-
// ship-inventory-order-change.entity.ts, change < 0
|
|
74
|
-
ChangeType["SHIPPED"] = "SHIPPED";
|
|
75
|
-
// transfer-order-change.entity.ts, change > 0
|
|
76
|
-
ChangeType["IN_TRANSFER"] = "IN_TRANSFER";
|
|
77
|
-
// transfer-order-change.entity.ts, change < 0
|
|
78
|
-
ChangeType["TRANSFERRED"] = "TRANSFERRED";
|
|
79
|
-
// vendor-inventory-change.entity.ts, change > 0
|
|
80
|
-
ChangeType["VENDOR_TRANSFERRED"] = "VENDOR_TRANSFERRED";
|
|
81
|
-
// vendor-inventory-change.entity.ts, change < 0
|
|
82
|
-
ChangeType["VENDOR_RETURNED"] = "VENDOR_RETURNED";
|
|
83
|
-
// hold-inventory-order-change.entity.ts, change > 0
|
|
84
|
-
ChangeType["HELD"] = "HELD";
|
|
85
|
-
// hold-inventory-order-change.entity.ts, change < 0
|
|
86
|
-
ChangeType["RELEASED"] = "RELEASED";
|
|
87
|
-
// customer-inventory-change.entity.ts, change > 0
|
|
88
|
-
ChangeType["CUSTOMER_HELD"] = "CUSTOMER_HELD";
|
|
89
|
-
// customer-inventory-change.entity.ts, change < 0
|
|
90
|
-
ChangeType["CUSTOMER_RETURNED"] = "CUSTOMER_RETURNED";
|
|
91
|
-
// split-ivnentory-change.entity.ts
|
|
92
|
-
ChangeType["SPLITTED"] = "SPLITTED";
|
|
93
|
-
// merge-inventory-change.entity.ts
|
|
94
|
-
ChangeType["MERGED"] = "MERGED";
|
|
95
|
-
// allocate-inventory-change.entity.ts, change > 0
|
|
96
|
-
ChangeType["ALLOCATED"] = "ALLOCATED";
|
|
97
|
-
// allocate-inventory-change.entity.ts, change < 0
|
|
98
|
-
ChangeType["DEALLOCATED"] = "DEALLOCATED";
|
|
99
|
-
// reclassify-inventory-order-change.entity.ts
|
|
100
|
-
ChangeType["RECLASSIFIED"] = "RECLASSIFIED";
|
|
101
|
-
// scrape-order-change.entity.ts
|
|
102
|
-
ChangeType["SCRAPED"] = "SCRAPED";
|
|
103
|
-
})(exports.ChangeType || (exports.ChangeType = {}));
|
|
104
|
-
|
|
105
|
-
/**
|
|
106
|
-
* Resolve the `ChangeType` for a change table. Tables whose semantics depend on
|
|
107
|
-
* the sign of `quantityChanged` (ship / transfer / vendor / customer / hold /
|
|
108
|
-
* allocate) branch on it; the rest are fixed.
|
|
109
|
-
*/
|
|
110
|
-
const TABLE_TO_CHANGE_TYPE = new Map([
|
|
111
|
-
['receive_inventory_order_changes', () => exports.ChangeType.RECEIVED],
|
|
112
|
-
[
|
|
113
|
-
'ship_inventory_order_changes',
|
|
114
|
-
(q) => (q > 0 ? exports.ChangeType.IN_SHIPMENT : exports.ChangeType.SHIPPED),
|
|
115
|
-
],
|
|
116
|
-
[
|
|
117
|
-
'transfer_order_changes',
|
|
118
|
-
(q) => (q > 0 ? exports.ChangeType.IN_TRANSFER : exports.ChangeType.TRANSFERRED),
|
|
119
|
-
],
|
|
120
|
-
[
|
|
121
|
-
'transfer_vendor_order_changes',
|
|
122
|
-
(q) => q > 0 ? exports.ChangeType.VENDOR_TRANSFERRED : exports.ChangeType.VENDOR_RETURNED,
|
|
123
|
-
],
|
|
124
|
-
[
|
|
125
|
-
'transfer_customer_order_changes',
|
|
126
|
-
(q) => q > 0 ? exports.ChangeType.CUSTOMER_HELD : exports.ChangeType.CUSTOMER_RETURNED,
|
|
127
|
-
],
|
|
128
|
-
[
|
|
129
|
-
'hold_inventory_order_changes',
|
|
130
|
-
(q) => (q > 0 ? exports.ChangeType.HELD : exports.ChangeType.RELEASED),
|
|
131
|
-
],
|
|
132
|
-
[
|
|
133
|
-
'allocate_inventory_order_changes',
|
|
134
|
-
(q) => (q > 0 ? exports.ChangeType.ALLOCATED : exports.ChangeType.DEALLOCATED),
|
|
135
|
-
],
|
|
136
|
-
['split_batch_order_changes', () => exports.ChangeType.SPLITTED],
|
|
137
|
-
['merge_batch_order_changes', () => exports.ChangeType.MERGED],
|
|
138
|
-
['reclassify_inventory_order_changes', () => exports.ChangeType.RECLASSIFIED],
|
|
139
|
-
['scrape_order_changes', () => exports.ChangeType.SCRAPED],
|
|
140
|
-
]);
|
|
141
|
-
const CHANGE_TYPE_TO_EVENT = {
|
|
142
|
-
[exports.ChangeType.RECEIVED]: 'stock.received',
|
|
143
|
-
[exports.ChangeType.IN_SHIPMENT]: 'stock.in-shipment',
|
|
144
|
-
[exports.ChangeType.SHIPPED]: 'stock.shipped',
|
|
145
|
-
[exports.ChangeType.IN_TRANSFER]: 'stock.in-transfer',
|
|
146
|
-
[exports.ChangeType.TRANSFERRED]: 'stock.transferred',
|
|
147
|
-
[exports.ChangeType.VENDOR_TRANSFERRED]: 'stock.vendor-transferred',
|
|
148
|
-
[exports.ChangeType.VENDOR_RETURNED]: 'stock.vendor-returned',
|
|
149
|
-
[exports.ChangeType.HELD]: 'stock.held',
|
|
150
|
-
[exports.ChangeType.RELEASED]: 'stock.released',
|
|
151
|
-
[exports.ChangeType.CUSTOMER_HELD]: 'stock.customer-held',
|
|
152
|
-
[exports.ChangeType.CUSTOMER_RETURNED]: 'stock.customer-returned',
|
|
153
|
-
[exports.ChangeType.SPLITTED]: 'stock.splitted',
|
|
154
|
-
[exports.ChangeType.MERGED]: 'stock.merged',
|
|
155
|
-
[exports.ChangeType.ALLOCATED]: 'stock.allocated',
|
|
156
|
-
[exports.ChangeType.DEALLOCATED]: 'stock.deallocated',
|
|
157
|
-
[exports.ChangeType.RECLASSIFIED]: 'stock.reclassified',
|
|
158
|
-
[exports.ChangeType.SCRAPED]: 'stock.scraped',
|
|
159
|
-
};
|
|
160
|
-
const QUALITY_INSPECTION_TABLE = 'quality_inspection_order_changes';
|
|
161
|
-
/**
|
|
162
|
-
* Centralized collection of stock domain events. Listens to every
|
|
163
|
-
* `*_order_change` insert and, using the change table name plus the sign of
|
|
164
|
-
* `quantityChanged`, derives the `ChangeType` and buffers a `stock.*` event
|
|
165
|
-
* into the active dispatch scope (flushed post-commit by the graphql
|
|
166
|
-
* interceptor). This keeps the 12 domain services untouched and automatically
|
|
167
|
-
* covers any future code path that writes a change row.
|
|
168
|
-
*
|
|
169
|
-
* It self-registers on the data source so no global TypeORM `subscribers`
|
|
170
|
-
* config is required.
|
|
171
|
-
*/
|
|
172
|
-
let StockChangeSubscriber = class StockChangeSubscriber {
|
|
173
|
-
collector;
|
|
174
|
-
constructor(dataSource, collector) {
|
|
175
|
-
this.collector = collector;
|
|
176
|
-
dataSource.subscribers.push(this);
|
|
177
|
-
}
|
|
178
|
-
afterInsert(event) {
|
|
179
|
-
const tableName = event.metadata.tableName;
|
|
180
|
-
const entity = event.entity;
|
|
181
|
-
if (!entity || typeof entity.id !== 'string') {
|
|
182
|
-
return;
|
|
183
|
-
}
|
|
184
|
-
const quantityDelta = Number(entity.quantityChanged);
|
|
185
|
-
if (tableName === QUALITY_INSPECTION_TABLE) {
|
|
186
|
-
this.collector.collect('stock.inspection-resolved', {
|
|
187
|
-
orderId: entity.id,
|
|
188
|
-
itemId: entity.itemId,
|
|
189
|
-
quantityDelta,
|
|
190
|
-
changeType: null,
|
|
191
|
-
inspectionResult: entity.result ?? null,
|
|
192
|
-
});
|
|
193
|
-
return;
|
|
194
|
-
}
|
|
195
|
-
const resolveChangeType = TABLE_TO_CHANGE_TYPE.get(tableName);
|
|
196
|
-
if (!resolveChangeType) {
|
|
197
|
-
return;
|
|
198
|
-
}
|
|
199
|
-
const changeType = resolveChangeType(quantityDelta);
|
|
200
|
-
this.collector.collect(CHANGE_TYPE_TO_EVENT[changeType], {
|
|
201
|
-
orderId: entity.id,
|
|
202
|
-
itemId: entity.itemId,
|
|
203
|
-
quantityDelta,
|
|
204
|
-
changeType,
|
|
205
|
-
});
|
|
206
|
-
}
|
|
207
|
-
};
|
|
208
|
-
StockChangeSubscriber = tslib.__decorate([
|
|
209
|
-
common.Injectable(),
|
|
210
|
-
tslib.__param(0, typeorm.InjectDataSource()),
|
|
211
|
-
tslib.__metadata("design:paramtypes", [typeorm$1.DataSource,
|
|
212
|
-
exports.WmsEventCollector])
|
|
213
|
-
], StockChangeSubscriber);
|
|
214
|
-
|
|
215
55
|
const BatchEntity = Symbol('BatchEntity');
|
|
216
56
|
exports.BatchEntityClass = class BatchEntityClass extends wmsBaseNestjsModule.BatchEntity {
|
|
217
57
|
groupId;
|
|
@@ -233,51 +73,51 @@ exports.BatchEntityClass = class BatchEntityClass extends wmsBaseNestjsModule.Ba
|
|
|
233
73
|
batchGroup;
|
|
234
74
|
};
|
|
235
75
|
tslib.__decorate([
|
|
236
|
-
typeorm
|
|
76
|
+
typeorm.Column({ type: 'varchar', nullable: true }),
|
|
237
77
|
tslib.__metadata("design:type", String)
|
|
238
78
|
], exports.BatchEntityClass.prototype, "groupId", void 0);
|
|
239
79
|
tslib.__decorate([
|
|
240
|
-
typeorm
|
|
80
|
+
typeorm.Column({ type: 'varchar', nullable: true }),
|
|
241
81
|
tslib.__metadata("design:type", Object)
|
|
242
82
|
], exports.BatchEntityClass.prototype, "saleId", void 0);
|
|
243
83
|
tslib.__decorate([
|
|
244
|
-
typeorm
|
|
84
|
+
typeorm.Column({ type: 'varchar', nullable: true }),
|
|
245
85
|
tslib.__metadata("design:type", Object)
|
|
246
86
|
], exports.BatchEntityClass.prototype, "saleSerialId", void 0);
|
|
247
87
|
tslib.__decorate([
|
|
248
|
-
typeorm
|
|
88
|
+
typeorm.Column({ type: 'varchar', nullable: true }),
|
|
249
89
|
tslib.__metadata("design:type", Object)
|
|
250
90
|
], exports.BatchEntityClass.prototype, "customerId", void 0);
|
|
251
91
|
tslib.__decorate([
|
|
252
|
-
typeorm
|
|
92
|
+
typeorm.Column({ type: 'varchar', nullable: true }),
|
|
253
93
|
tslib.__metadata("design:type", Object)
|
|
254
94
|
], exports.BatchEntityClass.prototype, "vendorId", void 0);
|
|
255
95
|
tslib.__decorate([
|
|
256
|
-
typeorm
|
|
96
|
+
typeorm.Column({ type: 'bool', nullable: true }),
|
|
257
97
|
tslib.__metadata("design:type", Object)
|
|
258
98
|
], exports.BatchEntityClass.prototype, "inspectionResult", void 0);
|
|
259
99
|
tslib.__decorate([
|
|
260
|
-
typeorm
|
|
100
|
+
typeorm.Column({ type: 'varchar', nullable: true }),
|
|
261
101
|
tslib.__metadata("design:type", Object)
|
|
262
102
|
], exports.BatchEntityClass.prototype, "transferId", void 0);
|
|
263
103
|
tslib.__decorate([
|
|
264
|
-
typeorm
|
|
104
|
+
typeorm.Column({ type: 'bool', default: false }),
|
|
265
105
|
tslib.__metadata("design:type", Boolean)
|
|
266
106
|
], exports.BatchEntityClass.prototype, "held", void 0);
|
|
267
107
|
tslib.__decorate([
|
|
268
|
-
typeorm
|
|
108
|
+
typeorm.Column({ type: 'bool', default: false }),
|
|
269
109
|
tslib.__metadata("design:type", Boolean)
|
|
270
110
|
], exports.BatchEntityClass.prototype, "inShipment", void 0);
|
|
271
111
|
tslib.__decorate([
|
|
272
|
-
typeorm
|
|
112
|
+
typeorm.ManyToOne('batch_groups', (batchGroup) => batchGroup.batches, {
|
|
273
113
|
onDelete: 'CASCADE',
|
|
274
114
|
orphanedRowAction: 'delete',
|
|
275
115
|
}),
|
|
276
|
-
typeorm
|
|
116
|
+
typeorm.JoinColumn({ name: 'groupId', referencedColumnName: 'id' }),
|
|
277
117
|
tslib.__metadata("design:type", Function)
|
|
278
118
|
], exports.BatchEntityClass.prototype, "batchGroup", void 0);
|
|
279
119
|
exports.BatchEntityClass = tslib.__decorate([
|
|
280
|
-
typeorm
|
|
120
|
+
typeorm.ChildEntity()
|
|
281
121
|
], exports.BatchEntityClass);
|
|
282
122
|
|
|
283
123
|
const BatchGroupEntity = Symbol('BatchGroupEntity');
|
|
@@ -288,23 +128,23 @@ exports.BatchGroupEntityClass = class BatchGroupEntityClass {
|
|
|
288
128
|
batches;
|
|
289
129
|
};
|
|
290
130
|
tslib.__decorate([
|
|
291
|
-
typeorm
|
|
131
|
+
typeorm.PrimaryGeneratedColumn('uuid'),
|
|
292
132
|
tslib.__metadata("design:type", String)
|
|
293
133
|
], exports.BatchGroupEntityClass.prototype, "id", void 0);
|
|
294
134
|
tslib.__decorate([
|
|
295
|
-
typeorm
|
|
135
|
+
typeorm.Column({ type: 'varchar' }),
|
|
296
136
|
tslib.__metadata("design:type", String)
|
|
297
137
|
], exports.BatchGroupEntityClass.prototype, "key", void 0);
|
|
298
138
|
tslib.__decorate([
|
|
299
|
-
typeorm
|
|
139
|
+
typeorm.Column({ type: 'varchar' }),
|
|
300
140
|
tslib.__metadata("design:type", String)
|
|
301
141
|
], exports.BatchGroupEntityClass.prototype, "materialId", void 0);
|
|
302
142
|
tslib.__decorate([
|
|
303
|
-
typeorm
|
|
143
|
+
typeorm.OneToMany('batches', (batch) => batch.batchGroup),
|
|
304
144
|
tslib.__metadata("design:type", Array)
|
|
305
145
|
], exports.BatchGroupEntityClass.prototype, "batches", void 0);
|
|
306
146
|
exports.BatchGroupEntityClass = tslib.__decorate([
|
|
307
|
-
typeorm
|
|
147
|
+
typeorm.Entity('batch_groups')
|
|
308
148
|
], exports.BatchGroupEntityClass);
|
|
309
149
|
|
|
310
150
|
const LoaderTypeEntity = Symbol('LoaderTypeEntity');
|
|
@@ -317,33 +157,33 @@ exports.LoaderTypeEntityClass = class LoaderTypeEntityClass {
|
|
|
317
157
|
updatedAt;
|
|
318
158
|
};
|
|
319
159
|
tslib.__decorate([
|
|
320
|
-
typeorm
|
|
160
|
+
typeorm.PrimaryGeneratedColumn('uuid'),
|
|
321
161
|
tslib.__metadata("design:type", String)
|
|
322
162
|
], exports.LoaderTypeEntityClass.prototype, "id", void 0);
|
|
323
163
|
tslib.__decorate([
|
|
324
|
-
typeorm
|
|
164
|
+
typeorm.Column({ type: 'varchar' }),
|
|
325
165
|
tslib.__metadata("design:type", String)
|
|
326
166
|
], exports.LoaderTypeEntityClass.prototype, "description", void 0);
|
|
327
167
|
tslib.__decorate([
|
|
328
|
-
typeorm
|
|
168
|
+
typeorm.Column({ type: 'bool', default: true }),
|
|
329
169
|
tslib.__metadata("design:type", Boolean)
|
|
330
170
|
], exports.LoaderTypeEntityClass.prototype, "isActive", void 0);
|
|
331
171
|
tslib.__decorate([
|
|
332
|
-
typeorm
|
|
333
|
-
typeorm
|
|
172
|
+
typeorm.Column({ type: 'varchar', unique: true }),
|
|
173
|
+
typeorm.Index(),
|
|
334
174
|
tslib.__metadata("design:type", String)
|
|
335
175
|
], exports.LoaderTypeEntityClass.prototype, "key", void 0);
|
|
336
176
|
tslib.__decorate([
|
|
337
|
-
typeorm
|
|
177
|
+
typeorm.CreateDateColumn({ type: 'timestamptz' }),
|
|
338
178
|
tslib.__metadata("design:type", Date)
|
|
339
179
|
], exports.LoaderTypeEntityClass.prototype, "createdAt", void 0);
|
|
340
180
|
tslib.__decorate([
|
|
341
|
-
typeorm
|
|
181
|
+
typeorm.UpdateDateColumn({ type: 'timestamptz' }),
|
|
342
182
|
tslib.__metadata("design:type", Date)
|
|
343
183
|
], exports.LoaderTypeEntityClass.prototype, "updatedAt", void 0);
|
|
344
184
|
exports.LoaderTypeEntityClass = tslib.__decorate([
|
|
345
|
-
typeorm
|
|
346
|
-
typeorm
|
|
185
|
+
typeorm.Entity('loader_types'),
|
|
186
|
+
typeorm.TableInheritance({ column: { type: 'varchar', name: 'entityName' } })
|
|
347
187
|
], exports.LoaderTypeEntityClass);
|
|
348
188
|
|
|
349
189
|
const LoadersEntity = Symbol('LoadersEntity');
|
|
@@ -366,76 +206,76 @@ exports.LoadersEntityClass = class LoadersEntityClass {
|
|
|
366
206
|
location;
|
|
367
207
|
};
|
|
368
208
|
tslib.__decorate([
|
|
369
|
-
typeorm
|
|
209
|
+
typeorm.PrimaryGeneratedColumn('uuid'),
|
|
370
210
|
tslib.__metadata("design:type", String)
|
|
371
211
|
], exports.LoadersEntityClass.prototype, "id", void 0);
|
|
372
212
|
tslib.__decorate([
|
|
373
|
-
typeorm
|
|
374
|
-
typeorm
|
|
213
|
+
typeorm.Column({ type: 'uuid' }),
|
|
214
|
+
typeorm.Index(),
|
|
375
215
|
tslib.__metadata("design:type", String)
|
|
376
216
|
], exports.LoadersEntityClass.prototype, "typeId", void 0);
|
|
377
217
|
tslib.__decorate([
|
|
378
|
-
typeorm
|
|
218
|
+
typeorm.Column({ type: 'varchar' }),
|
|
379
219
|
tslib.__metadata("design:type", String)
|
|
380
220
|
], exports.LoadersEntityClass.prototype, "serialId", void 0);
|
|
381
221
|
tslib.__decorate([
|
|
382
|
-
typeorm
|
|
383
|
-
typeorm
|
|
222
|
+
typeorm.Column({ type: 'varchar' }),
|
|
223
|
+
typeorm.Index(),
|
|
384
224
|
tslib.__metadata("design:type", String)
|
|
385
225
|
], exports.LoadersEntityClass.prototype, "locationId", void 0);
|
|
386
226
|
tslib.__decorate([
|
|
387
|
-
typeorm
|
|
227
|
+
typeorm.Column({ type: 'numeric', nullable: true }),
|
|
388
228
|
tslib.__metadata("design:type", Object)
|
|
389
229
|
], exports.LoadersEntityClass.prototype, "length", void 0);
|
|
390
230
|
tslib.__decorate([
|
|
391
|
-
typeorm
|
|
231
|
+
typeorm.Column({ type: 'numeric', nullable: true }),
|
|
392
232
|
tslib.__metadata("design:type", Object)
|
|
393
233
|
], exports.LoadersEntityClass.prototype, "width", void 0);
|
|
394
234
|
tslib.__decorate([
|
|
395
|
-
typeorm
|
|
235
|
+
typeorm.Column({ type: 'numeric', nullable: true }),
|
|
396
236
|
tslib.__metadata("design:type", Object)
|
|
397
237
|
], exports.LoadersEntityClass.prototype, "height", void 0);
|
|
398
238
|
tslib.__decorate([
|
|
399
|
-
typeorm
|
|
239
|
+
typeorm.Column({ type: 'varchar', nullable: true }),
|
|
400
240
|
tslib.__metadata("design:type", Object)
|
|
401
241
|
], exports.LoadersEntityClass.prototype, "sizeUnit", void 0);
|
|
402
242
|
tslib.__decorate([
|
|
403
|
-
typeorm
|
|
243
|
+
typeorm.Column({ type: 'numeric', nullable: true }),
|
|
404
244
|
tslib.__metadata("design:type", Object)
|
|
405
245
|
], exports.LoadersEntityClass.prototype, "volume", void 0);
|
|
406
246
|
tslib.__decorate([
|
|
407
|
-
typeorm
|
|
247
|
+
typeorm.Column({ type: 'varchar', nullable: true }),
|
|
408
248
|
tslib.__metadata("design:type", Object)
|
|
409
249
|
], exports.LoadersEntityClass.prototype, "volumeUnit", void 0);
|
|
410
250
|
tslib.__decorate([
|
|
411
|
-
typeorm
|
|
251
|
+
typeorm.Column({ type: 'text', nullable: true }),
|
|
412
252
|
tslib.__metadata("design:type", Object)
|
|
413
253
|
], exports.LoadersEntityClass.prototype, "note", void 0);
|
|
414
254
|
tslib.__decorate([
|
|
415
|
-
typeorm
|
|
255
|
+
typeorm.Column({ type: 'boolean', default: true }),
|
|
416
256
|
tslib.__metadata("design:type", Boolean)
|
|
417
257
|
], exports.LoadersEntityClass.prototype, "isActive", void 0);
|
|
418
258
|
tslib.__decorate([
|
|
419
|
-
typeorm
|
|
259
|
+
typeorm.CreateDateColumn({ type: 'timestamptz' }),
|
|
420
260
|
tslib.__metadata("design:type", Date)
|
|
421
261
|
], exports.LoadersEntityClass.prototype, "createdAt", void 0);
|
|
422
262
|
tslib.__decorate([
|
|
423
|
-
typeorm
|
|
263
|
+
typeorm.UpdateDateColumn({ type: 'timestamptz' }),
|
|
424
264
|
tslib.__metadata("design:type", Date)
|
|
425
265
|
], exports.LoadersEntityClass.prototype, "updatedAt", void 0);
|
|
426
266
|
tslib.__decorate([
|
|
427
|
-
typeorm
|
|
428
|
-
typeorm
|
|
267
|
+
typeorm.ManyToOne('loader_types'),
|
|
268
|
+
typeorm.JoinColumn({ name: 'typeId', referencedColumnName: 'id' }),
|
|
429
269
|
tslib.__metadata("design:type", exports.LoaderTypeEntityClass)
|
|
430
270
|
], exports.LoadersEntityClass.prototype, "type", void 0);
|
|
431
271
|
tslib.__decorate([
|
|
432
|
-
typeorm
|
|
433
|
-
typeorm
|
|
272
|
+
typeorm.ManyToOne('locations'),
|
|
273
|
+
typeorm.JoinColumn({ name: 'locationId', referencedColumnName: 'id' }),
|
|
434
274
|
tslib.__metadata("design:type", wmsBaseNestjsModule.LocationEntity)
|
|
435
275
|
], exports.LoadersEntityClass.prototype, "location", void 0);
|
|
436
276
|
exports.LoadersEntityClass = tslib.__decorate([
|
|
437
|
-
typeorm
|
|
438
|
-
typeorm
|
|
277
|
+
typeorm.Entity('loaders'),
|
|
278
|
+
typeorm.TableInheritance({ column: { type: 'varchar', name: 'entityName' } })
|
|
439
279
|
], exports.LoadersEntityClass);
|
|
440
280
|
|
|
441
281
|
const LoaderUnitEntity = Symbol('LoaderUnitEntity');
|
|
@@ -444,15 +284,15 @@ exports.LoaderUnitEntityClass = class LoaderUnitEntityClass {
|
|
|
444
284
|
type;
|
|
445
285
|
};
|
|
446
286
|
tslib.__decorate([
|
|
447
|
-
typeorm
|
|
287
|
+
typeorm.PrimaryColumn('varchar'),
|
|
448
288
|
tslib.__metadata("design:type", String)
|
|
449
289
|
], exports.LoaderUnitEntityClass.prototype, "id", void 0);
|
|
450
290
|
tslib.__decorate([
|
|
451
|
-
typeorm
|
|
291
|
+
typeorm.PrimaryColumn('varchar'),
|
|
452
292
|
tslib.__metadata("design:type", String)
|
|
453
293
|
], exports.LoaderUnitEntityClass.prototype, "type", void 0);
|
|
454
294
|
exports.LoaderUnitEntityClass = tslib.__decorate([
|
|
455
|
-
typeorm
|
|
295
|
+
typeorm.Entity('loader_units')
|
|
456
296
|
], exports.LoaderUnitEntityClass);
|
|
457
297
|
|
|
458
298
|
const LocationEntity = Symbol('LocationEntity');
|
|
@@ -463,19 +303,19 @@ exports.LocationEntityClass = class LocationEntityClass extends wmsBaseNestjsMod
|
|
|
463
303
|
parentId;
|
|
464
304
|
};
|
|
465
305
|
tslib.__decorate([
|
|
466
|
-
typeorm
|
|
306
|
+
typeorm.Column({ type: 'text' }),
|
|
467
307
|
tslib.__metadata("design:type", String)
|
|
468
308
|
], exports.LocationEntityClass.prototype, "description", void 0);
|
|
469
309
|
tslib.__decorate([
|
|
470
|
-
typeorm
|
|
310
|
+
typeorm.Column({ type: 'bool', default: true }),
|
|
471
311
|
tslib.__metadata("design:type", Boolean)
|
|
472
312
|
], exports.LocationEntityClass.prototype, "isActive", void 0);
|
|
473
313
|
tslib.__decorate([
|
|
474
|
-
typeorm
|
|
314
|
+
typeorm.RelationId((location) => location.parent),
|
|
475
315
|
tslib.__metadata("design:type", Object)
|
|
476
316
|
], exports.LocationEntityClass.prototype, "parentId", void 0);
|
|
477
317
|
exports.LocationEntityClass = tslib.__decorate([
|
|
478
|
-
typeorm
|
|
318
|
+
typeorm.ChildEntity()
|
|
479
319
|
], exports.LocationEntityClass);
|
|
480
320
|
|
|
481
321
|
const MaterialEntity = Symbol('MaterialEntity');
|
|
@@ -485,20 +325,20 @@ exports.MaterialEntityClass = class MaterialEntityClass extends wmsBaseNestjsMod
|
|
|
485
325
|
isActive;
|
|
486
326
|
};
|
|
487
327
|
tslib.__decorate([
|
|
488
|
-
typeorm
|
|
489
|
-
typeorm
|
|
328
|
+
typeorm.Column({ type: 'text' }),
|
|
329
|
+
typeorm.Index(),
|
|
490
330
|
tslib.__metadata("design:type", String)
|
|
491
331
|
], exports.MaterialEntityClass.prototype, "description", void 0);
|
|
492
332
|
tslib.__decorate([
|
|
493
|
-
typeorm
|
|
333
|
+
typeorm.Column({ type: 'varchar' }),
|
|
494
334
|
tslib.__metadata("design:type", String)
|
|
495
335
|
], exports.MaterialEntityClass.prototype, "baseUnit", void 0);
|
|
496
336
|
tslib.__decorate([
|
|
497
|
-
typeorm
|
|
337
|
+
typeorm.Column({ type: 'boolean', default: true }),
|
|
498
338
|
tslib.__metadata("design:type", Boolean)
|
|
499
339
|
], exports.MaterialEntityClass.prototype, "isActive", void 0);
|
|
500
340
|
exports.MaterialEntityClass = tslib.__decorate([
|
|
501
|
-
typeorm
|
|
341
|
+
typeorm.ChildEntity()
|
|
502
342
|
], exports.MaterialEntityClass);
|
|
503
343
|
|
|
504
344
|
const MaterialUnitEntity = Symbol('MaterialUnitEntity');
|
|
@@ -512,39 +352,39 @@ exports.MaterialUnitEntityClass = class MaterialUnitEntityClass {
|
|
|
512
352
|
material;
|
|
513
353
|
};
|
|
514
354
|
tslib.__decorate([
|
|
515
|
-
typeorm
|
|
355
|
+
typeorm.PrimaryGeneratedColumn('uuid'),
|
|
516
356
|
tslib.__metadata("design:type", String)
|
|
517
357
|
], exports.MaterialUnitEntityClass.prototype, "id", void 0);
|
|
518
358
|
tslib.__decorate([
|
|
519
|
-
typeorm
|
|
520
|
-
typeorm
|
|
359
|
+
typeorm.Column({ type: 'varchar' }),
|
|
360
|
+
typeorm.Index(),
|
|
521
361
|
tslib.__metadata("design:type", String)
|
|
522
362
|
], exports.MaterialUnitEntityClass.prototype, "materialId", void 0);
|
|
523
363
|
tslib.__decorate([
|
|
524
|
-
typeorm
|
|
364
|
+
typeorm.Column({ type: 'varchar' }),
|
|
525
365
|
tslib.__metadata("design:type", String)
|
|
526
366
|
], exports.MaterialUnitEntityClass.prototype, "unit", void 0);
|
|
527
367
|
tslib.__decorate([
|
|
528
|
-
typeorm
|
|
368
|
+
typeorm.Column({ type: 'numeric' }),
|
|
529
369
|
tslib.__metadata("design:type", Number)
|
|
530
370
|
], exports.MaterialUnitEntityClass.prototype, "conversionFactor", void 0);
|
|
531
371
|
tslib.__decorate([
|
|
532
|
-
typeorm
|
|
372
|
+
typeorm.Column({ type: 'boolean', default: true }),
|
|
533
373
|
tslib.__metadata("design:type", Boolean)
|
|
534
374
|
], exports.MaterialUnitEntityClass.prototype, "isActive", void 0);
|
|
535
375
|
tslib.__decorate([
|
|
536
|
-
typeorm
|
|
376
|
+
typeorm.CreateDateColumn({ type: 'timestamptz' }),
|
|
537
377
|
tslib.__metadata("design:type", Date)
|
|
538
378
|
], exports.MaterialUnitEntityClass.prototype, "createdAt", void 0);
|
|
539
379
|
tslib.__decorate([
|
|
540
|
-
typeorm
|
|
541
|
-
typeorm
|
|
380
|
+
typeorm.ManyToOne('materials'),
|
|
381
|
+
typeorm.JoinColumn({ name: 'materialId', referencedColumnName: 'id' }),
|
|
542
382
|
tslib.__metadata("design:type", exports.MaterialEntityClass)
|
|
543
383
|
], exports.MaterialUnitEntityClass.prototype, "material", void 0);
|
|
544
384
|
exports.MaterialUnitEntityClass = tslib.__decorate([
|
|
545
|
-
typeorm
|
|
546
|
-
typeorm
|
|
547
|
-
typeorm
|
|
385
|
+
typeorm.Entity('material_units'),
|
|
386
|
+
typeorm.Unique(['materialId', 'unit']),
|
|
387
|
+
typeorm.TableInheritance({ column: { type: 'varchar', name: 'entityName' } })
|
|
548
388
|
], exports.MaterialUnitEntityClass);
|
|
549
389
|
|
|
550
390
|
const SaleOrderEntity = Symbol('SaleOrderEntity');
|
|
@@ -553,17 +393,67 @@ exports.SaleOrderEntityClass = class SaleOrderEntityClass {
|
|
|
553
393
|
serialId;
|
|
554
394
|
};
|
|
555
395
|
tslib.__decorate([
|
|
556
|
-
typeorm
|
|
396
|
+
typeorm.PrimaryColumn('varchar'),
|
|
557
397
|
tslib.__metadata("design:type", String)
|
|
558
398
|
], exports.SaleOrderEntityClass.prototype, "id", void 0);
|
|
559
399
|
tslib.__decorate([
|
|
560
|
-
typeorm
|
|
400
|
+
typeorm.PrimaryColumn('varchar'),
|
|
561
401
|
tslib.__metadata("design:type", String)
|
|
562
402
|
], exports.SaleOrderEntityClass.prototype, "serialId", void 0);
|
|
563
403
|
exports.SaleOrderEntityClass = tslib.__decorate([
|
|
564
|
-
typeorm
|
|
404
|
+
typeorm.Entity('sale_orders')
|
|
565
405
|
], exports.SaleOrderEntityClass);
|
|
566
406
|
|
|
407
|
+
exports.StockStatus = void 0;
|
|
408
|
+
(function (StockStatus) {
|
|
409
|
+
StockStatus["PENDING_INSPECTION"] = "PENDING_INSPECTION";
|
|
410
|
+
StockStatus["INSPECTION_FAILED"] = "INSPECTION_FAILED";
|
|
411
|
+
StockStatus["HELD"] = "HELD";
|
|
412
|
+
StockStatus["IN_TRANSFER"] = "IN_TRANSFER";
|
|
413
|
+
StockStatus["IN_SHIPMENT"] = "IN_SHIPMENT";
|
|
414
|
+
StockStatus["ALLOCATED"] = "ALLOCATED";
|
|
415
|
+
StockStatus["VENDOR_INVENTORY"] = "VENDOR_INVENTORY";
|
|
416
|
+
StockStatus["CUSTOMER_INVENTORY"] = "CUSTOMER_INVENTORY";
|
|
417
|
+
StockStatus["FREE"] = "FREE";
|
|
418
|
+
})(exports.StockStatus || (exports.StockStatus = {}));
|
|
419
|
+
exports.ChangeType = void 0;
|
|
420
|
+
(function (ChangeType) {
|
|
421
|
+
// receive-inventory-order-change.entity.ts
|
|
422
|
+
ChangeType["RECEIVED"] = "RECEIVED";
|
|
423
|
+
// ship-inventory-order-change.entity.ts, change > 0
|
|
424
|
+
ChangeType["IN_SHIPMENT"] = "IN_SHIPMENT";
|
|
425
|
+
// ship-inventory-order-change.entity.ts, change < 0
|
|
426
|
+
ChangeType["SHIPPED"] = "SHIPPED";
|
|
427
|
+
// transfer-order-change.entity.ts, change > 0
|
|
428
|
+
ChangeType["IN_TRANSFER"] = "IN_TRANSFER";
|
|
429
|
+
// transfer-order-change.entity.ts, change < 0
|
|
430
|
+
ChangeType["TRANSFERRED"] = "TRANSFERRED";
|
|
431
|
+
// vendor-inventory-change.entity.ts, change > 0
|
|
432
|
+
ChangeType["VENDOR_TRANSFERRED"] = "VENDOR_TRANSFERRED";
|
|
433
|
+
// vendor-inventory-change.entity.ts, change < 0
|
|
434
|
+
ChangeType["VENDOR_RETURNED"] = "VENDOR_RETURNED";
|
|
435
|
+
// hold-inventory-order-change.entity.ts, change > 0
|
|
436
|
+
ChangeType["HELD"] = "HELD";
|
|
437
|
+
// hold-inventory-order-change.entity.ts, change < 0
|
|
438
|
+
ChangeType["RELEASED"] = "RELEASED";
|
|
439
|
+
// customer-inventory-change.entity.ts, change > 0
|
|
440
|
+
ChangeType["CUSTOMER_HELD"] = "CUSTOMER_HELD";
|
|
441
|
+
// customer-inventory-change.entity.ts, change < 0
|
|
442
|
+
ChangeType["CUSTOMER_RETURNED"] = "CUSTOMER_RETURNED";
|
|
443
|
+
// split-ivnentory-change.entity.ts
|
|
444
|
+
ChangeType["SPLITTED"] = "SPLITTED";
|
|
445
|
+
// merge-inventory-change.entity.ts
|
|
446
|
+
ChangeType["MERGED"] = "MERGED";
|
|
447
|
+
// allocate-inventory-change.entity.ts, change > 0
|
|
448
|
+
ChangeType["ALLOCATED"] = "ALLOCATED";
|
|
449
|
+
// allocate-inventory-change.entity.ts, change < 0
|
|
450
|
+
ChangeType["DEALLOCATED"] = "DEALLOCATED";
|
|
451
|
+
// reclassify-inventory-order-change.entity.ts
|
|
452
|
+
ChangeType["RECLASSIFIED"] = "RECLASSIFIED";
|
|
453
|
+
// scrape-order-change.entity.ts
|
|
454
|
+
ChangeType["SCRAPED"] = "SCRAPED";
|
|
455
|
+
})(exports.ChangeType || (exports.ChangeType = {}));
|
|
456
|
+
|
|
567
457
|
const StockEntity = Symbol('StockEntity');
|
|
568
458
|
exports.StockEntityClass = class StockEntityClass extends wmsBaseNestjsModule.StockEntity {
|
|
569
459
|
loaderId;
|
|
@@ -571,20 +461,20 @@ exports.StockEntityClass = class StockEntityClass extends wmsBaseNestjsModule.St
|
|
|
571
461
|
status;
|
|
572
462
|
};
|
|
573
463
|
tslib.__decorate([
|
|
574
|
-
typeorm
|
|
575
|
-
typeorm
|
|
464
|
+
typeorm.Column({ type: 'varchar' }),
|
|
465
|
+
typeorm.Index(),
|
|
576
466
|
tslib.__metadata("design:type", String)
|
|
577
467
|
], exports.StockEntityClass.prototype, "loaderId", void 0);
|
|
578
468
|
tslib.__decorate([
|
|
579
|
-
typeorm
|
|
469
|
+
typeorm.Column({ type: 'timestamptz', nullable: true }),
|
|
580
470
|
tslib.__metadata("design:type", Object)
|
|
581
471
|
], exports.StockEntityClass.prototype, "rollbackedAt", void 0);
|
|
582
472
|
tslib.__decorate([
|
|
583
|
-
typeorm
|
|
473
|
+
typeorm.JoinColumn(),
|
|
584
474
|
tslib.__metadata("design:type", String)
|
|
585
475
|
], exports.StockEntityClass.prototype, "status", void 0);
|
|
586
476
|
exports.StockEntityClass = tslib.__decorate([
|
|
587
|
-
typeorm
|
|
477
|
+
typeorm.ChildEntity()
|
|
588
478
|
], exports.StockEntityClass);
|
|
589
479
|
|
|
590
480
|
const UnitEntity = Symbol('UnitEntity');
|
|
@@ -593,15 +483,15 @@ exports.UnitEntityClass = class UnitEntityClass {
|
|
|
593
483
|
key;
|
|
594
484
|
};
|
|
595
485
|
tslib.__decorate([
|
|
596
|
-
typeorm
|
|
486
|
+
typeorm.PrimaryGeneratedColumn('uuid'),
|
|
597
487
|
tslib.__metadata("design:type", String)
|
|
598
488
|
], exports.UnitEntityClass.prototype, "id", void 0);
|
|
599
489
|
tslib.__decorate([
|
|
600
|
-
typeorm
|
|
490
|
+
typeorm.Column({ type: 'varchar', unique: true }),
|
|
601
491
|
tslib.__metadata("design:type", String)
|
|
602
492
|
], exports.UnitEntityClass.prototype, "key", void 0);
|
|
603
493
|
exports.UnitEntityClass = tslib.__decorate([
|
|
604
|
-
typeorm
|
|
494
|
+
typeorm.Entity('units')
|
|
605
495
|
], exports.UnitEntityClass);
|
|
606
496
|
|
|
607
497
|
const WMS_CORE_MODULE_OPTIONS = Symbol('WMS_CORE_MODULE_OPTIONS');
|
|
@@ -635,42 +525,42 @@ exports.ReceiveInventoryOrderEntityClass = class ReceiveInventoryOrderEntityClas
|
|
|
635
525
|
status;
|
|
636
526
|
};
|
|
637
527
|
tslib.__decorate([
|
|
638
|
-
typeorm
|
|
528
|
+
typeorm.PrimaryGeneratedColumn('uuid'),
|
|
639
529
|
tslib.__metadata("design:type", String)
|
|
640
530
|
], exports.ReceiveInventoryOrderEntityClass.prototype, "id", void 0);
|
|
641
531
|
tslib.__decorate([
|
|
642
|
-
typeorm
|
|
643
|
-
typeorm
|
|
532
|
+
typeorm.Column({ type: 'varchar', unique: true }),
|
|
533
|
+
typeorm.Index(),
|
|
644
534
|
tslib.__metadata("design:type", String)
|
|
645
535
|
], exports.ReceiveInventoryOrderEntityClass.prototype, "key", void 0);
|
|
646
536
|
tslib.__decorate([
|
|
647
|
-
typeorm
|
|
537
|
+
typeorm.Column({ type: 'text' }),
|
|
648
538
|
tslib.__metadata("design:type", String)
|
|
649
539
|
], exports.ReceiveInventoryOrderEntityClass.prototype, "description", void 0);
|
|
650
540
|
tslib.__decorate([
|
|
651
|
-
typeorm
|
|
541
|
+
typeorm.Column({ type: 'varchar', nullable: true }),
|
|
652
542
|
tslib.__metadata("design:type", Object)
|
|
653
543
|
], exports.ReceiveInventoryOrderEntityClass.prototype, "createdBy", void 0);
|
|
654
544
|
tslib.__decorate([
|
|
655
|
-
typeorm
|
|
545
|
+
typeorm.Column({ type: 'timestamptz', nullable: true }),
|
|
656
546
|
tslib.__metadata("design:type", Object)
|
|
657
547
|
], exports.ReceiveInventoryOrderEntityClass.prototype, "removedAt", void 0);
|
|
658
548
|
tslib.__decorate([
|
|
659
|
-
typeorm
|
|
549
|
+
typeorm.CreateDateColumn({ type: 'timestamptz' }),
|
|
660
550
|
tslib.__metadata("design:type", Date)
|
|
661
551
|
], exports.ReceiveInventoryOrderEntityClass.prototype, "createdAt", void 0);
|
|
662
552
|
tslib.__decorate([
|
|
663
|
-
typeorm
|
|
664
|
-
typeorm
|
|
553
|
+
typeorm.OneToMany('receive_inventory_order_items', (entity) => entity.order),
|
|
554
|
+
typeorm.JoinColumn({ name: 'id', referencedColumnName: 'orderId' }),
|
|
665
555
|
tslib.__metadata("design:type", Array)
|
|
666
556
|
], exports.ReceiveInventoryOrderEntityClass.prototype, "items", void 0);
|
|
667
557
|
tslib.__decorate([
|
|
668
|
-
typeorm
|
|
558
|
+
typeorm.JoinColumn(),
|
|
669
559
|
tslib.__metadata("design:type", String)
|
|
670
560
|
], exports.ReceiveInventoryOrderEntityClass.prototype, "status", void 0);
|
|
671
561
|
exports.ReceiveInventoryOrderEntityClass = tslib.__decorate([
|
|
672
|
-
typeorm
|
|
673
|
-
typeorm
|
|
562
|
+
typeorm.Entity('receive_inventory_orders'),
|
|
563
|
+
typeorm.TableInheritance({ column: { type: 'varchar', name: 'entityName' } })
|
|
674
564
|
], exports.ReceiveInventoryOrderEntityClass);
|
|
675
565
|
|
|
676
566
|
const ReceiveInventoryOrderChangeEntity = Symbol('ReceiveInventoryOrderChangeEntity');
|
|
@@ -683,33 +573,33 @@ exports.ReceiveInventoryOrderChangeEntityClass = class ReceiveInventoryOrderChan
|
|
|
683
573
|
status;
|
|
684
574
|
};
|
|
685
575
|
tslib.__decorate([
|
|
686
|
-
typeorm
|
|
576
|
+
typeorm.PrimaryGeneratedColumn('uuid'),
|
|
687
577
|
tslib.__metadata("design:type", String)
|
|
688
578
|
], exports.ReceiveInventoryOrderChangeEntityClass.prototype, "id", void 0);
|
|
689
579
|
tslib.__decorate([
|
|
690
|
-
typeorm
|
|
580
|
+
typeorm.Column({ type: 'uuid' }),
|
|
691
581
|
tslib.__metadata("design:type", String)
|
|
692
582
|
], exports.ReceiveInventoryOrderChangeEntityClass.prototype, "itemId", void 0);
|
|
693
583
|
tslib.__decorate([
|
|
694
|
-
typeorm
|
|
584
|
+
typeorm.Column({ type: 'numeric' }),
|
|
695
585
|
tslib.__metadata("design:type", Number)
|
|
696
586
|
], exports.ReceiveInventoryOrderChangeEntityClass.prototype, "quantityChanged", void 0);
|
|
697
587
|
tslib.__decorate([
|
|
698
|
-
typeorm
|
|
699
|
-
typeorm
|
|
588
|
+
typeorm.OneToOne('orders'),
|
|
589
|
+
typeorm.JoinColumn({ name: 'id', referencedColumnName: 'id' }),
|
|
700
590
|
tslib.__metadata("design:type", wmsBaseNestjsModule.OrderEntity)
|
|
701
591
|
], exports.ReceiveInventoryOrderChangeEntityClass.prototype, "order", void 0);
|
|
702
592
|
tslib.__decorate([
|
|
703
|
-
typeorm
|
|
704
|
-
typeorm
|
|
593
|
+
typeorm.ManyToOne('receive_inventory_order_items', (item) => item.changes),
|
|
594
|
+
typeorm.JoinColumn({ name: 'itemId', referencedColumnName: 'id' }),
|
|
705
595
|
tslib.__metadata("design:type", Function)
|
|
706
596
|
], exports.ReceiveInventoryOrderChangeEntityClass.prototype, "item", void 0);
|
|
707
597
|
tslib.__decorate([
|
|
708
|
-
typeorm
|
|
598
|
+
typeorm.JoinColumn(),
|
|
709
599
|
tslib.__metadata("design:type", String)
|
|
710
600
|
], exports.ReceiveInventoryOrderChangeEntityClass.prototype, "status", void 0);
|
|
711
601
|
exports.ReceiveInventoryOrderChangeEntityClass = tslib.__decorate([
|
|
712
|
-
typeorm
|
|
602
|
+
typeorm.Entity('receive_inventory_order_changes')
|
|
713
603
|
], exports.ReceiveInventoryOrderChangeEntityClass);
|
|
714
604
|
|
|
715
605
|
const ReceiveInventoryOrderItemEntity = Symbol('ReceiveInventoryOrderItemEntity');
|
|
@@ -730,69 +620,69 @@ exports.ReceiveInventoryOrderItemEntityClass = class ReceiveInventoryOrderItemEn
|
|
|
730
620
|
changes;
|
|
731
621
|
};
|
|
732
622
|
tslib.__decorate([
|
|
733
|
-
typeorm
|
|
623
|
+
typeorm.PrimaryGeneratedColumn('uuid'),
|
|
734
624
|
tslib.__metadata("design:type", String)
|
|
735
625
|
], exports.ReceiveInventoryOrderItemEntityClass.prototype, "id", void 0);
|
|
736
626
|
tslib.__decorate([
|
|
737
|
-
typeorm
|
|
627
|
+
typeorm.Column({ type: 'varchar' }),
|
|
738
628
|
tslib.__metadata("design:type", String)
|
|
739
629
|
], exports.ReceiveInventoryOrderItemEntityClass.prototype, "serialId", void 0);
|
|
740
630
|
tslib.__decorate([
|
|
741
|
-
typeorm
|
|
631
|
+
typeorm.Column({ type: 'text', nullable: true }),
|
|
742
632
|
tslib.__metadata("design:type", Object)
|
|
743
633
|
], exports.ReceiveInventoryOrderItemEntityClass.prototype, "description", void 0);
|
|
744
634
|
tslib.__decorate([
|
|
745
|
-
typeorm
|
|
635
|
+
typeorm.Column({ type: 'uuid', nullable: true }),
|
|
746
636
|
tslib.__metadata("design:type", Object)
|
|
747
637
|
], exports.ReceiveInventoryOrderItemEntityClass.prototype, "unitId", void 0);
|
|
748
638
|
tslib.__decorate([
|
|
749
|
-
typeorm
|
|
639
|
+
typeorm.Column({ type: 'bool', default: true }),
|
|
750
640
|
tslib.__metadata("design:type", Boolean)
|
|
751
641
|
], exports.ReceiveInventoryOrderItemEntityClass.prototype, "requireInspection", void 0);
|
|
752
642
|
tslib.__decorate([
|
|
753
|
-
typeorm
|
|
643
|
+
typeorm.Column({ type: 'numeric' }),
|
|
754
644
|
tslib.__metadata("design:type", Number)
|
|
755
645
|
], exports.ReceiveInventoryOrderItemEntityClass.prototype, "targetReceivedQuantity", void 0);
|
|
756
646
|
tslib.__decorate([
|
|
757
|
-
typeorm
|
|
758
|
-
typeorm
|
|
647
|
+
typeorm.Column({ type: 'uuid' }),
|
|
648
|
+
typeorm.Index(),
|
|
759
649
|
tslib.__metadata("design:type", String)
|
|
760
650
|
], exports.ReceiveInventoryOrderItemEntityClass.prototype, "orderId", void 0);
|
|
761
651
|
tslib.__decorate([
|
|
762
|
-
typeorm
|
|
763
|
-
typeorm
|
|
652
|
+
typeorm.Column({ type: 'uuid' }),
|
|
653
|
+
typeorm.Index(),
|
|
764
654
|
tslib.__metadata("design:type", String)
|
|
765
655
|
], exports.ReceiveInventoryOrderItemEntityClass.prototype, "materialId", void 0);
|
|
766
656
|
tslib.__decorate([
|
|
767
|
-
typeorm
|
|
768
|
-
typeorm
|
|
657
|
+
typeorm.Column({ type: 'uuid', nullable: true }),
|
|
658
|
+
typeorm.Index(),
|
|
769
659
|
tslib.__metadata("design:type", Object)
|
|
770
660
|
], exports.ReceiveInventoryOrderItemEntityClass.prototype, "batchId", void 0);
|
|
771
661
|
tslib.__decorate([
|
|
772
|
-
typeorm
|
|
773
|
-
typeorm
|
|
662
|
+
typeorm.Column({ type: 'uuid', nullable: true }),
|
|
663
|
+
typeorm.Index(),
|
|
774
664
|
tslib.__metadata("design:type", Object)
|
|
775
665
|
], exports.ReceiveInventoryOrderItemEntityClass.prototype, "locationId", void 0);
|
|
776
666
|
tslib.__decorate([
|
|
777
|
-
typeorm
|
|
778
|
-
typeorm
|
|
667
|
+
typeorm.Column({ type: 'uuid', nullable: true }),
|
|
668
|
+
typeorm.Index(),
|
|
779
669
|
tslib.__metadata("design:type", Object)
|
|
780
670
|
], exports.ReceiveInventoryOrderItemEntityClass.prototype, "loaderId", void 0);
|
|
781
671
|
tslib.__decorate([
|
|
782
|
-
typeorm
|
|
672
|
+
typeorm.Column({ type: 'timestamptz', nullable: true }),
|
|
783
673
|
tslib.__metadata("design:type", Object)
|
|
784
674
|
], exports.ReceiveInventoryOrderItemEntityClass.prototype, "removedAt", void 0);
|
|
785
675
|
tslib.__decorate([
|
|
786
|
-
typeorm
|
|
787
|
-
typeorm
|
|
676
|
+
typeorm.ManyToOne('receive_inventory_orders', (entity) => entity.items),
|
|
677
|
+
typeorm.JoinColumn({ name: 'orderId', referencedColumnName: 'id' }),
|
|
788
678
|
tslib.__metadata("design:type", exports.ReceiveInventoryOrderEntityClass)
|
|
789
679
|
], exports.ReceiveInventoryOrderItemEntityClass.prototype, "order", void 0);
|
|
790
680
|
tslib.__decorate([
|
|
791
|
-
typeorm
|
|
681
|
+
typeorm.OneToMany(() => exports.ReceiveInventoryOrderChangeEntityClass, (change) => change.item),
|
|
792
682
|
tslib.__metadata("design:type", Array)
|
|
793
683
|
], exports.ReceiveInventoryOrderItemEntityClass.prototype, "changes", void 0);
|
|
794
684
|
exports.ReceiveInventoryOrderItemEntityClass = tslib.__decorate([
|
|
795
|
-
typeorm
|
|
685
|
+
typeorm.Entity('receive_inventory_order_items')
|
|
796
686
|
], exports.ReceiveInventoryOrderItemEntityClass);
|
|
797
687
|
|
|
798
688
|
const ShipInventoryOrderEntity = Symbol('ShipInventoryOrderEntity');
|
|
@@ -807,42 +697,42 @@ exports.ShipInventoryOrderEntityClass = class ShipInventoryOrderEntityClass {
|
|
|
807
697
|
status;
|
|
808
698
|
};
|
|
809
699
|
tslib.__decorate([
|
|
810
|
-
typeorm
|
|
700
|
+
typeorm.PrimaryGeneratedColumn('uuid'),
|
|
811
701
|
tslib.__metadata("design:type", String)
|
|
812
702
|
], exports.ShipInventoryOrderEntityClass.prototype, "id", void 0);
|
|
813
703
|
tslib.__decorate([
|
|
814
|
-
typeorm
|
|
815
|
-
typeorm
|
|
704
|
+
typeorm.Column({ type: 'varchar', unique: true }),
|
|
705
|
+
typeorm.Index(),
|
|
816
706
|
tslib.__metadata("design:type", String)
|
|
817
707
|
], exports.ShipInventoryOrderEntityClass.prototype, "key", void 0);
|
|
818
708
|
tslib.__decorate([
|
|
819
|
-
typeorm
|
|
709
|
+
typeorm.Column({ type: 'text' }),
|
|
820
710
|
tslib.__metadata("design:type", String)
|
|
821
711
|
], exports.ShipInventoryOrderEntityClass.prototype, "description", void 0);
|
|
822
712
|
tslib.__decorate([
|
|
823
|
-
typeorm
|
|
713
|
+
typeorm.Column({ type: 'varchar', nullable: true }),
|
|
824
714
|
tslib.__metadata("design:type", Object)
|
|
825
715
|
], exports.ShipInventoryOrderEntityClass.prototype, "createdBy", void 0);
|
|
826
716
|
tslib.__decorate([
|
|
827
|
-
typeorm
|
|
717
|
+
typeorm.Column({ type: 'timestamptz', nullable: true }),
|
|
828
718
|
tslib.__metadata("design:type", Object)
|
|
829
719
|
], exports.ShipInventoryOrderEntityClass.prototype, "removedAt", void 0);
|
|
830
720
|
tslib.__decorate([
|
|
831
|
-
typeorm
|
|
721
|
+
typeorm.CreateDateColumn({ type: 'timestamptz' }),
|
|
832
722
|
tslib.__metadata("design:type", Date)
|
|
833
723
|
], exports.ShipInventoryOrderEntityClass.prototype, "createdAt", void 0);
|
|
834
724
|
tslib.__decorate([
|
|
835
|
-
typeorm
|
|
836
|
-
typeorm
|
|
725
|
+
typeorm.OneToMany('ship_inventory_order_items', (entity) => entity.order),
|
|
726
|
+
typeorm.JoinColumn({ name: 'id', referencedColumnName: 'orderId' }),
|
|
837
727
|
tslib.__metadata("design:type", Array)
|
|
838
728
|
], exports.ShipInventoryOrderEntityClass.prototype, "items", void 0);
|
|
839
729
|
tslib.__decorate([
|
|
840
|
-
typeorm
|
|
730
|
+
typeorm.JoinColumn(),
|
|
841
731
|
tslib.__metadata("design:type", String)
|
|
842
732
|
], exports.ShipInventoryOrderEntityClass.prototype, "status", void 0);
|
|
843
733
|
exports.ShipInventoryOrderEntityClass = tslib.__decorate([
|
|
844
|
-
typeorm
|
|
845
|
-
typeorm
|
|
734
|
+
typeorm.Entity('ship_inventory_orders'),
|
|
735
|
+
typeorm.TableInheritance({ column: { type: 'varchar', name: 'entityName' } })
|
|
846
736
|
], exports.ShipInventoryOrderEntityClass);
|
|
847
737
|
|
|
848
738
|
const ShipInventoryOrderChangeEntity = Symbol('ShipInventoryOrderChangeEntity');
|
|
@@ -855,33 +745,33 @@ exports.ShipInventoryOrderChangeEntityClass = class ShipInventoryOrderChangeEnti
|
|
|
855
745
|
status;
|
|
856
746
|
};
|
|
857
747
|
tslib.__decorate([
|
|
858
|
-
typeorm
|
|
748
|
+
typeorm.PrimaryGeneratedColumn('uuid'),
|
|
859
749
|
tslib.__metadata("design:type", String)
|
|
860
750
|
], exports.ShipInventoryOrderChangeEntityClass.prototype, "id", void 0);
|
|
861
751
|
tslib.__decorate([
|
|
862
|
-
typeorm
|
|
752
|
+
typeorm.Column({ type: 'uuid' }),
|
|
863
753
|
tslib.__metadata("design:type", String)
|
|
864
754
|
], exports.ShipInventoryOrderChangeEntityClass.prototype, "itemId", void 0);
|
|
865
755
|
tslib.__decorate([
|
|
866
|
-
typeorm
|
|
756
|
+
typeorm.Column({ type: 'numeric' }),
|
|
867
757
|
tslib.__metadata("design:type", Number)
|
|
868
758
|
], exports.ShipInventoryOrderChangeEntityClass.prototype, "quantityChanged", void 0);
|
|
869
759
|
tslib.__decorate([
|
|
870
|
-
typeorm
|
|
871
|
-
typeorm
|
|
760
|
+
typeorm.OneToOne('orders'),
|
|
761
|
+
typeorm.JoinColumn({ name: 'id', referencedColumnName: 'id' }),
|
|
872
762
|
tslib.__metadata("design:type", wmsBaseNestjsModule.OrderEntity)
|
|
873
763
|
], exports.ShipInventoryOrderChangeEntityClass.prototype, "order", void 0);
|
|
874
764
|
tslib.__decorate([
|
|
875
|
-
typeorm
|
|
876
|
-
typeorm
|
|
765
|
+
typeorm.ManyToOne('ship_inventory_order_items', (item) => item.changes),
|
|
766
|
+
typeorm.JoinColumn({ name: 'itemId', referencedColumnName: 'id' }),
|
|
877
767
|
tslib.__metadata("design:type", Function)
|
|
878
768
|
], exports.ShipInventoryOrderChangeEntityClass.prototype, "item", void 0);
|
|
879
769
|
tslib.__decorate([
|
|
880
|
-
typeorm
|
|
770
|
+
typeorm.JoinColumn(),
|
|
881
771
|
tslib.__metadata("design:type", String)
|
|
882
772
|
], exports.ShipInventoryOrderChangeEntityClass.prototype, "status", void 0);
|
|
883
773
|
exports.ShipInventoryOrderChangeEntityClass = tslib.__decorate([
|
|
884
|
-
typeorm
|
|
774
|
+
typeorm.Entity('ship_inventory_order_changes')
|
|
885
775
|
], exports.ShipInventoryOrderChangeEntityClass);
|
|
886
776
|
|
|
887
777
|
const ShipInventoryOrderItemEntity = Symbol('ShipInventoryOrderItemEntity');
|
|
@@ -902,70 +792,70 @@ exports.ShipInventoryOrderItemEntityClass = class ShipInventoryOrderItemEntityCl
|
|
|
902
792
|
changes;
|
|
903
793
|
};
|
|
904
794
|
tslib.__decorate([
|
|
905
|
-
typeorm
|
|
795
|
+
typeorm.PrimaryGeneratedColumn('uuid'),
|
|
906
796
|
tslib.__metadata("design:type", String)
|
|
907
797
|
], exports.ShipInventoryOrderItemEntityClass.prototype, "id", void 0);
|
|
908
798
|
tslib.__decorate([
|
|
909
|
-
typeorm
|
|
799
|
+
typeorm.Column({ type: 'varchar' }),
|
|
910
800
|
tslib.__metadata("design:type", String)
|
|
911
801
|
], exports.ShipInventoryOrderItemEntityClass.prototype, "serialId", void 0);
|
|
912
802
|
tslib.__decorate([
|
|
913
|
-
typeorm
|
|
803
|
+
typeorm.Column({ type: 'varchar', nullable: true }),
|
|
914
804
|
tslib.__metadata("design:type", String)
|
|
915
805
|
], exports.ShipInventoryOrderItemEntityClass.prototype, "saleId", void 0);
|
|
916
806
|
tslib.__decorate([
|
|
917
|
-
typeorm
|
|
807
|
+
typeorm.Column({ type: 'varchar', nullable: true }),
|
|
918
808
|
tslib.__metadata("design:type", String)
|
|
919
809
|
], exports.ShipInventoryOrderItemEntityClass.prototype, "saleSerialId", void 0);
|
|
920
810
|
tslib.__decorate([
|
|
921
|
-
typeorm
|
|
811
|
+
typeorm.Column({ type: 'uuid', nullable: true }),
|
|
922
812
|
tslib.__metadata("design:type", Object)
|
|
923
813
|
], exports.ShipInventoryOrderItemEntityClass.prototype, "unitId", void 0);
|
|
924
814
|
tslib.__decorate([
|
|
925
|
-
typeorm
|
|
815
|
+
typeorm.Column({ type: 'numeric' }),
|
|
926
816
|
tslib.__metadata("design:type", Number)
|
|
927
817
|
], exports.ShipInventoryOrderItemEntityClass.prototype, "targetShippedQuantity", void 0);
|
|
928
818
|
tslib.__decorate([
|
|
929
|
-
typeorm
|
|
930
|
-
typeorm
|
|
819
|
+
typeorm.Column({ type: 'uuid' }),
|
|
820
|
+
typeorm.Index(),
|
|
931
821
|
tslib.__metadata("design:type", String)
|
|
932
822
|
], exports.ShipInventoryOrderItemEntityClass.prototype, "orderId", void 0);
|
|
933
823
|
tslib.__decorate([
|
|
934
|
-
typeorm
|
|
935
|
-
typeorm
|
|
824
|
+
typeorm.Column({ type: 'uuid' }),
|
|
825
|
+
typeorm.Index(),
|
|
936
826
|
tslib.__metadata("design:type", String)
|
|
937
827
|
], exports.ShipInventoryOrderItemEntityClass.prototype, "materialId", void 0);
|
|
938
828
|
tslib.__decorate([
|
|
939
|
-
typeorm
|
|
940
|
-
typeorm
|
|
829
|
+
typeorm.Column({ type: 'uuid' }),
|
|
830
|
+
typeorm.Index(),
|
|
941
831
|
tslib.__metadata("design:type", String)
|
|
942
832
|
], exports.ShipInventoryOrderItemEntityClass.prototype, "batchId", void 0);
|
|
943
833
|
tslib.__decorate([
|
|
944
|
-
typeorm
|
|
945
|
-
typeorm
|
|
834
|
+
typeorm.Column({ type: 'uuid', nullable: true }),
|
|
835
|
+
typeorm.Index(),
|
|
946
836
|
tslib.__metadata("design:type", Object)
|
|
947
837
|
], exports.ShipInventoryOrderItemEntityClass.prototype, "locationId", void 0);
|
|
948
838
|
tslib.__decorate([
|
|
949
|
-
typeorm
|
|
950
|
-
typeorm
|
|
839
|
+
typeorm.Column({ type: 'uuid', nullable: true }),
|
|
840
|
+
typeorm.Index(),
|
|
951
841
|
tslib.__metadata("design:type", Object)
|
|
952
842
|
], exports.ShipInventoryOrderItemEntityClass.prototype, "loaderId", void 0);
|
|
953
843
|
tslib.__decorate([
|
|
954
|
-
typeorm
|
|
844
|
+
typeorm.Column({ type: 'timestamptz', nullable: true }),
|
|
955
845
|
tslib.__metadata("design:type", Object)
|
|
956
846
|
], exports.ShipInventoryOrderItemEntityClass.prototype, "removedAt", void 0);
|
|
957
847
|
tslib.__decorate([
|
|
958
|
-
typeorm
|
|
959
|
-
typeorm
|
|
848
|
+
typeorm.ManyToOne('ship_inventory_orders', (entity) => entity.items),
|
|
849
|
+
typeorm.JoinColumn({ name: 'orderId', referencedColumnName: 'id' }),
|
|
960
850
|
tslib.__metadata("design:type", exports.ShipInventoryOrderEntityClass)
|
|
961
851
|
], exports.ShipInventoryOrderItemEntityClass.prototype, "order", void 0);
|
|
962
852
|
tslib.__decorate([
|
|
963
|
-
typeorm
|
|
853
|
+
typeorm.OneToMany(() => exports.ShipInventoryOrderChangeEntityClass, (change) => change.item),
|
|
964
854
|
tslib.__metadata("design:type", Array)
|
|
965
855
|
], exports.ShipInventoryOrderItemEntityClass.prototype, "changes", void 0);
|
|
966
856
|
exports.ShipInventoryOrderItemEntityClass = tslib.__decorate([
|
|
967
|
-
typeorm
|
|
968
|
-
typeorm
|
|
857
|
+
typeorm.Entity('ship_inventory_order_items'),
|
|
858
|
+
typeorm.TableInheritance({ column: { type: 'varchar', name: 'entityName' } })
|
|
969
859
|
], exports.ShipInventoryOrderItemEntityClass);
|
|
970
860
|
|
|
971
861
|
const ShipInventoryOrderReferenceEntity = Symbol('ShipInventoryOrderReferenceEntity');
|
|
@@ -982,51 +872,51 @@ exports.ShipInventoryOrderReferenceEntityClass = class ShipInventoryOrderReferen
|
|
|
982
872
|
removedAt;
|
|
983
873
|
};
|
|
984
874
|
tslib.__decorate([
|
|
985
|
-
typeorm
|
|
875
|
+
typeorm.PrimaryGeneratedColumn('uuid'),
|
|
986
876
|
tslib.__metadata("design:type", String)
|
|
987
877
|
], exports.ShipInventoryOrderReferenceEntityClass.prototype, "id", void 0);
|
|
988
878
|
tslib.__decorate([
|
|
989
|
-
typeorm
|
|
879
|
+
typeorm.Column({ type: 'varchar' }),
|
|
990
880
|
tslib.__metadata("design:type", String)
|
|
991
881
|
], exports.ShipInventoryOrderReferenceEntityClass.prototype, "serialId", void 0);
|
|
992
882
|
tslib.__decorate([
|
|
993
|
-
typeorm
|
|
883
|
+
typeorm.Column({ type: 'varchar', nullable: true }),
|
|
994
884
|
tslib.__metadata("design:type", Object)
|
|
995
885
|
], exports.ShipInventoryOrderReferenceEntityClass.prototype, "saleId", void 0);
|
|
996
886
|
tslib.__decorate([
|
|
997
|
-
typeorm
|
|
887
|
+
typeorm.Column({ type: 'varchar', nullable: true }),
|
|
998
888
|
tslib.__metadata("design:type", Object)
|
|
999
889
|
], exports.ShipInventoryOrderReferenceEntityClass.prototype, "saleSerialId", void 0);
|
|
1000
890
|
tslib.__decorate([
|
|
1001
|
-
typeorm
|
|
891
|
+
typeorm.Column({ type: 'uuid', nullable: true }),
|
|
1002
892
|
tslib.__metadata("design:type", Object)
|
|
1003
893
|
], exports.ShipInventoryOrderReferenceEntityClass.prototype, "unitId", void 0);
|
|
1004
894
|
tslib.__decorate([
|
|
1005
|
-
typeorm
|
|
895
|
+
typeorm.Column({ type: 'numeric' }),
|
|
1006
896
|
tslib.__metadata("design:type", Number)
|
|
1007
897
|
], exports.ShipInventoryOrderReferenceEntityClass.prototype, "targetShippedQuantity", void 0);
|
|
1008
898
|
tslib.__decorate([
|
|
1009
|
-
typeorm
|
|
1010
|
-
typeorm
|
|
899
|
+
typeorm.Column({ type: 'uuid' }),
|
|
900
|
+
typeorm.Index(),
|
|
1011
901
|
tslib.__metadata("design:type", String)
|
|
1012
902
|
], exports.ShipInventoryOrderReferenceEntityClass.prototype, "orderId", void 0);
|
|
1013
903
|
tslib.__decorate([
|
|
1014
|
-
typeorm
|
|
1015
|
-
typeorm
|
|
904
|
+
typeorm.Column({ type: 'uuid' }),
|
|
905
|
+
typeorm.Index(),
|
|
1016
906
|
tslib.__metadata("design:type", String)
|
|
1017
907
|
], exports.ShipInventoryOrderReferenceEntityClass.prototype, "materialId", void 0);
|
|
1018
908
|
tslib.__decorate([
|
|
1019
|
-
typeorm
|
|
1020
|
-
typeorm
|
|
909
|
+
typeorm.Column({ type: 'uuid', nullable: true }),
|
|
910
|
+
typeorm.Index(),
|
|
1021
911
|
tslib.__metadata("design:type", Object)
|
|
1022
912
|
], exports.ShipInventoryOrderReferenceEntityClass.prototype, "batchId", void 0);
|
|
1023
913
|
tslib.__decorate([
|
|
1024
|
-
typeorm
|
|
914
|
+
typeorm.Column({ type: 'timestamptz', nullable: true }),
|
|
1025
915
|
tslib.__metadata("design:type", Object)
|
|
1026
916
|
], exports.ShipInventoryOrderReferenceEntityClass.prototype, "removedAt", void 0);
|
|
1027
917
|
exports.ShipInventoryOrderReferenceEntityClass = tslib.__decorate([
|
|
1028
|
-
typeorm
|
|
1029
|
-
typeorm
|
|
918
|
+
typeorm.Entity('ship_inventory_order_references'),
|
|
919
|
+
typeorm.Unique('UQ_order_serial', ['orderId', 'serialId'])
|
|
1030
920
|
], exports.ShipInventoryOrderReferenceEntityClass);
|
|
1031
921
|
|
|
1032
922
|
const TransferOrderEntity = Symbol('TransferOrderEntity');
|
|
@@ -1041,41 +931,41 @@ exports.TransferOrderEntityClass = class TransferOrderEntityClass {
|
|
|
1041
931
|
items;
|
|
1042
932
|
};
|
|
1043
933
|
tslib.__decorate([
|
|
1044
|
-
typeorm
|
|
934
|
+
typeorm.PrimaryGeneratedColumn('uuid'),
|
|
1045
935
|
tslib.__metadata("design:type", String)
|
|
1046
936
|
], exports.TransferOrderEntityClass.prototype, "id", void 0);
|
|
1047
937
|
tslib.__decorate([
|
|
1048
|
-
typeorm
|
|
1049
|
-
typeorm
|
|
938
|
+
typeorm.Column({ type: 'varchar', unique: true }),
|
|
939
|
+
typeorm.Index(),
|
|
1050
940
|
tslib.__metadata("design:type", String)
|
|
1051
941
|
], exports.TransferOrderEntityClass.prototype, "key", void 0);
|
|
1052
942
|
tslib.__decorate([
|
|
1053
|
-
typeorm
|
|
943
|
+
typeorm.Column({ type: 'text', nullable: true }),
|
|
1054
944
|
tslib.__metadata("design:type", Object)
|
|
1055
945
|
], exports.TransferOrderEntityClass.prototype, "description", void 0);
|
|
1056
946
|
tslib.__decorate([
|
|
1057
|
-
typeorm
|
|
947
|
+
typeorm.Column({ type: 'varchar', nullable: true }),
|
|
1058
948
|
tslib.__metadata("design:type", Object)
|
|
1059
949
|
], exports.TransferOrderEntityClass.prototype, "receiver", void 0);
|
|
1060
950
|
tslib.__decorate([
|
|
1061
|
-
typeorm
|
|
951
|
+
typeorm.Column({ type: 'varchar', nullable: true }),
|
|
1062
952
|
tslib.__metadata("design:type", Object)
|
|
1063
953
|
], exports.TransferOrderEntityClass.prototype, "createdBy", void 0);
|
|
1064
954
|
tslib.__decorate([
|
|
1065
|
-
typeorm
|
|
955
|
+
typeorm.Column({ type: 'timestamptz', nullable: true }),
|
|
1066
956
|
tslib.__metadata("design:type", Object)
|
|
1067
957
|
], exports.TransferOrderEntityClass.prototype, "removedAt", void 0);
|
|
1068
958
|
tslib.__decorate([
|
|
1069
|
-
typeorm
|
|
959
|
+
typeorm.CreateDateColumn({ type: 'timestamptz' }),
|
|
1070
960
|
tslib.__metadata("design:type", Date)
|
|
1071
961
|
], exports.TransferOrderEntityClass.prototype, "createdAt", void 0);
|
|
1072
962
|
tslib.__decorate([
|
|
1073
|
-
typeorm
|
|
963
|
+
typeorm.OneToMany('transfer_order_items', (entity) => entity.order),
|
|
1074
964
|
tslib.__metadata("design:type", Array)
|
|
1075
965
|
], exports.TransferOrderEntityClass.prototype, "items", void 0);
|
|
1076
966
|
exports.TransferOrderEntityClass = tslib.__decorate([
|
|
1077
|
-
typeorm
|
|
1078
|
-
typeorm
|
|
967
|
+
typeorm.Entity('transfer_orders'),
|
|
968
|
+
typeorm.TableInheritance({ column: { type: 'varchar', name: 'entityName' } })
|
|
1079
969
|
], exports.TransferOrderEntityClass);
|
|
1080
970
|
|
|
1081
971
|
const TransferOrderItemEntity = Symbol('TransferOrderItemEntity');
|
|
@@ -1097,77 +987,77 @@ exports.TransferOrderItemEntityClass = class TransferOrderItemEntityClass {
|
|
|
1097
987
|
changes;
|
|
1098
988
|
};
|
|
1099
989
|
tslib.__decorate([
|
|
1100
|
-
typeorm
|
|
990
|
+
typeorm.PrimaryGeneratedColumn('uuid'),
|
|
1101
991
|
tslib.__metadata("design:type", String)
|
|
1102
992
|
], exports.TransferOrderItemEntityClass.prototype, "id", void 0);
|
|
1103
993
|
tslib.__decorate([
|
|
1104
|
-
typeorm
|
|
1105
|
-
typeorm
|
|
994
|
+
typeorm.Column({ type: 'uuid' }),
|
|
995
|
+
typeorm.Index(),
|
|
1106
996
|
tslib.__metadata("design:type", String)
|
|
1107
997
|
], exports.TransferOrderItemEntityClass.prototype, "materialId", void 0);
|
|
1108
998
|
tslib.__decorate([
|
|
1109
|
-
typeorm
|
|
1110
|
-
typeorm
|
|
999
|
+
typeorm.Column({ type: 'uuid' }),
|
|
1000
|
+
typeorm.Index(),
|
|
1111
1001
|
tslib.__metadata("design:type", String)
|
|
1112
1002
|
], exports.TransferOrderItemEntityClass.prototype, "batchId", void 0);
|
|
1113
1003
|
tslib.__decorate([
|
|
1114
|
-
typeorm
|
|
1115
|
-
typeorm
|
|
1004
|
+
typeorm.Column({ type: 'uuid' }),
|
|
1005
|
+
typeorm.Index(),
|
|
1116
1006
|
tslib.__metadata("design:type", String)
|
|
1117
1007
|
], exports.TransferOrderItemEntityClass.prototype, "locationId", void 0);
|
|
1118
1008
|
tslib.__decorate([
|
|
1119
|
-
typeorm
|
|
1009
|
+
typeorm.Column({ type: 'uuid', nullable: true }),
|
|
1120
1010
|
tslib.__metadata("design:type", Object)
|
|
1121
1011
|
], exports.TransferOrderItemEntityClass.prototype, "loaderId", void 0);
|
|
1122
1012
|
tslib.__decorate([
|
|
1123
|
-
typeorm
|
|
1013
|
+
typeorm.Column({ type: 'uuid', nullable: true }),
|
|
1124
1014
|
tslib.__metadata("design:type", Object)
|
|
1125
1015
|
], exports.TransferOrderItemEntityClass.prototype, "unitId", void 0);
|
|
1126
1016
|
tslib.__decorate([
|
|
1127
|
-
typeorm
|
|
1017
|
+
typeorm.Column({ type: 'numeric' }),
|
|
1128
1018
|
tslib.__metadata("design:type", Number)
|
|
1129
1019
|
], exports.TransferOrderItemEntityClass.prototype, "targetTransferredQuantity", void 0);
|
|
1130
1020
|
tslib.__decorate([
|
|
1131
|
-
typeorm
|
|
1132
|
-
typeorm
|
|
1021
|
+
typeorm.Column({ type: 'uuid', nullable: true }),
|
|
1022
|
+
typeorm.Index(),
|
|
1133
1023
|
tslib.__metadata("design:type", Object)
|
|
1134
1024
|
], exports.TransferOrderItemEntityClass.prototype, "targetLocationId", void 0);
|
|
1135
1025
|
tslib.__decorate([
|
|
1136
|
-
typeorm
|
|
1137
|
-
typeorm
|
|
1026
|
+
typeorm.Column({ type: 'uuid', nullable: true }),
|
|
1027
|
+
typeorm.Index(),
|
|
1138
1028
|
tslib.__metadata("design:type", Object)
|
|
1139
1029
|
], exports.TransferOrderItemEntityClass.prototype, "targetLoaderId", void 0);
|
|
1140
1030
|
tslib.__decorate([
|
|
1141
|
-
typeorm
|
|
1142
|
-
typeorm
|
|
1031
|
+
typeorm.Column({ type: 'uuid' }),
|
|
1032
|
+
typeorm.Index(),
|
|
1143
1033
|
tslib.__metadata("design:type", String)
|
|
1144
1034
|
], exports.TransferOrderItemEntityClass.prototype, "orderId", void 0);
|
|
1145
1035
|
tslib.__decorate([
|
|
1146
|
-
typeorm
|
|
1036
|
+
typeorm.Column({ type: 'timestamptz', nullable: true }),
|
|
1147
1037
|
tslib.__metadata("design:type", Object)
|
|
1148
1038
|
], exports.TransferOrderItemEntityClass.prototype, "removedAt", void 0);
|
|
1149
1039
|
tslib.__decorate([
|
|
1150
|
-
typeorm
|
|
1151
|
-
typeorm
|
|
1040
|
+
typeorm.ManyToOne('locations'),
|
|
1041
|
+
typeorm.JoinColumn({ name: 'locationId', referencedColumnName: 'id' }),
|
|
1152
1042
|
tslib.__metadata("design:type", exports.LocationEntityClass)
|
|
1153
1043
|
], exports.TransferOrderItemEntityClass.prototype, "location", void 0);
|
|
1154
1044
|
tslib.__decorate([
|
|
1155
|
-
typeorm
|
|
1156
|
-
typeorm
|
|
1045
|
+
typeorm.ManyToOne('loaders'),
|
|
1046
|
+
typeorm.JoinColumn({ name: 'loaderId', referencedColumnName: 'id' }),
|
|
1157
1047
|
tslib.__metadata("design:type", exports.LoadersEntityClass)
|
|
1158
1048
|
], exports.TransferOrderItemEntityClass.prototype, "loader", void 0);
|
|
1159
1049
|
tslib.__decorate([
|
|
1160
|
-
typeorm
|
|
1161
|
-
typeorm
|
|
1050
|
+
typeorm.ManyToOne('transfer_orders', (entity) => entity.items),
|
|
1051
|
+
typeorm.JoinColumn({ name: 'orderId', referencedColumnName: 'id' }),
|
|
1162
1052
|
tslib.__metadata("design:type", exports.TransferOrderEntityClass)
|
|
1163
1053
|
], exports.TransferOrderItemEntityClass.prototype, "order", void 0);
|
|
1164
1054
|
tslib.__decorate([
|
|
1165
|
-
typeorm
|
|
1055
|
+
typeorm.OneToMany('transfer_order_changes', (change) => change.item),
|
|
1166
1056
|
tslib.__metadata("design:type", Array)
|
|
1167
1057
|
], exports.TransferOrderItemEntityClass.prototype, "changes", void 0);
|
|
1168
1058
|
exports.TransferOrderItemEntityClass = tslib.__decorate([
|
|
1169
|
-
typeorm
|
|
1170
|
-
typeorm
|
|
1059
|
+
typeorm.Entity('transfer_order_items'),
|
|
1060
|
+
typeorm.TableInheritance({ column: { type: 'varchar', name: 'entityName' } })
|
|
1171
1061
|
], exports.TransferOrderItemEntityClass);
|
|
1172
1062
|
|
|
1173
1063
|
const TransferOrderChangeEntity = Symbol('TransferOrderChangeEntity');
|
|
@@ -1179,29 +1069,29 @@ exports.TransferOrderChangeEntityClass = class TransferOrderChangeEntityClass {
|
|
|
1179
1069
|
item;
|
|
1180
1070
|
};
|
|
1181
1071
|
tslib.__decorate([
|
|
1182
|
-
typeorm
|
|
1072
|
+
typeorm.PrimaryGeneratedColumn('uuid'),
|
|
1183
1073
|
tslib.__metadata("design:type", String)
|
|
1184
1074
|
], exports.TransferOrderChangeEntityClass.prototype, "id", void 0);
|
|
1185
1075
|
tslib.__decorate([
|
|
1186
|
-
typeorm
|
|
1076
|
+
typeorm.Column({ type: 'uuid' }),
|
|
1187
1077
|
tslib.__metadata("design:type", String)
|
|
1188
1078
|
], exports.TransferOrderChangeEntityClass.prototype, "itemId", void 0);
|
|
1189
1079
|
tslib.__decorate([
|
|
1190
|
-
typeorm
|
|
1080
|
+
typeorm.Column({ type: 'numeric' }),
|
|
1191
1081
|
tslib.__metadata("design:type", Number)
|
|
1192
1082
|
], exports.TransferOrderChangeEntityClass.prototype, "quantityChanged", void 0);
|
|
1193
1083
|
tslib.__decorate([
|
|
1194
|
-
typeorm
|
|
1195
|
-
typeorm
|
|
1084
|
+
typeorm.OneToOne('orders'),
|
|
1085
|
+
typeorm.JoinColumn({ name: 'id', referencedColumnName: 'id' }),
|
|
1196
1086
|
tslib.__metadata("design:type", wmsBaseNestjsModule.OrderEntity)
|
|
1197
1087
|
], exports.TransferOrderChangeEntityClass.prototype, "order", void 0);
|
|
1198
1088
|
tslib.__decorate([
|
|
1199
|
-
typeorm
|
|
1200
|
-
typeorm
|
|
1089
|
+
typeorm.ManyToOne('transfer_order_items', (item) => item.changes),
|
|
1090
|
+
typeorm.JoinColumn({ name: 'itemId', referencedColumnName: 'id' }),
|
|
1201
1091
|
tslib.__metadata("design:type", exports.TransferOrderItemEntityClass)
|
|
1202
1092
|
], exports.TransferOrderChangeEntityClass.prototype, "item", void 0);
|
|
1203
1093
|
exports.TransferOrderChangeEntityClass = tslib.__decorate([
|
|
1204
|
-
typeorm
|
|
1094
|
+
typeorm.Entity('transfer_order_changes')
|
|
1205
1095
|
], exports.TransferOrderChangeEntityClass);
|
|
1206
1096
|
|
|
1207
1097
|
const HoldInventoryOrderEntity = Symbol('HoldInventoryOrderEntity');
|
|
@@ -1214,33 +1104,33 @@ exports.HoldInventoryOrderEntityClass = class HoldInventoryOrderEntityClass {
|
|
|
1214
1104
|
items;
|
|
1215
1105
|
};
|
|
1216
1106
|
tslib.__decorate([
|
|
1217
|
-
typeorm
|
|
1107
|
+
typeorm.PrimaryGeneratedColumn('uuid'),
|
|
1218
1108
|
tslib.__metadata("design:type", String)
|
|
1219
1109
|
], exports.HoldInventoryOrderEntityClass.prototype, "id", void 0);
|
|
1220
1110
|
tslib.__decorate([
|
|
1221
|
-
typeorm
|
|
1222
|
-
typeorm
|
|
1111
|
+
typeorm.Column({ type: 'varchar', unique: true }),
|
|
1112
|
+
typeorm.Index(),
|
|
1223
1113
|
tslib.__metadata("design:type", String)
|
|
1224
1114
|
], exports.HoldInventoryOrderEntityClass.prototype, "key", void 0);
|
|
1225
1115
|
tslib.__decorate([
|
|
1226
|
-
typeorm
|
|
1116
|
+
typeorm.Column({ type: 'varchar', nullable: true }),
|
|
1227
1117
|
tslib.__metadata("design:type", Object)
|
|
1228
1118
|
], exports.HoldInventoryOrderEntityClass.prototype, "createdBy", void 0);
|
|
1229
1119
|
tslib.__decorate([
|
|
1230
|
-
typeorm
|
|
1120
|
+
typeorm.Column({ type: 'timestamptz', nullable: true }),
|
|
1231
1121
|
tslib.__metadata("design:type", Object)
|
|
1232
1122
|
], exports.HoldInventoryOrderEntityClass.prototype, "removedAt", void 0);
|
|
1233
1123
|
tslib.__decorate([
|
|
1234
|
-
typeorm
|
|
1124
|
+
typeorm.CreateDateColumn({ type: 'timestamptz' }),
|
|
1235
1125
|
tslib.__metadata("design:type", Date)
|
|
1236
1126
|
], exports.HoldInventoryOrderEntityClass.prototype, "createdAt", void 0);
|
|
1237
1127
|
tslib.__decorate([
|
|
1238
|
-
typeorm
|
|
1128
|
+
typeorm.OneToMany('hold_inventory_order_items', (entity) => entity.order),
|
|
1239
1129
|
tslib.__metadata("design:type", Array)
|
|
1240
1130
|
], exports.HoldInventoryOrderEntityClass.prototype, "items", void 0);
|
|
1241
1131
|
exports.HoldInventoryOrderEntityClass = tslib.__decorate([
|
|
1242
|
-
typeorm
|
|
1243
|
-
typeorm
|
|
1132
|
+
typeorm.Entity('hold_inventory_orders'),
|
|
1133
|
+
typeorm.TableInheritance({ column: { type: 'varchar', name: 'entityName' } })
|
|
1244
1134
|
], exports.HoldInventoryOrderEntityClass);
|
|
1245
1135
|
|
|
1246
1136
|
const HoldInventoryOrderItemEntity = Symbol('HoldInventoryOrderItemEntity');
|
|
@@ -1260,68 +1150,68 @@ exports.HoldInventoryOrderItemEntityClass = class HoldInventoryOrderItemEntityCl
|
|
|
1260
1150
|
changes;
|
|
1261
1151
|
};
|
|
1262
1152
|
tslib.__decorate([
|
|
1263
|
-
typeorm
|
|
1153
|
+
typeorm.PrimaryGeneratedColumn('uuid'),
|
|
1264
1154
|
tslib.__metadata("design:type", String)
|
|
1265
1155
|
], exports.HoldInventoryOrderItemEntityClass.prototype, "id", void 0);
|
|
1266
1156
|
tslib.__decorate([
|
|
1267
|
-
typeorm
|
|
1268
|
-
typeorm
|
|
1157
|
+
typeorm.Column({ type: 'uuid' }),
|
|
1158
|
+
typeorm.Index(),
|
|
1269
1159
|
tslib.__metadata("design:type", String)
|
|
1270
1160
|
], exports.HoldInventoryOrderItemEntityClass.prototype, "materialId", void 0);
|
|
1271
1161
|
tslib.__decorate([
|
|
1272
|
-
typeorm
|
|
1273
|
-
typeorm
|
|
1162
|
+
typeorm.Column({ type: 'uuid' }),
|
|
1163
|
+
typeorm.Index(),
|
|
1274
1164
|
tslib.__metadata("design:type", String)
|
|
1275
1165
|
], exports.HoldInventoryOrderItemEntityClass.prototype, "batchId", void 0);
|
|
1276
1166
|
tslib.__decorate([
|
|
1277
|
-
typeorm
|
|
1278
|
-
typeorm
|
|
1167
|
+
typeorm.Column({ type: 'uuid', nullable: true }),
|
|
1168
|
+
typeorm.Index(),
|
|
1279
1169
|
tslib.__metadata("design:type", Object)
|
|
1280
1170
|
], exports.HoldInventoryOrderItemEntityClass.prototype, "locationId", void 0);
|
|
1281
1171
|
tslib.__decorate([
|
|
1282
|
-
typeorm
|
|
1172
|
+
typeorm.Column({ type: 'uuid', nullable: true }),
|
|
1283
1173
|
tslib.__metadata("design:type", Object)
|
|
1284
1174
|
], exports.HoldInventoryOrderItemEntityClass.prototype, "loaderId", void 0);
|
|
1285
1175
|
tslib.__decorate([
|
|
1286
|
-
typeorm
|
|
1176
|
+
typeorm.Column({ type: 'numeric' }),
|
|
1287
1177
|
tslib.__metadata("design:type", Number)
|
|
1288
1178
|
], exports.HoldInventoryOrderItemEntityClass.prototype, "targetHeldQuantity", void 0);
|
|
1289
1179
|
tslib.__decorate([
|
|
1290
|
-
typeorm
|
|
1291
|
-
typeorm
|
|
1180
|
+
typeorm.Column({ type: 'uuid' }),
|
|
1181
|
+
typeorm.Index(),
|
|
1292
1182
|
tslib.__metadata("design:type", String)
|
|
1293
1183
|
], exports.HoldInventoryOrderItemEntityClass.prototype, "orderId", void 0);
|
|
1294
1184
|
tslib.__decorate([
|
|
1295
|
-
typeorm
|
|
1185
|
+
typeorm.Column({ type: 'timestamptz', nullable: true }),
|
|
1296
1186
|
tslib.__metadata("design:type", Object)
|
|
1297
1187
|
], exports.HoldInventoryOrderItemEntityClass.prototype, "removedAt", void 0);
|
|
1298
1188
|
tslib.__decorate([
|
|
1299
|
-
typeorm
|
|
1300
|
-
typeorm
|
|
1189
|
+
typeorm.Column({ type: 'uuid', nullable: true }),
|
|
1190
|
+
typeorm.Index(),
|
|
1301
1191
|
tslib.__metadata("design:type", Object)
|
|
1302
1192
|
], exports.HoldInventoryOrderItemEntityClass.prototype, "unitId", void 0);
|
|
1303
1193
|
tslib.__decorate([
|
|
1304
|
-
typeorm
|
|
1305
|
-
typeorm
|
|
1194
|
+
typeorm.ManyToOne('locations'),
|
|
1195
|
+
typeorm.JoinColumn({ name: 'locationId', referencedColumnName: 'id' }),
|
|
1306
1196
|
tslib.__metadata("design:type", exports.LocationEntityClass)
|
|
1307
1197
|
], exports.HoldInventoryOrderItemEntityClass.prototype, "location", void 0);
|
|
1308
1198
|
tslib.__decorate([
|
|
1309
|
-
typeorm
|
|
1310
|
-
typeorm
|
|
1199
|
+
typeorm.ManyToOne('loaders'),
|
|
1200
|
+
typeorm.JoinColumn({ name: 'loaderId', referencedColumnName: 'id' }),
|
|
1311
1201
|
tslib.__metadata("design:type", exports.LoadersEntityClass)
|
|
1312
1202
|
], exports.HoldInventoryOrderItemEntityClass.prototype, "loader", void 0);
|
|
1313
1203
|
tslib.__decorate([
|
|
1314
|
-
typeorm
|
|
1315
|
-
typeorm
|
|
1204
|
+
typeorm.ManyToOne('hold_inventory_orders', (entity) => entity.items, { onDelete: 'CASCADE', orphanedRowAction: 'delete' }),
|
|
1205
|
+
typeorm.JoinColumn({ name: 'orderId', referencedColumnName: 'id' }),
|
|
1316
1206
|
tslib.__metadata("design:type", exports.HoldInventoryOrderEntityClass)
|
|
1317
1207
|
], exports.HoldInventoryOrderItemEntityClass.prototype, "order", void 0);
|
|
1318
1208
|
tslib.__decorate([
|
|
1319
|
-
typeorm
|
|
1209
|
+
typeorm.OneToMany('hold_inventory_order_changes', (change) => change.item),
|
|
1320
1210
|
tslib.__metadata("design:type", Array)
|
|
1321
1211
|
], exports.HoldInventoryOrderItemEntityClass.prototype, "changes", void 0);
|
|
1322
1212
|
exports.HoldInventoryOrderItemEntityClass = tslib.__decorate([
|
|
1323
|
-
typeorm
|
|
1324
|
-
typeorm
|
|
1213
|
+
typeorm.Entity('hold_inventory_order_items'),
|
|
1214
|
+
typeorm.TableInheritance({ column: { type: 'varchar', name: 'entityName' } })
|
|
1325
1215
|
], exports.HoldInventoryOrderItemEntityClass);
|
|
1326
1216
|
|
|
1327
1217
|
const HoldInventoryOrderChangeEntity = Symbol('HoldInventoryOrderChangeEntity');
|
|
@@ -1333,29 +1223,29 @@ exports.HoldInventoryOrderChangeEntityClass = class HoldInventoryOrderChangeEnti
|
|
|
1333
1223
|
item;
|
|
1334
1224
|
};
|
|
1335
1225
|
tslib.__decorate([
|
|
1336
|
-
typeorm
|
|
1226
|
+
typeorm.PrimaryGeneratedColumn('uuid'),
|
|
1337
1227
|
tslib.__metadata("design:type", String)
|
|
1338
1228
|
], exports.HoldInventoryOrderChangeEntityClass.prototype, "id", void 0);
|
|
1339
1229
|
tslib.__decorate([
|
|
1340
|
-
typeorm
|
|
1230
|
+
typeorm.Column({ type: 'uuid' }),
|
|
1341
1231
|
tslib.__metadata("design:type", String)
|
|
1342
1232
|
], exports.HoldInventoryOrderChangeEntityClass.prototype, "itemId", void 0);
|
|
1343
1233
|
tslib.__decorate([
|
|
1344
|
-
typeorm
|
|
1234
|
+
typeorm.Column({ type: 'numeric' }),
|
|
1345
1235
|
tslib.__metadata("design:type", Number)
|
|
1346
1236
|
], exports.HoldInventoryOrderChangeEntityClass.prototype, "quantityChanged", void 0);
|
|
1347
1237
|
tslib.__decorate([
|
|
1348
|
-
typeorm
|
|
1349
|
-
typeorm
|
|
1238
|
+
typeorm.OneToOne('orders'),
|
|
1239
|
+
typeorm.JoinColumn({ name: 'id', referencedColumnName: 'id' }),
|
|
1350
1240
|
tslib.__metadata("design:type", wmsBaseNestjsModule.OrderEntity)
|
|
1351
1241
|
], exports.HoldInventoryOrderChangeEntityClass.prototype, "order", void 0);
|
|
1352
1242
|
tslib.__decorate([
|
|
1353
|
-
typeorm
|
|
1354
|
-
typeorm
|
|
1243
|
+
typeorm.ManyToOne('hold_inventory_order_items', (item) => item.changes, { onDelete: 'CASCADE', orphanedRowAction: 'delete' }),
|
|
1244
|
+
typeorm.JoinColumn({ name: 'itemId', referencedColumnName: 'id' }),
|
|
1355
1245
|
tslib.__metadata("design:type", exports.HoldInventoryOrderItemEntityClass)
|
|
1356
1246
|
], exports.HoldInventoryOrderChangeEntityClass.prototype, "item", void 0);
|
|
1357
1247
|
exports.HoldInventoryOrderChangeEntityClass = tslib.__decorate([
|
|
1358
|
-
typeorm
|
|
1248
|
+
typeorm.Entity('hold_inventory_order_changes')
|
|
1359
1249
|
], exports.HoldInventoryOrderChangeEntityClass);
|
|
1360
1250
|
|
|
1361
1251
|
const AllocateInventoryOrderEntity = Symbol('AllocateInventoryOrderEntity');
|
|
@@ -1366,25 +1256,25 @@ exports.AllocateInventoryOrderEntityClass = class AllocateInventoryOrderEntityCl
|
|
|
1366
1256
|
items;
|
|
1367
1257
|
};
|
|
1368
1258
|
tslib.__decorate([
|
|
1369
|
-
typeorm
|
|
1259
|
+
typeorm.PrimaryGeneratedColumn('uuid'),
|
|
1370
1260
|
tslib.__metadata("design:type", String)
|
|
1371
1261
|
], exports.AllocateInventoryOrderEntityClass.prototype, "id", void 0);
|
|
1372
1262
|
tslib.__decorate([
|
|
1373
|
-
typeorm
|
|
1374
|
-
typeorm
|
|
1263
|
+
typeorm.Column({ type: 'varchar', unique: true }),
|
|
1264
|
+
typeorm.Index(),
|
|
1375
1265
|
tslib.__metadata("design:type", String)
|
|
1376
1266
|
], exports.AllocateInventoryOrderEntityClass.prototype, "key", void 0);
|
|
1377
1267
|
tslib.__decorate([
|
|
1378
|
-
typeorm
|
|
1268
|
+
typeorm.CreateDateColumn({ type: 'timestamptz' }),
|
|
1379
1269
|
tslib.__metadata("design:type", Date)
|
|
1380
1270
|
], exports.AllocateInventoryOrderEntityClass.prototype, "createdAt", void 0);
|
|
1381
1271
|
tslib.__decorate([
|
|
1382
|
-
typeorm
|
|
1272
|
+
typeorm.OneToMany('allocate_inventory_order_items', (entity) => entity.order),
|
|
1383
1273
|
tslib.__metadata("design:type", Array)
|
|
1384
1274
|
], exports.AllocateInventoryOrderEntityClass.prototype, "items", void 0);
|
|
1385
1275
|
exports.AllocateInventoryOrderEntityClass = tslib.__decorate([
|
|
1386
|
-
typeorm
|
|
1387
|
-
typeorm
|
|
1276
|
+
typeorm.Entity('allocate_inventory_orders'),
|
|
1277
|
+
typeorm.TableInheritance({ column: { type: 'varchar', name: 'entityName' } })
|
|
1388
1278
|
], exports.AllocateInventoryOrderEntityClass);
|
|
1389
1279
|
|
|
1390
1280
|
const AllocateInventoryOrderItemEntity = Symbol('AllocateInventoryOrderItemEntity');
|
|
@@ -1405,73 +1295,73 @@ exports.AllocateInventoryOrderItemEntityClass = class AllocateInventoryOrderItem
|
|
|
1405
1295
|
changes;
|
|
1406
1296
|
};
|
|
1407
1297
|
tslib.__decorate([
|
|
1408
|
-
typeorm
|
|
1298
|
+
typeorm.PrimaryGeneratedColumn('uuid'),
|
|
1409
1299
|
tslib.__metadata("design:type", String)
|
|
1410
1300
|
], exports.AllocateInventoryOrderItemEntityClass.prototype, "id", void 0);
|
|
1411
1301
|
tslib.__decorate([
|
|
1412
|
-
typeorm
|
|
1413
|
-
typeorm
|
|
1302
|
+
typeorm.Column({ type: 'uuid' }),
|
|
1303
|
+
typeorm.Index(),
|
|
1414
1304
|
tslib.__metadata("design:type", String)
|
|
1415
1305
|
], exports.AllocateInventoryOrderItemEntityClass.prototype, "materialId", void 0);
|
|
1416
1306
|
tslib.__decorate([
|
|
1417
|
-
typeorm
|
|
1418
|
-
typeorm
|
|
1307
|
+
typeorm.Column({ type: 'uuid' }),
|
|
1308
|
+
typeorm.Index(),
|
|
1419
1309
|
tslib.__metadata("design:type", String)
|
|
1420
1310
|
], exports.AllocateInventoryOrderItemEntityClass.prototype, "batchId", void 0);
|
|
1421
1311
|
tslib.__decorate([
|
|
1422
|
-
typeorm
|
|
1423
|
-
typeorm
|
|
1312
|
+
typeorm.Column({ type: 'uuid', nullable: true }),
|
|
1313
|
+
typeorm.Index(),
|
|
1424
1314
|
tslib.__metadata("design:type", Object)
|
|
1425
1315
|
], exports.AllocateInventoryOrderItemEntityClass.prototype, "unitId", void 0);
|
|
1426
1316
|
tslib.__decorate([
|
|
1427
|
-
typeorm
|
|
1428
|
-
typeorm
|
|
1317
|
+
typeorm.Column({ type: 'uuid', nullable: true }),
|
|
1318
|
+
typeorm.Index(),
|
|
1429
1319
|
tslib.__metadata("design:type", Object)
|
|
1430
1320
|
], exports.AllocateInventoryOrderItemEntityClass.prototype, "locationId", void 0);
|
|
1431
1321
|
tslib.__decorate([
|
|
1432
|
-
typeorm
|
|
1433
|
-
typeorm
|
|
1322
|
+
typeorm.Column({ type: 'uuid', nullable: true }),
|
|
1323
|
+
typeorm.Index(),
|
|
1434
1324
|
tslib.__metadata("design:type", Object)
|
|
1435
1325
|
], exports.AllocateInventoryOrderItemEntityClass.prototype, "loaderId", void 0);
|
|
1436
1326
|
tslib.__decorate([
|
|
1437
|
-
typeorm
|
|
1327
|
+
typeorm.Column({ type: 'numeric' }),
|
|
1438
1328
|
tslib.__metadata("design:type", Number)
|
|
1439
1329
|
], exports.AllocateInventoryOrderItemEntityClass.prototype, "targetAllocatedQuantity", void 0);
|
|
1440
1330
|
tslib.__decorate([
|
|
1441
|
-
typeorm
|
|
1442
|
-
typeorm
|
|
1331
|
+
typeorm.Column({ type: 'uuid' }),
|
|
1332
|
+
typeorm.Index(),
|
|
1443
1333
|
tslib.__metadata("design:type", String)
|
|
1444
1334
|
], exports.AllocateInventoryOrderItemEntityClass.prototype, "orderId", void 0);
|
|
1445
1335
|
tslib.__decorate([
|
|
1446
|
-
typeorm
|
|
1336
|
+
typeorm.Column({ type: 'varchar' }),
|
|
1447
1337
|
tslib.__metadata("design:type", String)
|
|
1448
1338
|
], exports.AllocateInventoryOrderItemEntityClass.prototype, "saleId", void 0);
|
|
1449
1339
|
tslib.__decorate([
|
|
1450
|
-
typeorm
|
|
1340
|
+
typeorm.Column({ type: 'varchar' }),
|
|
1451
1341
|
tslib.__metadata("design:type", String)
|
|
1452
1342
|
], exports.AllocateInventoryOrderItemEntityClass.prototype, "saleSerialId", void 0);
|
|
1453
1343
|
tslib.__decorate([
|
|
1454
|
-
typeorm
|
|
1455
|
-
typeorm
|
|
1344
|
+
typeorm.ManyToOne('locations'),
|
|
1345
|
+
typeorm.JoinColumn({ name: 'locationId', referencedColumnName: 'id' }),
|
|
1456
1346
|
tslib.__metadata("design:type", exports.LocationEntityClass)
|
|
1457
1347
|
], exports.AllocateInventoryOrderItemEntityClass.prototype, "location", void 0);
|
|
1458
1348
|
tslib.__decorate([
|
|
1459
|
-
typeorm
|
|
1460
|
-
typeorm
|
|
1349
|
+
typeorm.ManyToOne('loaders'),
|
|
1350
|
+
typeorm.JoinColumn({ name: 'loaderId', referencedColumnName: 'id' }),
|
|
1461
1351
|
tslib.__metadata("design:type", exports.LoadersEntityClass)
|
|
1462
1352
|
], exports.AllocateInventoryOrderItemEntityClass.prototype, "loader", void 0);
|
|
1463
1353
|
tslib.__decorate([
|
|
1464
|
-
typeorm
|
|
1465
|
-
typeorm
|
|
1354
|
+
typeorm.ManyToOne('allocate_inventory_orders', (entity) => entity.items),
|
|
1355
|
+
typeorm.JoinColumn({ name: 'orderId', referencedColumnName: 'id' }),
|
|
1466
1356
|
tslib.__metadata("design:type", exports.AllocateInventoryOrderEntityClass)
|
|
1467
1357
|
], exports.AllocateInventoryOrderItemEntityClass.prototype, "order", void 0);
|
|
1468
1358
|
tslib.__decorate([
|
|
1469
|
-
typeorm
|
|
1359
|
+
typeorm.ManyToOne('allocate_inventory_order_changes', (change) => change.item),
|
|
1470
1360
|
tslib.__metadata("design:type", Array)
|
|
1471
1361
|
], exports.AllocateInventoryOrderItemEntityClass.prototype, "changes", void 0);
|
|
1472
1362
|
exports.AllocateInventoryOrderItemEntityClass = tslib.__decorate([
|
|
1473
|
-
typeorm
|
|
1474
|
-
typeorm
|
|
1363
|
+
typeorm.Entity('allocate_inventory_order_items'),
|
|
1364
|
+
typeorm.TableInheritance({ column: { type: 'varchar', name: 'entityName' } })
|
|
1475
1365
|
], exports.AllocateInventoryOrderItemEntityClass);
|
|
1476
1366
|
|
|
1477
1367
|
const AllocateInventoryOrderChangeEntity = Symbol('AllocateInventoryOrderChangeEntity');
|
|
@@ -1483,29 +1373,29 @@ exports.AllocateInventoryOrderChangeEntityClass = class AllocateInventoryOrderCh
|
|
|
1483
1373
|
item;
|
|
1484
1374
|
};
|
|
1485
1375
|
tslib.__decorate([
|
|
1486
|
-
typeorm
|
|
1376
|
+
typeorm.PrimaryGeneratedColumn('uuid'),
|
|
1487
1377
|
tslib.__metadata("design:type", String)
|
|
1488
1378
|
], exports.AllocateInventoryOrderChangeEntityClass.prototype, "id", void 0);
|
|
1489
1379
|
tslib.__decorate([
|
|
1490
|
-
typeorm
|
|
1380
|
+
typeorm.Column({ type: 'uuid' }),
|
|
1491
1381
|
tslib.__metadata("design:type", String)
|
|
1492
1382
|
], exports.AllocateInventoryOrderChangeEntityClass.prototype, "itemId", void 0);
|
|
1493
1383
|
tslib.__decorate([
|
|
1494
|
-
typeorm
|
|
1384
|
+
typeorm.Column({ type: 'numeric' }),
|
|
1495
1385
|
tslib.__metadata("design:type", Number)
|
|
1496
1386
|
], exports.AllocateInventoryOrderChangeEntityClass.prototype, "quantityChanged", void 0);
|
|
1497
1387
|
tslib.__decorate([
|
|
1498
|
-
typeorm
|
|
1499
|
-
typeorm
|
|
1388
|
+
typeorm.OneToOne('orders'),
|
|
1389
|
+
typeorm.JoinColumn({ name: 'id', referencedColumnName: 'id' }),
|
|
1500
1390
|
tslib.__metadata("design:type", wmsBaseNestjsModule.OrderEntity)
|
|
1501
1391
|
], exports.AllocateInventoryOrderChangeEntityClass.prototype, "order", void 0);
|
|
1502
1392
|
tslib.__decorate([
|
|
1503
|
-
typeorm
|
|
1504
|
-
typeorm
|
|
1393
|
+
typeorm.ManyToOne('allocate_inventory_order_items', (item) => item.changes),
|
|
1394
|
+
typeorm.JoinColumn({ name: 'itemId', referencedColumnName: 'id' }),
|
|
1505
1395
|
tslib.__metadata("design:type", exports.AllocateInventoryOrderItemEntityClass)
|
|
1506
1396
|
], exports.AllocateInventoryOrderChangeEntityClass.prototype, "item", void 0);
|
|
1507
1397
|
exports.AllocateInventoryOrderChangeEntityClass = tslib.__decorate([
|
|
1508
|
-
typeorm
|
|
1398
|
+
typeorm.Entity('allocate_inventory_order_changes')
|
|
1509
1399
|
], exports.AllocateInventoryOrderChangeEntityClass);
|
|
1510
1400
|
|
|
1511
1401
|
const SplitBatchOrderEntity = Symbol('SplitBatchOrderEntity');
|
|
@@ -1516,25 +1406,25 @@ exports.SplitBatchOrderEntityClass = class SplitBatchOrderEntityClass {
|
|
|
1516
1406
|
items;
|
|
1517
1407
|
};
|
|
1518
1408
|
tslib.__decorate([
|
|
1519
|
-
typeorm
|
|
1409
|
+
typeorm.PrimaryGeneratedColumn('uuid'),
|
|
1520
1410
|
tslib.__metadata("design:type", String)
|
|
1521
1411
|
], exports.SplitBatchOrderEntityClass.prototype, "id", void 0);
|
|
1522
1412
|
tslib.__decorate([
|
|
1523
|
-
typeorm
|
|
1524
|
-
typeorm
|
|
1413
|
+
typeorm.Column({ type: 'varchar', unique: true }),
|
|
1414
|
+
typeorm.Index(),
|
|
1525
1415
|
tslib.__metadata("design:type", String)
|
|
1526
1416
|
], exports.SplitBatchOrderEntityClass.prototype, "key", void 0);
|
|
1527
1417
|
tslib.__decorate([
|
|
1528
|
-
typeorm
|
|
1418
|
+
typeorm.CreateDateColumn({ type: 'timestamptz' }),
|
|
1529
1419
|
tslib.__metadata("design:type", Date)
|
|
1530
1420
|
], exports.SplitBatchOrderEntityClass.prototype, "createdAt", void 0);
|
|
1531
1421
|
tslib.__decorate([
|
|
1532
|
-
typeorm
|
|
1422
|
+
typeorm.OneToMany('split_batch_order_items', (entity) => entity.order),
|
|
1533
1423
|
tslib.__metadata("design:type", Array)
|
|
1534
1424
|
], exports.SplitBatchOrderEntityClass.prototype, "items", void 0);
|
|
1535
1425
|
exports.SplitBatchOrderEntityClass = tslib.__decorate([
|
|
1536
|
-
typeorm
|
|
1537
|
-
typeorm
|
|
1426
|
+
typeorm.Entity('split_batch_orders'),
|
|
1427
|
+
typeorm.TableInheritance({ column: { type: 'varchar', name: 'entityName' } })
|
|
1538
1428
|
], exports.SplitBatchOrderEntityClass);
|
|
1539
1429
|
|
|
1540
1430
|
const SplitBatchOrderItemEntity = Symbol('SplitBatchOrderItemEntity');
|
|
@@ -1550,49 +1440,49 @@ exports.SplitBatchOrderItemEntityClass = class SplitBatchOrderItemEntityClass {
|
|
|
1550
1440
|
changes;
|
|
1551
1441
|
};
|
|
1552
1442
|
tslib.__decorate([
|
|
1553
|
-
typeorm
|
|
1443
|
+
typeorm.PrimaryGeneratedColumn('uuid'),
|
|
1554
1444
|
tslib.__metadata("design:type", String)
|
|
1555
1445
|
], exports.SplitBatchOrderItemEntityClass.prototype, "id", void 0);
|
|
1556
1446
|
tslib.__decorate([
|
|
1557
|
-
typeorm
|
|
1558
|
-
typeorm
|
|
1447
|
+
typeorm.Column({ type: 'uuid', nullable: true }),
|
|
1448
|
+
typeorm.Index(),
|
|
1559
1449
|
tslib.__metadata("design:type", Object)
|
|
1560
1450
|
], exports.SplitBatchOrderItemEntityClass.prototype, "locationId", void 0);
|
|
1561
1451
|
tslib.__decorate([
|
|
1562
|
-
typeorm
|
|
1452
|
+
typeorm.Column({ type: 'uuid', nullable: true }),
|
|
1563
1453
|
tslib.__metadata("design:type", Object)
|
|
1564
1454
|
], exports.SplitBatchOrderItemEntityClass.prototype, "loaderId", void 0);
|
|
1565
1455
|
tslib.__decorate([
|
|
1566
|
-
typeorm
|
|
1456
|
+
typeorm.Column({ type: 'numeric' }),
|
|
1567
1457
|
tslib.__metadata("design:type", Number)
|
|
1568
1458
|
], exports.SplitBatchOrderItemEntityClass.prototype, "targetSplitQuantity", void 0);
|
|
1569
1459
|
tslib.__decorate([
|
|
1570
|
-
typeorm
|
|
1571
|
-
typeorm
|
|
1460
|
+
typeorm.Column({ type: 'uuid' }),
|
|
1461
|
+
typeorm.Index(),
|
|
1572
1462
|
tslib.__metadata("design:type", String)
|
|
1573
1463
|
], exports.SplitBatchOrderItemEntityClass.prototype, "orderId", void 0);
|
|
1574
1464
|
tslib.__decorate([
|
|
1575
|
-
typeorm
|
|
1576
|
-
typeorm
|
|
1465
|
+
typeorm.ManyToOne('locations'),
|
|
1466
|
+
typeorm.JoinColumn({ name: 'locationId', referencedColumnName: 'id' }),
|
|
1577
1467
|
tslib.__metadata("design:type", exports.LocationEntityClass)
|
|
1578
1468
|
], exports.SplitBatchOrderItemEntityClass.prototype, "location", void 0);
|
|
1579
1469
|
tslib.__decorate([
|
|
1580
|
-
typeorm
|
|
1581
|
-
typeorm
|
|
1470
|
+
typeorm.ManyToOne('loaders'),
|
|
1471
|
+
typeorm.JoinColumn({ name: 'loaderId', referencedColumnName: 'id' }),
|
|
1582
1472
|
tslib.__metadata("design:type", exports.LoadersEntityClass)
|
|
1583
1473
|
], exports.SplitBatchOrderItemEntityClass.prototype, "loader", void 0);
|
|
1584
1474
|
tslib.__decorate([
|
|
1585
|
-
typeorm
|
|
1586
|
-
typeorm
|
|
1475
|
+
typeorm.ManyToOne('split_batch_orders', (entity) => entity.items),
|
|
1476
|
+
typeorm.JoinColumn({ name: 'orderId', referencedColumnName: 'id' }),
|
|
1587
1477
|
tslib.__metadata("design:type", exports.SplitBatchOrderEntityClass)
|
|
1588
1478
|
], exports.SplitBatchOrderItemEntityClass.prototype, "order", void 0);
|
|
1589
1479
|
tslib.__decorate([
|
|
1590
|
-
typeorm
|
|
1480
|
+
typeorm.ManyToOne('split_batch_order_changes', (change) => change.item),
|
|
1591
1481
|
tslib.__metadata("design:type", Array)
|
|
1592
1482
|
], exports.SplitBatchOrderItemEntityClass.prototype, "changes", void 0);
|
|
1593
1483
|
exports.SplitBatchOrderItemEntityClass = tslib.__decorate([
|
|
1594
|
-
typeorm
|
|
1595
|
-
typeorm
|
|
1484
|
+
typeorm.Entity('split_batch_order_items'),
|
|
1485
|
+
typeorm.TableInheritance({ column: { type: 'varchar', name: 'entityName' } })
|
|
1596
1486
|
], exports.SplitBatchOrderItemEntityClass);
|
|
1597
1487
|
|
|
1598
1488
|
const SplitBatchOrderChangeEntity = Symbol('SplitBatchOrderChangeEntity');
|
|
@@ -1604,29 +1494,29 @@ exports.SplitBatchOrderChangeEntityClass = class SplitBatchOrderChangeEntityClas
|
|
|
1604
1494
|
item;
|
|
1605
1495
|
};
|
|
1606
1496
|
tslib.__decorate([
|
|
1607
|
-
typeorm
|
|
1497
|
+
typeorm.PrimaryGeneratedColumn('uuid'),
|
|
1608
1498
|
tslib.__metadata("design:type", String)
|
|
1609
1499
|
], exports.SplitBatchOrderChangeEntityClass.prototype, "id", void 0);
|
|
1610
1500
|
tslib.__decorate([
|
|
1611
|
-
typeorm
|
|
1501
|
+
typeorm.Column({ type: 'uuid' }),
|
|
1612
1502
|
tslib.__metadata("design:type", String)
|
|
1613
1503
|
], exports.SplitBatchOrderChangeEntityClass.prototype, "itemId", void 0);
|
|
1614
1504
|
tslib.__decorate([
|
|
1615
|
-
typeorm
|
|
1505
|
+
typeorm.Column({ type: 'numeric' }),
|
|
1616
1506
|
tslib.__metadata("design:type", Number)
|
|
1617
1507
|
], exports.SplitBatchOrderChangeEntityClass.prototype, "quantityChanged", void 0);
|
|
1618
1508
|
tslib.__decorate([
|
|
1619
|
-
typeorm
|
|
1620
|
-
typeorm
|
|
1509
|
+
typeorm.OneToOne('orders'),
|
|
1510
|
+
typeorm.JoinColumn({ name: 'id', referencedColumnName: 'id' }),
|
|
1621
1511
|
tslib.__metadata("design:type", wmsBaseNestjsModule.OrderEntity)
|
|
1622
1512
|
], exports.SplitBatchOrderChangeEntityClass.prototype, "order", void 0);
|
|
1623
1513
|
tslib.__decorate([
|
|
1624
|
-
typeorm
|
|
1625
|
-
typeorm
|
|
1514
|
+
typeorm.ManyToOne('split_batch_order_items', (item) => item.changes),
|
|
1515
|
+
typeorm.JoinColumn({ name: 'itemId', referencedColumnName: 'id' }),
|
|
1626
1516
|
tslib.__metadata("design:type", exports.SplitBatchOrderItemEntityClass)
|
|
1627
1517
|
], exports.SplitBatchOrderChangeEntityClass.prototype, "item", void 0);
|
|
1628
1518
|
exports.SplitBatchOrderChangeEntityClass = tslib.__decorate([
|
|
1629
|
-
typeorm
|
|
1519
|
+
typeorm.Entity('split_batch_order_changes')
|
|
1630
1520
|
], exports.SplitBatchOrderChangeEntityClass);
|
|
1631
1521
|
|
|
1632
1522
|
const MergeBatchOrderEntity = Symbol('MergeBatchOrderEntity');
|
|
@@ -1637,25 +1527,25 @@ exports.MergeBatchOrderEntityClass = class MergeBatchOrderEntityClass {
|
|
|
1637
1527
|
items;
|
|
1638
1528
|
};
|
|
1639
1529
|
tslib.__decorate([
|
|
1640
|
-
typeorm
|
|
1530
|
+
typeorm.PrimaryGeneratedColumn('uuid'),
|
|
1641
1531
|
tslib.__metadata("design:type", String)
|
|
1642
1532
|
], exports.MergeBatchOrderEntityClass.prototype, "id", void 0);
|
|
1643
1533
|
tslib.__decorate([
|
|
1644
|
-
typeorm
|
|
1645
|
-
typeorm
|
|
1534
|
+
typeorm.Column({ type: 'varchar', unique: true }),
|
|
1535
|
+
typeorm.Index(),
|
|
1646
1536
|
tslib.__metadata("design:type", String)
|
|
1647
1537
|
], exports.MergeBatchOrderEntityClass.prototype, "key", void 0);
|
|
1648
1538
|
tslib.__decorate([
|
|
1649
|
-
typeorm
|
|
1539
|
+
typeorm.CreateDateColumn({ type: 'timestamptz' }),
|
|
1650
1540
|
tslib.__metadata("design:type", Date)
|
|
1651
1541
|
], exports.MergeBatchOrderEntityClass.prototype, "createdAt", void 0);
|
|
1652
1542
|
tslib.__decorate([
|
|
1653
|
-
typeorm
|
|
1543
|
+
typeorm.OneToMany('merge_batch_order_items', (entity) => entity.order),
|
|
1654
1544
|
tslib.__metadata("design:type", Array)
|
|
1655
1545
|
], exports.MergeBatchOrderEntityClass.prototype, "items", void 0);
|
|
1656
1546
|
exports.MergeBatchOrderEntityClass = tslib.__decorate([
|
|
1657
|
-
typeorm
|
|
1658
|
-
typeorm
|
|
1547
|
+
typeorm.Entity('merge_batch_orders'),
|
|
1548
|
+
typeorm.TableInheritance({ column: { type: 'varchar', name: 'entityName' } })
|
|
1659
1549
|
], exports.MergeBatchOrderEntityClass);
|
|
1660
1550
|
|
|
1661
1551
|
const MergeBatchOrderItemEntity = Symbol('MergeBatchOrderItemEntity');
|
|
@@ -1671,49 +1561,49 @@ exports.MergeBatchOrderItemEntityClass = class MergeBatchOrderItemEntityClass {
|
|
|
1671
1561
|
changes;
|
|
1672
1562
|
};
|
|
1673
1563
|
tslib.__decorate([
|
|
1674
|
-
typeorm
|
|
1564
|
+
typeorm.PrimaryGeneratedColumn('uuid'),
|
|
1675
1565
|
tslib.__metadata("design:type", String)
|
|
1676
1566
|
], exports.MergeBatchOrderItemEntityClass.prototype, "id", void 0);
|
|
1677
1567
|
tslib.__decorate([
|
|
1678
|
-
typeorm
|
|
1679
|
-
typeorm
|
|
1568
|
+
typeorm.Column({ type: 'uuid' }),
|
|
1569
|
+
typeorm.Index(),
|
|
1680
1570
|
tslib.__metadata("design:type", String)
|
|
1681
1571
|
], exports.MergeBatchOrderItemEntityClass.prototype, "locationId", void 0);
|
|
1682
1572
|
tslib.__decorate([
|
|
1683
|
-
typeorm
|
|
1573
|
+
typeorm.Column({ type: 'uuid', nullable: true }),
|
|
1684
1574
|
tslib.__metadata("design:type", Object)
|
|
1685
1575
|
], exports.MergeBatchOrderItemEntityClass.prototype, "loaderId", void 0);
|
|
1686
1576
|
tslib.__decorate([
|
|
1687
|
-
typeorm
|
|
1577
|
+
typeorm.Column({ type: 'numeric' }),
|
|
1688
1578
|
tslib.__metadata("design:type", Number)
|
|
1689
1579
|
], exports.MergeBatchOrderItemEntityClass.prototype, "targetMergedQuantity", void 0);
|
|
1690
1580
|
tslib.__decorate([
|
|
1691
|
-
typeorm
|
|
1692
|
-
typeorm
|
|
1581
|
+
typeorm.Column({ type: 'uuid' }),
|
|
1582
|
+
typeorm.Index(),
|
|
1693
1583
|
tslib.__metadata("design:type", String)
|
|
1694
1584
|
], exports.MergeBatchOrderItemEntityClass.prototype, "orderId", void 0);
|
|
1695
1585
|
tslib.__decorate([
|
|
1696
|
-
typeorm
|
|
1697
|
-
typeorm
|
|
1586
|
+
typeorm.ManyToOne('locations'),
|
|
1587
|
+
typeorm.JoinColumn({ name: 'locationId', referencedColumnName: 'id' }),
|
|
1698
1588
|
tslib.__metadata("design:type", exports.LocationEntityClass)
|
|
1699
1589
|
], exports.MergeBatchOrderItemEntityClass.prototype, "location", void 0);
|
|
1700
1590
|
tslib.__decorate([
|
|
1701
|
-
typeorm
|
|
1702
|
-
typeorm
|
|
1591
|
+
typeorm.ManyToOne('loaders'),
|
|
1592
|
+
typeorm.JoinColumn({ name: 'loaderId', referencedColumnName: 'id' }),
|
|
1703
1593
|
tslib.__metadata("design:type", exports.LoadersEntityClass)
|
|
1704
1594
|
], exports.MergeBatchOrderItemEntityClass.prototype, "loader", void 0);
|
|
1705
1595
|
tslib.__decorate([
|
|
1706
|
-
typeorm
|
|
1707
|
-
typeorm
|
|
1596
|
+
typeorm.ManyToOne('merge_batch_orders', (entity) => entity.items),
|
|
1597
|
+
typeorm.JoinColumn({ name: 'orderId', referencedColumnName: 'id' }),
|
|
1708
1598
|
tslib.__metadata("design:type", exports.MergeBatchOrderEntityClass)
|
|
1709
1599
|
], exports.MergeBatchOrderItemEntityClass.prototype, "order", void 0);
|
|
1710
1600
|
tslib.__decorate([
|
|
1711
|
-
typeorm
|
|
1601
|
+
typeorm.ManyToOne('merge_batch_order_changes', (change) => change.item),
|
|
1712
1602
|
tslib.__metadata("design:type", Array)
|
|
1713
1603
|
], exports.MergeBatchOrderItemEntityClass.prototype, "changes", void 0);
|
|
1714
1604
|
exports.MergeBatchOrderItemEntityClass = tslib.__decorate([
|
|
1715
|
-
typeorm
|
|
1716
|
-
typeorm
|
|
1605
|
+
typeorm.Entity('merge_batch_order_items'),
|
|
1606
|
+
typeorm.TableInheritance({ column: { type: 'varchar', name: 'entityName' } })
|
|
1717
1607
|
], exports.MergeBatchOrderItemEntityClass);
|
|
1718
1608
|
|
|
1719
1609
|
const MergeBatchOrderChangeEntity = Symbol('MergeBatchOrderChangeEntity');
|
|
@@ -1725,29 +1615,29 @@ exports.MergeBatchOrderChangeEntityClass = class MergeBatchOrderChangeEntityClas
|
|
|
1725
1615
|
item;
|
|
1726
1616
|
};
|
|
1727
1617
|
tslib.__decorate([
|
|
1728
|
-
typeorm
|
|
1618
|
+
typeorm.PrimaryGeneratedColumn('uuid'),
|
|
1729
1619
|
tslib.__metadata("design:type", String)
|
|
1730
1620
|
], exports.MergeBatchOrderChangeEntityClass.prototype, "id", void 0);
|
|
1731
1621
|
tslib.__decorate([
|
|
1732
|
-
typeorm
|
|
1622
|
+
typeorm.Column({ type: 'uuid' }),
|
|
1733
1623
|
tslib.__metadata("design:type", String)
|
|
1734
1624
|
], exports.MergeBatchOrderChangeEntityClass.prototype, "itemId", void 0);
|
|
1735
1625
|
tslib.__decorate([
|
|
1736
|
-
typeorm
|
|
1626
|
+
typeorm.Column({ type: 'numeric' }),
|
|
1737
1627
|
tslib.__metadata("design:type", Number)
|
|
1738
1628
|
], exports.MergeBatchOrderChangeEntityClass.prototype, "quantityChanged", void 0);
|
|
1739
1629
|
tslib.__decorate([
|
|
1740
|
-
typeorm
|
|
1741
|
-
typeorm
|
|
1630
|
+
typeorm.OneToOne('orders'),
|
|
1631
|
+
typeorm.JoinColumn({ name: 'id', referencedColumnName: 'id' }),
|
|
1742
1632
|
tslib.__metadata("design:type", wmsBaseNestjsModule.OrderEntity)
|
|
1743
1633
|
], exports.MergeBatchOrderChangeEntityClass.prototype, "order", void 0);
|
|
1744
1634
|
tslib.__decorate([
|
|
1745
|
-
typeorm
|
|
1746
|
-
typeorm
|
|
1635
|
+
typeorm.ManyToOne('merge_batch_order_items', (item) => item.changes),
|
|
1636
|
+
typeorm.JoinColumn({ name: 'itemId', referencedColumnName: 'id' }),
|
|
1747
1637
|
tslib.__metadata("design:type", exports.MergeBatchOrderItemEntityClass)
|
|
1748
1638
|
], exports.MergeBatchOrderChangeEntityClass.prototype, "item", void 0);
|
|
1749
1639
|
exports.MergeBatchOrderChangeEntityClass = tslib.__decorate([
|
|
1750
|
-
typeorm
|
|
1640
|
+
typeorm.Entity('merge_batch_order_changes')
|
|
1751
1641
|
], exports.MergeBatchOrderChangeEntityClass);
|
|
1752
1642
|
|
|
1753
1643
|
const ReclassifyInventoryOrderEntity = Symbol('ReclassifyInventoryOrderEntity');
|
|
@@ -1758,25 +1648,25 @@ exports.ReclassifyInventoryOrderEntityClass = class ReclassifyInventoryOrderEnti
|
|
|
1758
1648
|
items;
|
|
1759
1649
|
};
|
|
1760
1650
|
tslib.__decorate([
|
|
1761
|
-
typeorm
|
|
1651
|
+
typeorm.PrimaryGeneratedColumn('uuid'),
|
|
1762
1652
|
tslib.__metadata("design:type", String)
|
|
1763
1653
|
], exports.ReclassifyInventoryOrderEntityClass.prototype, "id", void 0);
|
|
1764
1654
|
tslib.__decorate([
|
|
1765
|
-
typeorm
|
|
1766
|
-
typeorm
|
|
1655
|
+
typeorm.Column({ type: 'varchar', unique: true }),
|
|
1656
|
+
typeorm.Index(),
|
|
1767
1657
|
tslib.__metadata("design:type", String)
|
|
1768
1658
|
], exports.ReclassifyInventoryOrderEntityClass.prototype, "key", void 0);
|
|
1769
1659
|
tslib.__decorate([
|
|
1770
|
-
typeorm
|
|
1660
|
+
typeorm.CreateDateColumn({ type: 'timestamptz' }),
|
|
1771
1661
|
tslib.__metadata("design:type", Date)
|
|
1772
1662
|
], exports.ReclassifyInventoryOrderEntityClass.prototype, "createdAt", void 0);
|
|
1773
1663
|
tslib.__decorate([
|
|
1774
|
-
typeorm
|
|
1664
|
+
typeorm.OneToMany('reclassify_inventory_order_items', (entity) => entity.order),
|
|
1775
1665
|
tslib.__metadata("design:type", Array)
|
|
1776
1666
|
], exports.ReclassifyInventoryOrderEntityClass.prototype, "items", void 0);
|
|
1777
1667
|
exports.ReclassifyInventoryOrderEntityClass = tslib.__decorate([
|
|
1778
|
-
typeorm
|
|
1779
|
-
typeorm
|
|
1668
|
+
typeorm.Entity('reclassify_inventory_orders'),
|
|
1669
|
+
typeorm.TableInheritance({ column: { type: 'varchar', name: 'entityName' } })
|
|
1780
1670
|
], exports.ReclassifyInventoryOrderEntityClass);
|
|
1781
1671
|
|
|
1782
1672
|
const ReclassifyInventoryOrderItemEntity = Symbol('ReclassifyInventoryOrderItemEntity');
|
|
@@ -1792,49 +1682,49 @@ exports.ReclassifyInventoryOrderItemEntityClass = class ReclassifyInventoryOrder
|
|
|
1792
1682
|
changes;
|
|
1793
1683
|
};
|
|
1794
1684
|
tslib.__decorate([
|
|
1795
|
-
typeorm
|
|
1685
|
+
typeorm.PrimaryGeneratedColumn('uuid'),
|
|
1796
1686
|
tslib.__metadata("design:type", String)
|
|
1797
1687
|
], exports.ReclassifyInventoryOrderItemEntityClass.prototype, "id", void 0);
|
|
1798
1688
|
tslib.__decorate([
|
|
1799
|
-
typeorm
|
|
1800
|
-
typeorm
|
|
1689
|
+
typeorm.Column({ type: 'uuid' }),
|
|
1690
|
+
typeorm.Index(),
|
|
1801
1691
|
tslib.__metadata("design:type", String)
|
|
1802
1692
|
], exports.ReclassifyInventoryOrderItemEntityClass.prototype, "locationId", void 0);
|
|
1803
1693
|
tslib.__decorate([
|
|
1804
|
-
typeorm
|
|
1694
|
+
typeorm.Column({ type: 'uuid', nullable: true }),
|
|
1805
1695
|
tslib.__metadata("design:type", Object)
|
|
1806
1696
|
], exports.ReclassifyInventoryOrderItemEntityClass.prototype, "loaderId", void 0);
|
|
1807
1697
|
tslib.__decorate([
|
|
1808
|
-
typeorm
|
|
1698
|
+
typeorm.Column({ type: 'numeric' }),
|
|
1809
1699
|
tslib.__metadata("design:type", Number)
|
|
1810
1700
|
], exports.ReclassifyInventoryOrderItemEntityClass.prototype, "targetReclassifiedQuantity", void 0);
|
|
1811
1701
|
tslib.__decorate([
|
|
1812
|
-
typeorm
|
|
1813
|
-
typeorm
|
|
1702
|
+
typeorm.Column({ type: 'uuid' }),
|
|
1703
|
+
typeorm.Index(),
|
|
1814
1704
|
tslib.__metadata("design:type", String)
|
|
1815
1705
|
], exports.ReclassifyInventoryOrderItemEntityClass.prototype, "orderId", void 0);
|
|
1816
1706
|
tslib.__decorate([
|
|
1817
|
-
typeorm
|
|
1818
|
-
typeorm
|
|
1707
|
+
typeorm.ManyToOne('locations'),
|
|
1708
|
+
typeorm.JoinColumn({ name: 'locationId', referencedColumnName: 'id' }),
|
|
1819
1709
|
tslib.__metadata("design:type", exports.LocationEntityClass)
|
|
1820
1710
|
], exports.ReclassifyInventoryOrderItemEntityClass.prototype, "location", void 0);
|
|
1821
1711
|
tslib.__decorate([
|
|
1822
|
-
typeorm
|
|
1823
|
-
typeorm
|
|
1712
|
+
typeorm.ManyToOne('loaders'),
|
|
1713
|
+
typeorm.JoinColumn({ name: 'loaderId', referencedColumnName: 'id' }),
|
|
1824
1714
|
tslib.__metadata("design:type", exports.LoadersEntityClass)
|
|
1825
1715
|
], exports.ReclassifyInventoryOrderItemEntityClass.prototype, "loader", void 0);
|
|
1826
1716
|
tslib.__decorate([
|
|
1827
|
-
typeorm
|
|
1828
|
-
typeorm
|
|
1717
|
+
typeorm.ManyToOne('reclassify_inventory_orders', (entity) => entity.items),
|
|
1718
|
+
typeorm.JoinColumn({ name: 'orderId', referencedColumnName: 'id' }),
|
|
1829
1719
|
tslib.__metadata("design:type", exports.ReclassifyInventoryOrderEntityClass)
|
|
1830
1720
|
], exports.ReclassifyInventoryOrderItemEntityClass.prototype, "order", void 0);
|
|
1831
1721
|
tslib.__decorate([
|
|
1832
|
-
typeorm
|
|
1722
|
+
typeorm.ManyToOne('reclassify_inventory_order_changes', (change) => change.item),
|
|
1833
1723
|
tslib.__metadata("design:type", Array)
|
|
1834
1724
|
], exports.ReclassifyInventoryOrderItemEntityClass.prototype, "changes", void 0);
|
|
1835
1725
|
exports.ReclassifyInventoryOrderItemEntityClass = tslib.__decorate([
|
|
1836
|
-
typeorm
|
|
1837
|
-
typeorm
|
|
1726
|
+
typeorm.Entity('reclassify_inventory_order_items'),
|
|
1727
|
+
typeorm.TableInheritance({ column: { type: 'varchar', name: 'entityName' } })
|
|
1838
1728
|
], exports.ReclassifyInventoryOrderItemEntityClass);
|
|
1839
1729
|
|
|
1840
1730
|
const ReclassifyInventoryOrderChangeEntity = Symbol('ReclassifyInventoryOrderChangeEntity');
|
|
@@ -1846,29 +1736,29 @@ exports.ReclassifyInventoryOrderChangeEntityClass = class ReclassifyInventoryOrd
|
|
|
1846
1736
|
item;
|
|
1847
1737
|
};
|
|
1848
1738
|
tslib.__decorate([
|
|
1849
|
-
typeorm
|
|
1739
|
+
typeorm.PrimaryGeneratedColumn('uuid'),
|
|
1850
1740
|
tslib.__metadata("design:type", String)
|
|
1851
1741
|
], exports.ReclassifyInventoryOrderChangeEntityClass.prototype, "id", void 0);
|
|
1852
1742
|
tslib.__decorate([
|
|
1853
|
-
typeorm
|
|
1743
|
+
typeorm.Column({ type: 'uuid' }),
|
|
1854
1744
|
tslib.__metadata("design:type", String)
|
|
1855
1745
|
], exports.ReclassifyInventoryOrderChangeEntityClass.prototype, "itemId", void 0);
|
|
1856
1746
|
tslib.__decorate([
|
|
1857
|
-
typeorm
|
|
1747
|
+
typeorm.Column({ type: 'numeric' }),
|
|
1858
1748
|
tslib.__metadata("design:type", Number)
|
|
1859
1749
|
], exports.ReclassifyInventoryOrderChangeEntityClass.prototype, "quantityChanged", void 0);
|
|
1860
1750
|
tslib.__decorate([
|
|
1861
|
-
typeorm
|
|
1862
|
-
typeorm
|
|
1751
|
+
typeorm.OneToOne('orders'),
|
|
1752
|
+
typeorm.JoinColumn({ name: 'id', referencedColumnName: 'id' }),
|
|
1863
1753
|
tslib.__metadata("design:type", wmsBaseNestjsModule.OrderEntity)
|
|
1864
1754
|
], exports.ReclassifyInventoryOrderChangeEntityClass.prototype, "order", void 0);
|
|
1865
1755
|
tslib.__decorate([
|
|
1866
|
-
typeorm
|
|
1867
|
-
typeorm
|
|
1756
|
+
typeorm.ManyToOne('reclassify_inventory_order_items', (item) => item.changes),
|
|
1757
|
+
typeorm.JoinColumn({ name: 'itemId', referencedColumnName: 'id' }),
|
|
1868
1758
|
tslib.__metadata("design:type", exports.ReclassifyInventoryOrderItemEntityClass)
|
|
1869
1759
|
], exports.ReclassifyInventoryOrderChangeEntityClass.prototype, "item", void 0);
|
|
1870
1760
|
exports.ReclassifyInventoryOrderChangeEntityClass = tslib.__decorate([
|
|
1871
|
-
typeorm
|
|
1761
|
+
typeorm.Entity('reclassify_inventory_order_changes')
|
|
1872
1762
|
], exports.ReclassifyInventoryOrderChangeEntityClass);
|
|
1873
1763
|
|
|
1874
1764
|
const TransferVendorOrderEntity = Symbol('TransferVendorOrderEntity');
|
|
@@ -1879,25 +1769,25 @@ exports.TransferVendorOrderEntityClass = class TransferVendorOrderEntityClass {
|
|
|
1879
1769
|
items;
|
|
1880
1770
|
};
|
|
1881
1771
|
tslib.__decorate([
|
|
1882
|
-
typeorm
|
|
1772
|
+
typeorm.PrimaryGeneratedColumn('uuid'),
|
|
1883
1773
|
tslib.__metadata("design:type", String)
|
|
1884
1774
|
], exports.TransferVendorOrderEntityClass.prototype, "id", void 0);
|
|
1885
1775
|
tslib.__decorate([
|
|
1886
|
-
typeorm
|
|
1887
|
-
typeorm
|
|
1776
|
+
typeorm.Column({ type: 'varchar', unique: true }),
|
|
1777
|
+
typeorm.Index(),
|
|
1888
1778
|
tslib.__metadata("design:type", String)
|
|
1889
1779
|
], exports.TransferVendorOrderEntityClass.prototype, "key", void 0);
|
|
1890
1780
|
tslib.__decorate([
|
|
1891
|
-
typeorm
|
|
1781
|
+
typeorm.CreateDateColumn({ type: 'timestamptz' }),
|
|
1892
1782
|
tslib.__metadata("design:type", Date)
|
|
1893
1783
|
], exports.TransferVendorOrderEntityClass.prototype, "createdAt", void 0);
|
|
1894
1784
|
tslib.__decorate([
|
|
1895
|
-
typeorm
|
|
1785
|
+
typeorm.OneToMany('transfer_vendor_order_items', (entity) => entity.order),
|
|
1896
1786
|
tslib.__metadata("design:type", Array)
|
|
1897
1787
|
], exports.TransferVendorOrderEntityClass.prototype, "items", void 0);
|
|
1898
1788
|
exports.TransferVendorOrderEntityClass = tslib.__decorate([
|
|
1899
|
-
typeorm
|
|
1900
|
-
typeorm
|
|
1789
|
+
typeorm.Entity('transfer_vendor_orders'),
|
|
1790
|
+
typeorm.TableInheritance({ column: { type: 'varchar', name: 'entityName' } })
|
|
1901
1791
|
], exports.TransferVendorOrderEntityClass);
|
|
1902
1792
|
|
|
1903
1793
|
const TransferVendorOrderItemEntity = Symbol('TransferVendorOrderItemEntity');
|
|
@@ -1917,69 +1807,69 @@ exports.TransferVendorOrderItemEntityClass = class TransferVendorOrderItemEntity
|
|
|
1917
1807
|
changes;
|
|
1918
1808
|
};
|
|
1919
1809
|
tslib.__decorate([
|
|
1920
|
-
typeorm
|
|
1810
|
+
typeorm.PrimaryGeneratedColumn('uuid'),
|
|
1921
1811
|
tslib.__metadata("design:type", String)
|
|
1922
1812
|
], exports.TransferVendorOrderItemEntityClass.prototype, "id", void 0);
|
|
1923
1813
|
tslib.__decorate([
|
|
1924
|
-
typeorm
|
|
1925
|
-
typeorm
|
|
1814
|
+
typeorm.Column({ type: 'uuid' }),
|
|
1815
|
+
typeorm.Index(),
|
|
1926
1816
|
tslib.__metadata("design:type", String)
|
|
1927
1817
|
], exports.TransferVendorOrderItemEntityClass.prototype, "materialId", void 0);
|
|
1928
1818
|
tslib.__decorate([
|
|
1929
|
-
typeorm
|
|
1930
|
-
typeorm
|
|
1819
|
+
typeorm.Column({ type: 'uuid' }),
|
|
1820
|
+
typeorm.Index(),
|
|
1931
1821
|
tslib.__metadata("design:type", String)
|
|
1932
1822
|
], exports.TransferVendorOrderItemEntityClass.prototype, "batchId", void 0);
|
|
1933
1823
|
tslib.__decorate([
|
|
1934
|
-
typeorm
|
|
1935
|
-
typeorm
|
|
1824
|
+
typeorm.Column({ type: 'uuid', nullable: true }),
|
|
1825
|
+
typeorm.Index(),
|
|
1936
1826
|
tslib.__metadata("design:type", Object)
|
|
1937
1827
|
], exports.TransferVendorOrderItemEntityClass.prototype, "unitId", void 0);
|
|
1938
1828
|
tslib.__decorate([
|
|
1939
|
-
typeorm
|
|
1940
|
-
typeorm
|
|
1829
|
+
typeorm.Column({ type: 'uuid', nullable: true }),
|
|
1830
|
+
typeorm.Index(),
|
|
1941
1831
|
tslib.__metadata("design:type", Object)
|
|
1942
1832
|
], exports.TransferVendorOrderItemEntityClass.prototype, "locationId", void 0);
|
|
1943
1833
|
tslib.__decorate([
|
|
1944
|
-
typeorm
|
|
1945
|
-
typeorm
|
|
1834
|
+
typeorm.Column({ type: 'uuid', nullable: true }),
|
|
1835
|
+
typeorm.Index(),
|
|
1946
1836
|
tslib.__metadata("design:type", Object)
|
|
1947
1837
|
], exports.TransferVendorOrderItemEntityClass.prototype, "loaderId", void 0);
|
|
1948
1838
|
tslib.__decorate([
|
|
1949
|
-
typeorm
|
|
1839
|
+
typeorm.Column({ type: 'varchar' }),
|
|
1950
1840
|
tslib.__metadata("design:type", String)
|
|
1951
1841
|
], exports.TransferVendorOrderItemEntityClass.prototype, "vendorId", void 0);
|
|
1952
1842
|
tslib.__decorate([
|
|
1953
|
-
typeorm
|
|
1843
|
+
typeorm.Column({ type: 'numeric' }),
|
|
1954
1844
|
tslib.__metadata("design:type", Number)
|
|
1955
1845
|
], exports.TransferVendorOrderItemEntityClass.prototype, "targetTransferredQuantity", void 0);
|
|
1956
1846
|
tslib.__decorate([
|
|
1957
|
-
typeorm
|
|
1958
|
-
typeorm
|
|
1847
|
+
typeorm.Column({ type: 'uuid' }),
|
|
1848
|
+
typeorm.Index(),
|
|
1959
1849
|
tslib.__metadata("design:type", String)
|
|
1960
1850
|
], exports.TransferVendorOrderItemEntityClass.prototype, "orderId", void 0);
|
|
1961
1851
|
tslib.__decorate([
|
|
1962
|
-
typeorm
|
|
1963
|
-
typeorm
|
|
1852
|
+
typeorm.ManyToOne('locations'),
|
|
1853
|
+
typeorm.JoinColumn({ name: 'locationId', referencedColumnName: 'id' }),
|
|
1964
1854
|
tslib.__metadata("design:type", exports.LocationEntityClass)
|
|
1965
1855
|
], exports.TransferVendorOrderItemEntityClass.prototype, "location", void 0);
|
|
1966
1856
|
tslib.__decorate([
|
|
1967
|
-
typeorm
|
|
1968
|
-
typeorm
|
|
1857
|
+
typeorm.ManyToOne('loaders'),
|
|
1858
|
+
typeorm.JoinColumn({ name: 'loaderId', referencedColumnName: 'id' }),
|
|
1969
1859
|
tslib.__metadata("design:type", exports.LoadersEntityClass)
|
|
1970
1860
|
], exports.TransferVendorOrderItemEntityClass.prototype, "loader", void 0);
|
|
1971
1861
|
tslib.__decorate([
|
|
1972
|
-
typeorm
|
|
1973
|
-
typeorm
|
|
1862
|
+
typeorm.ManyToOne('transfer_vendor_orders', (entity) => entity.items),
|
|
1863
|
+
typeorm.JoinColumn({ name: 'orderId', referencedColumnName: 'id' }),
|
|
1974
1864
|
tslib.__metadata("design:type", exports.TransferVendorOrderEntityClass)
|
|
1975
1865
|
], exports.TransferVendorOrderItemEntityClass.prototype, "order", void 0);
|
|
1976
1866
|
tslib.__decorate([
|
|
1977
|
-
typeorm
|
|
1867
|
+
typeorm.ManyToOne('transfer_vendor_order_changes', (change) => change.item),
|
|
1978
1868
|
tslib.__metadata("design:type", Array)
|
|
1979
1869
|
], exports.TransferVendorOrderItemEntityClass.prototype, "changes", void 0);
|
|
1980
1870
|
exports.TransferVendorOrderItemEntityClass = tslib.__decorate([
|
|
1981
|
-
typeorm
|
|
1982
|
-
typeorm
|
|
1871
|
+
typeorm.Entity('transfer_vendor_order_items'),
|
|
1872
|
+
typeorm.TableInheritance({ column: { type: 'varchar', name: 'entityName' } })
|
|
1983
1873
|
], exports.TransferVendorOrderItemEntityClass);
|
|
1984
1874
|
|
|
1985
1875
|
const TransferVendorOrderChangeEntity = Symbol('TransferVendorOrderChangeEntity');
|
|
@@ -1991,29 +1881,29 @@ exports.TransferVendorOrderChangeEntityClass = class TransferVendorOrderChangeEn
|
|
|
1991
1881
|
item;
|
|
1992
1882
|
};
|
|
1993
1883
|
tslib.__decorate([
|
|
1994
|
-
typeorm
|
|
1884
|
+
typeorm.PrimaryGeneratedColumn('uuid'),
|
|
1995
1885
|
tslib.__metadata("design:type", String)
|
|
1996
1886
|
], exports.TransferVendorOrderChangeEntityClass.prototype, "id", void 0);
|
|
1997
1887
|
tslib.__decorate([
|
|
1998
|
-
typeorm
|
|
1888
|
+
typeorm.Column({ type: 'uuid' }),
|
|
1999
1889
|
tslib.__metadata("design:type", String)
|
|
2000
1890
|
], exports.TransferVendorOrderChangeEntityClass.prototype, "itemId", void 0);
|
|
2001
1891
|
tslib.__decorate([
|
|
2002
|
-
typeorm
|
|
1892
|
+
typeorm.Column({ type: 'numeric' }),
|
|
2003
1893
|
tslib.__metadata("design:type", Number)
|
|
2004
1894
|
], exports.TransferVendorOrderChangeEntityClass.prototype, "quantityChanged", void 0);
|
|
2005
1895
|
tslib.__decorate([
|
|
2006
|
-
typeorm
|
|
2007
|
-
typeorm
|
|
1896
|
+
typeorm.OneToOne('orders'),
|
|
1897
|
+
typeorm.JoinColumn({ name: 'id', referencedColumnName: 'id' }),
|
|
2008
1898
|
tslib.__metadata("design:type", wmsBaseNestjsModule.OrderEntity)
|
|
2009
1899
|
], exports.TransferVendorOrderChangeEntityClass.prototype, "order", void 0);
|
|
2010
1900
|
tslib.__decorate([
|
|
2011
|
-
typeorm
|
|
2012
|
-
typeorm
|
|
1901
|
+
typeorm.ManyToOne('transfer_vendor_order_items', (item) => item.changes),
|
|
1902
|
+
typeorm.JoinColumn({ name: 'itemId', referencedColumnName: 'id' }),
|
|
2013
1903
|
tslib.__metadata("design:type", exports.TransferVendorOrderItemEntityClass)
|
|
2014
1904
|
], exports.TransferVendorOrderChangeEntityClass.prototype, "item", void 0);
|
|
2015
1905
|
exports.TransferVendorOrderChangeEntityClass = tslib.__decorate([
|
|
2016
|
-
typeorm
|
|
1906
|
+
typeorm.Entity('transfer_vendor_order_changes')
|
|
2017
1907
|
], exports.TransferVendorOrderChangeEntityClass);
|
|
2018
1908
|
|
|
2019
1909
|
const QualityInspectionOrderEntity = Symbol('QualityInspectionOrderEntity');
|
|
@@ -2025,29 +1915,29 @@ exports.QualityInspectionOrderEntityClass = class QualityInspectionOrderEntityCl
|
|
|
2025
1915
|
items;
|
|
2026
1916
|
};
|
|
2027
1917
|
tslib.__decorate([
|
|
2028
|
-
typeorm
|
|
1918
|
+
typeorm.PrimaryGeneratedColumn('uuid'),
|
|
2029
1919
|
tslib.__metadata("design:type", String)
|
|
2030
1920
|
], exports.QualityInspectionOrderEntityClass.prototype, "id", void 0);
|
|
2031
1921
|
tslib.__decorate([
|
|
2032
|
-
typeorm
|
|
2033
|
-
typeorm
|
|
1922
|
+
typeorm.Column({ type: 'varchar', unique: true }),
|
|
1923
|
+
typeorm.Index(),
|
|
2034
1924
|
tslib.__metadata("design:type", String)
|
|
2035
1925
|
], exports.QualityInspectionOrderEntityClass.prototype, "key", void 0);
|
|
2036
1926
|
tslib.__decorate([
|
|
2037
|
-
typeorm
|
|
1927
|
+
typeorm.Column({ type: 'text', nullable: true }),
|
|
2038
1928
|
tslib.__metadata("design:type", Object)
|
|
2039
1929
|
], exports.QualityInspectionOrderEntityClass.prototype, "note", void 0);
|
|
2040
1930
|
tslib.__decorate([
|
|
2041
|
-
typeorm
|
|
1931
|
+
typeorm.CreateDateColumn({ type: 'timestamptz' }),
|
|
2042
1932
|
tslib.__metadata("design:type", Date)
|
|
2043
1933
|
], exports.QualityInspectionOrderEntityClass.prototype, "createdAt", void 0);
|
|
2044
1934
|
tslib.__decorate([
|
|
2045
|
-
typeorm
|
|
1935
|
+
typeorm.OneToMany('quality_inspection_order_items', (entity) => entity.order),
|
|
2046
1936
|
tslib.__metadata("design:type", Array)
|
|
2047
1937
|
], exports.QualityInspectionOrderEntityClass.prototype, "items", void 0);
|
|
2048
1938
|
exports.QualityInspectionOrderEntityClass = tslib.__decorate([
|
|
2049
|
-
typeorm
|
|
2050
|
-
typeorm
|
|
1939
|
+
typeorm.Entity('quality_inspection_orders'),
|
|
1940
|
+
typeorm.TableInheritance({ column: { type: 'varchar', name: 'entityName' } })
|
|
2051
1941
|
], exports.QualityInspectionOrderEntityClass);
|
|
2052
1942
|
|
|
2053
1943
|
const QualityInspectionOrderItemEntity = Symbol('QualityInspectionOrderItemEntity');
|
|
@@ -2066,65 +1956,65 @@ exports.QualityInspectionOrderItemEntityClass = class QualityInspectionOrderItem
|
|
|
2066
1956
|
changes;
|
|
2067
1957
|
};
|
|
2068
1958
|
tslib.__decorate([
|
|
2069
|
-
typeorm
|
|
1959
|
+
typeorm.PrimaryGeneratedColumn('uuid'),
|
|
2070
1960
|
tslib.__metadata("design:type", String)
|
|
2071
1961
|
], exports.QualityInspectionOrderItemEntityClass.prototype, "id", void 0);
|
|
2072
1962
|
tslib.__decorate([
|
|
2073
|
-
typeorm
|
|
2074
|
-
typeorm
|
|
1963
|
+
typeorm.Column({ type: 'uuid' }),
|
|
1964
|
+
typeorm.Index(),
|
|
2075
1965
|
tslib.__metadata("design:type", String)
|
|
2076
1966
|
], exports.QualityInspectionOrderItemEntityClass.prototype, "materialId", void 0);
|
|
2077
1967
|
tslib.__decorate([
|
|
2078
|
-
typeorm
|
|
2079
|
-
typeorm
|
|
1968
|
+
typeorm.Column({ type: 'uuid' }),
|
|
1969
|
+
typeorm.Index(),
|
|
2080
1970
|
tslib.__metadata("design:type", String)
|
|
2081
1971
|
], exports.QualityInspectionOrderItemEntityClass.prototype, "batchId", void 0);
|
|
2082
1972
|
tslib.__decorate([
|
|
2083
|
-
typeorm
|
|
2084
|
-
typeorm
|
|
1973
|
+
typeorm.Column({ type: 'uuid', nullable: true }),
|
|
1974
|
+
typeorm.Index(),
|
|
2085
1975
|
tslib.__metadata("design:type", Object)
|
|
2086
1976
|
], exports.QualityInspectionOrderItemEntityClass.prototype, "unitId", void 0);
|
|
2087
1977
|
tslib.__decorate([
|
|
2088
|
-
typeorm
|
|
2089
|
-
typeorm
|
|
1978
|
+
typeorm.Column({ type: 'uuid', nullable: true }),
|
|
1979
|
+
typeorm.Index(),
|
|
2090
1980
|
tslib.__metadata("design:type", Object)
|
|
2091
1981
|
], exports.QualityInspectionOrderItemEntityClass.prototype, "locationId", void 0);
|
|
2092
1982
|
tslib.__decorate([
|
|
2093
|
-
typeorm
|
|
2094
|
-
typeorm
|
|
1983
|
+
typeorm.Column({ type: 'uuid', nullable: true }),
|
|
1984
|
+
typeorm.Index(),
|
|
2095
1985
|
tslib.__metadata("design:type", Object)
|
|
2096
1986
|
], exports.QualityInspectionOrderItemEntityClass.prototype, "loaderId", void 0);
|
|
2097
1987
|
tslib.__decorate([
|
|
2098
|
-
typeorm
|
|
1988
|
+
typeorm.Column({ type: 'numeric' }),
|
|
2099
1989
|
tslib.__metadata("design:type", Number)
|
|
2100
1990
|
], exports.QualityInspectionOrderItemEntityClass.prototype, "targetInspectedQuantity", void 0);
|
|
2101
1991
|
tslib.__decorate([
|
|
2102
|
-
typeorm
|
|
2103
|
-
typeorm
|
|
1992
|
+
typeorm.Column({ type: 'uuid' }),
|
|
1993
|
+
typeorm.Index(),
|
|
2104
1994
|
tslib.__metadata("design:type", String)
|
|
2105
1995
|
], exports.QualityInspectionOrderItemEntityClass.prototype, "orderId", void 0);
|
|
2106
1996
|
tslib.__decorate([
|
|
2107
|
-
typeorm
|
|
2108
|
-
typeorm
|
|
1997
|
+
typeorm.ManyToOne('locations'),
|
|
1998
|
+
typeorm.JoinColumn({ name: 'locationId', referencedColumnName: 'id' }),
|
|
2109
1999
|
tslib.__metadata("design:type", exports.LocationEntityClass)
|
|
2110
2000
|
], exports.QualityInspectionOrderItemEntityClass.prototype, "location", void 0);
|
|
2111
2001
|
tslib.__decorate([
|
|
2112
|
-
typeorm
|
|
2113
|
-
typeorm
|
|
2002
|
+
typeorm.ManyToOne('loaders'),
|
|
2003
|
+
typeorm.JoinColumn({ name: 'loaderId', referencedColumnName: 'id' }),
|
|
2114
2004
|
tslib.__metadata("design:type", exports.LoadersEntityClass)
|
|
2115
2005
|
], exports.QualityInspectionOrderItemEntityClass.prototype, "loader", void 0);
|
|
2116
2006
|
tslib.__decorate([
|
|
2117
|
-
typeorm
|
|
2118
|
-
typeorm
|
|
2007
|
+
typeorm.ManyToOne('quality_inspection_orders', (entity) => entity.items),
|
|
2008
|
+
typeorm.JoinColumn({ name: 'orderId', referencedColumnName: 'id' }),
|
|
2119
2009
|
tslib.__metadata("design:type", exports.QualityInspectionOrderEntityClass)
|
|
2120
2010
|
], exports.QualityInspectionOrderItemEntityClass.prototype, "order", void 0);
|
|
2121
2011
|
tslib.__decorate([
|
|
2122
|
-
typeorm
|
|
2012
|
+
typeorm.ManyToOne('quality_inspection_order_changes', (change) => change.item),
|
|
2123
2013
|
tslib.__metadata("design:type", Array)
|
|
2124
2014
|
], exports.QualityInspectionOrderItemEntityClass.prototype, "changes", void 0);
|
|
2125
2015
|
exports.QualityInspectionOrderItemEntityClass = tslib.__decorate([
|
|
2126
|
-
typeorm
|
|
2127
|
-
typeorm
|
|
2016
|
+
typeorm.Entity('quality_inspection_order_items'),
|
|
2017
|
+
typeorm.TableInheritance({ column: { type: 'varchar', name: 'entityName' } })
|
|
2128
2018
|
], exports.QualityInspectionOrderItemEntityClass);
|
|
2129
2019
|
|
|
2130
2020
|
const QualityInspectionOrderChangeEntity = Symbol('QualityInspectionOrderChangeEntity');
|
|
@@ -2137,33 +2027,33 @@ exports.QualityInspectionOrderChangeEntityClass = class QualityInspectionOrderCh
|
|
|
2137
2027
|
item;
|
|
2138
2028
|
};
|
|
2139
2029
|
tslib.__decorate([
|
|
2140
|
-
typeorm
|
|
2030
|
+
typeorm.PrimaryGeneratedColumn('uuid'),
|
|
2141
2031
|
tslib.__metadata("design:type", String)
|
|
2142
2032
|
], exports.QualityInspectionOrderChangeEntityClass.prototype, "id", void 0);
|
|
2143
2033
|
tslib.__decorate([
|
|
2144
|
-
typeorm
|
|
2034
|
+
typeorm.Column({ type: 'uuid' }),
|
|
2145
2035
|
tslib.__metadata("design:type", String)
|
|
2146
2036
|
], exports.QualityInspectionOrderChangeEntityClass.prototype, "itemId", void 0);
|
|
2147
2037
|
tslib.__decorate([
|
|
2148
|
-
typeorm
|
|
2038
|
+
typeorm.Column({ type: 'numeric' }),
|
|
2149
2039
|
tslib.__metadata("design:type", Number)
|
|
2150
2040
|
], exports.QualityInspectionOrderChangeEntityClass.prototype, "quantityChanged", void 0);
|
|
2151
2041
|
tslib.__decorate([
|
|
2152
|
-
typeorm
|
|
2042
|
+
typeorm.Column({ type: 'boolean', nullable: true }),
|
|
2153
2043
|
tslib.__metadata("design:type", Object)
|
|
2154
2044
|
], exports.QualityInspectionOrderChangeEntityClass.prototype, "result", void 0);
|
|
2155
2045
|
tslib.__decorate([
|
|
2156
|
-
typeorm
|
|
2157
|
-
typeorm
|
|
2046
|
+
typeorm.OneToOne('orders'),
|
|
2047
|
+
typeorm.JoinColumn({ name: 'id', referencedColumnName: 'id' }),
|
|
2158
2048
|
tslib.__metadata("design:type", wmsBaseNestjsModule.OrderEntity)
|
|
2159
2049
|
], exports.QualityInspectionOrderChangeEntityClass.prototype, "order", void 0);
|
|
2160
2050
|
tslib.__decorate([
|
|
2161
|
-
typeorm
|
|
2162
|
-
typeorm
|
|
2051
|
+
typeorm.ManyToOne('quality_inspection_order_items', (item) => item.changes),
|
|
2052
|
+
typeorm.JoinColumn({ name: 'itemId', referencedColumnName: 'id' }),
|
|
2163
2053
|
tslib.__metadata("design:type", exports.QualityInspectionOrderItemEntityClass)
|
|
2164
2054
|
], exports.QualityInspectionOrderChangeEntityClass.prototype, "item", void 0);
|
|
2165
2055
|
exports.QualityInspectionOrderChangeEntityClass = tslib.__decorate([
|
|
2166
|
-
typeorm
|
|
2056
|
+
typeorm.Entity('quality_inspection_order_changes')
|
|
2167
2057
|
], exports.QualityInspectionOrderChangeEntityClass);
|
|
2168
2058
|
|
|
2169
2059
|
const TransferCustomerOrderEntity = Symbol('TransferCustomerOrderEntity');
|
|
@@ -2174,25 +2064,25 @@ exports.TransferCustomerOrderEntityClass = class TransferCustomerOrderEntityClas
|
|
|
2174
2064
|
items;
|
|
2175
2065
|
};
|
|
2176
2066
|
tslib.__decorate([
|
|
2177
|
-
typeorm
|
|
2067
|
+
typeorm.PrimaryGeneratedColumn('uuid'),
|
|
2178
2068
|
tslib.__metadata("design:type", String)
|
|
2179
2069
|
], exports.TransferCustomerOrderEntityClass.prototype, "id", void 0);
|
|
2180
2070
|
tslib.__decorate([
|
|
2181
|
-
typeorm
|
|
2182
|
-
typeorm
|
|
2071
|
+
typeorm.Column({ type: 'varchar', unique: true }),
|
|
2072
|
+
typeorm.Index(),
|
|
2183
2073
|
tslib.__metadata("design:type", String)
|
|
2184
2074
|
], exports.TransferCustomerOrderEntityClass.prototype, "key", void 0);
|
|
2185
2075
|
tslib.__decorate([
|
|
2186
|
-
typeorm
|
|
2076
|
+
typeorm.CreateDateColumn({ type: 'timestamptz' }),
|
|
2187
2077
|
tslib.__metadata("design:type", Date)
|
|
2188
2078
|
], exports.TransferCustomerOrderEntityClass.prototype, "createdAt", void 0);
|
|
2189
2079
|
tslib.__decorate([
|
|
2190
|
-
typeorm
|
|
2080
|
+
typeorm.OneToMany('transfer_customer_order_items', (entity) => entity.order),
|
|
2191
2081
|
tslib.__metadata("design:type", Array)
|
|
2192
2082
|
], exports.TransferCustomerOrderEntityClass.prototype, "items", void 0);
|
|
2193
2083
|
exports.TransferCustomerOrderEntityClass = tslib.__decorate([
|
|
2194
|
-
typeorm
|
|
2195
|
-
typeorm
|
|
2084
|
+
typeorm.Entity('transfer_customer_orders'),
|
|
2085
|
+
typeorm.TableInheritance({ column: { type: 'varchar', name: 'entityName' } })
|
|
2196
2086
|
], exports.TransferCustomerOrderEntityClass);
|
|
2197
2087
|
|
|
2198
2088
|
const TransferCustomerOrderItemEntity = Symbol('TransferCustomerOrderItemEntity');
|
|
@@ -2212,69 +2102,69 @@ exports.TransferCustomerOrderItemEntityClass = class TransferCustomerOrderItemEn
|
|
|
2212
2102
|
changes;
|
|
2213
2103
|
};
|
|
2214
2104
|
tslib.__decorate([
|
|
2215
|
-
typeorm
|
|
2105
|
+
typeorm.PrimaryGeneratedColumn('uuid'),
|
|
2216
2106
|
tslib.__metadata("design:type", String)
|
|
2217
2107
|
], exports.TransferCustomerOrderItemEntityClass.prototype, "id", void 0);
|
|
2218
2108
|
tslib.__decorate([
|
|
2219
|
-
typeorm
|
|
2220
|
-
typeorm
|
|
2109
|
+
typeorm.Column({ type: 'uuid' }),
|
|
2110
|
+
typeorm.Index(),
|
|
2221
2111
|
tslib.__metadata("design:type", String)
|
|
2222
2112
|
], exports.TransferCustomerOrderItemEntityClass.prototype, "materialId", void 0);
|
|
2223
2113
|
tslib.__decorate([
|
|
2224
|
-
typeorm
|
|
2225
|
-
typeorm
|
|
2114
|
+
typeorm.Column({ type: 'uuid' }),
|
|
2115
|
+
typeorm.Index(),
|
|
2226
2116
|
tslib.__metadata("design:type", String)
|
|
2227
2117
|
], exports.TransferCustomerOrderItemEntityClass.prototype, "batchId", void 0);
|
|
2228
2118
|
tslib.__decorate([
|
|
2229
|
-
typeorm
|
|
2230
|
-
typeorm
|
|
2119
|
+
typeorm.Column({ type: 'uuid', nullable: true }),
|
|
2120
|
+
typeorm.Index(),
|
|
2231
2121
|
tslib.__metadata("design:type", Object)
|
|
2232
2122
|
], exports.TransferCustomerOrderItemEntityClass.prototype, "unitId", void 0);
|
|
2233
2123
|
tslib.__decorate([
|
|
2234
|
-
typeorm
|
|
2235
|
-
typeorm
|
|
2124
|
+
typeorm.Column({ type: 'uuid', nullable: true }),
|
|
2125
|
+
typeorm.Index(),
|
|
2236
2126
|
tslib.__metadata("design:type", Object)
|
|
2237
2127
|
], exports.TransferCustomerOrderItemEntityClass.prototype, "locationId", void 0);
|
|
2238
2128
|
tslib.__decorate([
|
|
2239
|
-
typeorm
|
|
2240
|
-
typeorm
|
|
2129
|
+
typeorm.Column({ type: 'uuid', nullable: true }),
|
|
2130
|
+
typeorm.Index(),
|
|
2241
2131
|
tslib.__metadata("design:type", Object)
|
|
2242
2132
|
], exports.TransferCustomerOrderItemEntityClass.prototype, "loaderId", void 0);
|
|
2243
2133
|
tslib.__decorate([
|
|
2244
|
-
typeorm
|
|
2134
|
+
typeorm.Column({ type: 'varchar' }),
|
|
2245
2135
|
tslib.__metadata("design:type", String)
|
|
2246
2136
|
], exports.TransferCustomerOrderItemEntityClass.prototype, "customerId", void 0);
|
|
2247
2137
|
tslib.__decorate([
|
|
2248
|
-
typeorm
|
|
2138
|
+
typeorm.Column({ type: 'numeric' }),
|
|
2249
2139
|
tslib.__metadata("design:type", Number)
|
|
2250
2140
|
], exports.TransferCustomerOrderItemEntityClass.prototype, "targetTransferredQuantity", void 0);
|
|
2251
2141
|
tslib.__decorate([
|
|
2252
|
-
typeorm
|
|
2253
|
-
typeorm
|
|
2142
|
+
typeorm.Column({ type: 'uuid' }),
|
|
2143
|
+
typeorm.Index(),
|
|
2254
2144
|
tslib.__metadata("design:type", String)
|
|
2255
2145
|
], exports.TransferCustomerOrderItemEntityClass.prototype, "orderId", void 0);
|
|
2256
2146
|
tslib.__decorate([
|
|
2257
|
-
typeorm
|
|
2258
|
-
typeorm
|
|
2147
|
+
typeorm.ManyToOne('locations'),
|
|
2148
|
+
typeorm.JoinColumn({ name: 'locationId', referencedColumnName: 'id' }),
|
|
2259
2149
|
tslib.__metadata("design:type", exports.LocationEntityClass)
|
|
2260
2150
|
], exports.TransferCustomerOrderItemEntityClass.prototype, "location", void 0);
|
|
2261
2151
|
tslib.__decorate([
|
|
2262
|
-
typeorm
|
|
2263
|
-
typeorm
|
|
2152
|
+
typeorm.ManyToOne('loaders'),
|
|
2153
|
+
typeorm.JoinColumn({ name: 'loaderId', referencedColumnName: 'id' }),
|
|
2264
2154
|
tslib.__metadata("design:type", exports.LoadersEntityClass)
|
|
2265
2155
|
], exports.TransferCustomerOrderItemEntityClass.prototype, "loader", void 0);
|
|
2266
2156
|
tslib.__decorate([
|
|
2267
|
-
typeorm
|
|
2268
|
-
typeorm
|
|
2157
|
+
typeorm.ManyToOne('transfer_customer_orders', (entity) => entity.items),
|
|
2158
|
+
typeorm.JoinColumn({ name: 'orderId', referencedColumnName: 'id' }),
|
|
2269
2159
|
tslib.__metadata("design:type", exports.TransferCustomerOrderEntityClass)
|
|
2270
2160
|
], exports.TransferCustomerOrderItemEntityClass.prototype, "order", void 0);
|
|
2271
2161
|
tslib.__decorate([
|
|
2272
|
-
typeorm
|
|
2162
|
+
typeorm.ManyToOne('transfer_customer_order_changes', (change) => change.item),
|
|
2273
2163
|
tslib.__metadata("design:type", Array)
|
|
2274
2164
|
], exports.TransferCustomerOrderItemEntityClass.prototype, "changes", void 0);
|
|
2275
2165
|
exports.TransferCustomerOrderItemEntityClass = tslib.__decorate([
|
|
2276
|
-
typeorm
|
|
2277
|
-
typeorm
|
|
2166
|
+
typeorm.Entity('transfer_customer_order_items'),
|
|
2167
|
+
typeorm.TableInheritance({ column: { type: 'varchar', name: 'entityName' } })
|
|
2278
2168
|
], exports.TransferCustomerOrderItemEntityClass);
|
|
2279
2169
|
|
|
2280
2170
|
const TransferCustomerOrderChangeEntity = Symbol('TransferCustomerOrderChangeEntity');
|
|
@@ -2286,29 +2176,29 @@ exports.TransferCustomerOrderChangeEntityClass = class TransferCustomerOrderChan
|
|
|
2286
2176
|
item;
|
|
2287
2177
|
};
|
|
2288
2178
|
tslib.__decorate([
|
|
2289
|
-
typeorm
|
|
2179
|
+
typeorm.PrimaryGeneratedColumn('uuid'),
|
|
2290
2180
|
tslib.__metadata("design:type", String)
|
|
2291
2181
|
], exports.TransferCustomerOrderChangeEntityClass.prototype, "id", void 0);
|
|
2292
2182
|
tslib.__decorate([
|
|
2293
|
-
typeorm
|
|
2183
|
+
typeorm.Column({ type: 'uuid' }),
|
|
2294
2184
|
tslib.__metadata("design:type", String)
|
|
2295
2185
|
], exports.TransferCustomerOrderChangeEntityClass.prototype, "itemId", void 0);
|
|
2296
2186
|
tslib.__decorate([
|
|
2297
|
-
typeorm
|
|
2187
|
+
typeorm.Column({ type: 'numeric' }),
|
|
2298
2188
|
tslib.__metadata("design:type", Number)
|
|
2299
2189
|
], exports.TransferCustomerOrderChangeEntityClass.prototype, "quantityChanged", void 0);
|
|
2300
2190
|
tslib.__decorate([
|
|
2301
|
-
typeorm
|
|
2302
|
-
typeorm
|
|
2191
|
+
typeorm.OneToOne('orders'),
|
|
2192
|
+
typeorm.JoinColumn({ name: 'id', referencedColumnName: 'id' }),
|
|
2303
2193
|
tslib.__metadata("design:type", wmsBaseNestjsModule.OrderEntity)
|
|
2304
2194
|
], exports.TransferCustomerOrderChangeEntityClass.prototype, "order", void 0);
|
|
2305
2195
|
tslib.__decorate([
|
|
2306
|
-
typeorm
|
|
2307
|
-
typeorm
|
|
2196
|
+
typeorm.ManyToOne('transfer_customer_order_items', (item) => item.changes),
|
|
2197
|
+
typeorm.JoinColumn({ name: 'itemId', referencedColumnName: 'id' }),
|
|
2308
2198
|
tslib.__metadata("design:type", exports.TransferCustomerOrderItemEntityClass)
|
|
2309
2199
|
], exports.TransferCustomerOrderChangeEntityClass.prototype, "item", void 0);
|
|
2310
2200
|
exports.TransferCustomerOrderChangeEntityClass = tslib.__decorate([
|
|
2311
|
-
typeorm
|
|
2201
|
+
typeorm.Entity('transfer_customer_order_changes')
|
|
2312
2202
|
], exports.TransferCustomerOrderChangeEntityClass);
|
|
2313
2203
|
|
|
2314
2204
|
const ScrapeOrderEntity = Symbol('ScrapeOrderEntity');
|
|
@@ -2319,25 +2209,25 @@ exports.ScrapeOrderEntityClass = class ScrapeOrderEntityClass {
|
|
|
2319
2209
|
items;
|
|
2320
2210
|
};
|
|
2321
2211
|
tslib.__decorate([
|
|
2322
|
-
typeorm
|
|
2212
|
+
typeorm.PrimaryGeneratedColumn('uuid'),
|
|
2323
2213
|
tslib.__metadata("design:type", String)
|
|
2324
2214
|
], exports.ScrapeOrderEntityClass.prototype, "id", void 0);
|
|
2325
2215
|
tslib.__decorate([
|
|
2326
|
-
typeorm
|
|
2327
|
-
typeorm
|
|
2216
|
+
typeorm.Column({ type: 'varchar', unique: true }),
|
|
2217
|
+
typeorm.Index(),
|
|
2328
2218
|
tslib.__metadata("design:type", String)
|
|
2329
2219
|
], exports.ScrapeOrderEntityClass.prototype, "key", void 0);
|
|
2330
2220
|
tslib.__decorate([
|
|
2331
|
-
typeorm
|
|
2221
|
+
typeorm.CreateDateColumn({ type: 'timestamptz' }),
|
|
2332
2222
|
tslib.__metadata("design:type", Date)
|
|
2333
2223
|
], exports.ScrapeOrderEntityClass.prototype, "createdAt", void 0);
|
|
2334
2224
|
tslib.__decorate([
|
|
2335
|
-
typeorm
|
|
2225
|
+
typeorm.OneToMany('scrape_order_items', (entity) => entity.order),
|
|
2336
2226
|
tslib.__metadata("design:type", Array)
|
|
2337
2227
|
], exports.ScrapeOrderEntityClass.prototype, "items", void 0);
|
|
2338
2228
|
exports.ScrapeOrderEntityClass = tslib.__decorate([
|
|
2339
|
-
typeorm
|
|
2340
|
-
typeorm
|
|
2229
|
+
typeorm.Entity('scrape_orders'),
|
|
2230
|
+
typeorm.TableInheritance({ column: { type: 'varchar', name: 'entityName' } })
|
|
2341
2231
|
], exports.ScrapeOrderEntityClass);
|
|
2342
2232
|
|
|
2343
2233
|
const ScrapeOrderItemEntity = Symbol('ScrapeOrderItemEntity');
|
|
@@ -2356,65 +2246,65 @@ exports.ScrapeOrderItemEntityClass = class ScrapeOrderItemEntityClass {
|
|
|
2356
2246
|
changes;
|
|
2357
2247
|
};
|
|
2358
2248
|
tslib.__decorate([
|
|
2359
|
-
typeorm
|
|
2249
|
+
typeorm.PrimaryGeneratedColumn('uuid'),
|
|
2360
2250
|
tslib.__metadata("design:type", String)
|
|
2361
2251
|
], exports.ScrapeOrderItemEntityClass.prototype, "id", void 0);
|
|
2362
2252
|
tslib.__decorate([
|
|
2363
|
-
typeorm
|
|
2364
|
-
typeorm
|
|
2253
|
+
typeorm.Column({ type: 'uuid' }),
|
|
2254
|
+
typeorm.Index(),
|
|
2365
2255
|
tslib.__metadata("design:type", String)
|
|
2366
2256
|
], exports.ScrapeOrderItemEntityClass.prototype, "materialId", void 0);
|
|
2367
2257
|
tslib.__decorate([
|
|
2368
|
-
typeorm
|
|
2369
|
-
typeorm
|
|
2258
|
+
typeorm.Column({ type: 'uuid' }),
|
|
2259
|
+
typeorm.Index(),
|
|
2370
2260
|
tslib.__metadata("design:type", String)
|
|
2371
2261
|
], exports.ScrapeOrderItemEntityClass.prototype, "batchId", void 0);
|
|
2372
2262
|
tslib.__decorate([
|
|
2373
|
-
typeorm
|
|
2374
|
-
typeorm
|
|
2263
|
+
typeorm.Column({ type: 'uuid', nullable: true }),
|
|
2264
|
+
typeorm.Index(),
|
|
2375
2265
|
tslib.__metadata("design:type", Object)
|
|
2376
2266
|
], exports.ScrapeOrderItemEntityClass.prototype, "unitId", void 0);
|
|
2377
2267
|
tslib.__decorate([
|
|
2378
|
-
typeorm
|
|
2379
|
-
typeorm
|
|
2268
|
+
typeorm.Column({ type: 'uuid', nullable: true }),
|
|
2269
|
+
typeorm.Index(),
|
|
2380
2270
|
tslib.__metadata("design:type", Object)
|
|
2381
2271
|
], exports.ScrapeOrderItemEntityClass.prototype, "locationId", void 0);
|
|
2382
2272
|
tslib.__decorate([
|
|
2383
|
-
typeorm
|
|
2384
|
-
typeorm
|
|
2273
|
+
typeorm.Column({ type: 'uuid', nullable: true }),
|
|
2274
|
+
typeorm.Index(),
|
|
2385
2275
|
tslib.__metadata("design:type", Object)
|
|
2386
2276
|
], exports.ScrapeOrderItemEntityClass.prototype, "loaderId", void 0);
|
|
2387
2277
|
tslib.__decorate([
|
|
2388
|
-
typeorm
|
|
2278
|
+
typeorm.Column({ type: 'numeric' }),
|
|
2389
2279
|
tslib.__metadata("design:type", Number)
|
|
2390
2280
|
], exports.ScrapeOrderItemEntityClass.prototype, "targetScrapedQuantity", void 0);
|
|
2391
2281
|
tslib.__decorate([
|
|
2392
|
-
typeorm
|
|
2393
|
-
typeorm
|
|
2282
|
+
typeorm.Column({ type: 'uuid' }),
|
|
2283
|
+
typeorm.Index(),
|
|
2394
2284
|
tslib.__metadata("design:type", String)
|
|
2395
2285
|
], exports.ScrapeOrderItemEntityClass.prototype, "orderId", void 0);
|
|
2396
2286
|
tslib.__decorate([
|
|
2397
|
-
typeorm
|
|
2398
|
-
typeorm
|
|
2287
|
+
typeorm.ManyToOne('locations'),
|
|
2288
|
+
typeorm.JoinColumn({ name: 'locationId', referencedColumnName: 'id' }),
|
|
2399
2289
|
tslib.__metadata("design:type", exports.LocationEntityClass)
|
|
2400
2290
|
], exports.ScrapeOrderItemEntityClass.prototype, "location", void 0);
|
|
2401
2291
|
tslib.__decorate([
|
|
2402
|
-
typeorm
|
|
2403
|
-
typeorm
|
|
2292
|
+
typeorm.ManyToOne('loaders'),
|
|
2293
|
+
typeorm.JoinColumn({ name: 'loaderId', referencedColumnName: 'id' }),
|
|
2404
2294
|
tslib.__metadata("design:type", exports.LoadersEntityClass)
|
|
2405
2295
|
], exports.ScrapeOrderItemEntityClass.prototype, "loader", void 0);
|
|
2406
2296
|
tslib.__decorate([
|
|
2407
|
-
typeorm
|
|
2408
|
-
typeorm
|
|
2297
|
+
typeorm.ManyToOne('scrape_orders', (entity) => entity.items),
|
|
2298
|
+
typeorm.JoinColumn({ name: 'orderId', referencedColumnName: 'id' }),
|
|
2409
2299
|
tslib.__metadata("design:type", exports.ScrapeOrderEntityClass)
|
|
2410
2300
|
], exports.ScrapeOrderItemEntityClass.prototype, "order", void 0);
|
|
2411
2301
|
tslib.__decorate([
|
|
2412
|
-
typeorm
|
|
2302
|
+
typeorm.OneToMany('scrape_order_changes', (change) => change.item),
|
|
2413
2303
|
tslib.__metadata("design:type", Array)
|
|
2414
2304
|
], exports.ScrapeOrderItemEntityClass.prototype, "changes", void 0);
|
|
2415
2305
|
exports.ScrapeOrderItemEntityClass = tslib.__decorate([
|
|
2416
|
-
typeorm
|
|
2417
|
-
typeorm
|
|
2306
|
+
typeorm.Entity('scrape_order_items'),
|
|
2307
|
+
typeorm.TableInheritance({ column: { type: 'varchar', name: 'entityName' } })
|
|
2418
2308
|
], exports.ScrapeOrderItemEntityClass);
|
|
2419
2309
|
|
|
2420
2310
|
const ScrapeOrderChangeEntity = Symbol('ScrapeOrderChangeEntity');
|
|
@@ -2426,29 +2316,29 @@ exports.ScrapeOrderChangeEntityClass = class ScrapeOrderChangeEntityClass {
|
|
|
2426
2316
|
item;
|
|
2427
2317
|
};
|
|
2428
2318
|
tslib.__decorate([
|
|
2429
|
-
typeorm
|
|
2319
|
+
typeorm.PrimaryGeneratedColumn('uuid'),
|
|
2430
2320
|
tslib.__metadata("design:type", String)
|
|
2431
2321
|
], exports.ScrapeOrderChangeEntityClass.prototype, "id", void 0);
|
|
2432
2322
|
tslib.__decorate([
|
|
2433
|
-
typeorm
|
|
2323
|
+
typeorm.Column({ type: 'uuid' }),
|
|
2434
2324
|
tslib.__metadata("design:type", String)
|
|
2435
2325
|
], exports.ScrapeOrderChangeEntityClass.prototype, "itemId", void 0);
|
|
2436
2326
|
tslib.__decorate([
|
|
2437
|
-
typeorm
|
|
2327
|
+
typeorm.Column({ type: 'numeric' }),
|
|
2438
2328
|
tslib.__metadata("design:type", Number)
|
|
2439
2329
|
], exports.ScrapeOrderChangeEntityClass.prototype, "quantityChanged", void 0);
|
|
2440
2330
|
tslib.__decorate([
|
|
2441
|
-
typeorm
|
|
2442
|
-
typeorm
|
|
2331
|
+
typeorm.OneToOne('orders'),
|
|
2332
|
+
typeorm.JoinColumn({ name: 'id', referencedColumnName: 'id' }),
|
|
2443
2333
|
tslib.__metadata("design:type", wmsBaseNestjsModule.OrderEntity)
|
|
2444
2334
|
], exports.ScrapeOrderChangeEntityClass.prototype, "order", void 0);
|
|
2445
2335
|
tslib.__decorate([
|
|
2446
|
-
typeorm
|
|
2447
|
-
typeorm
|
|
2336
|
+
typeorm.ManyToOne('scrape_order_items', (item) => item.changes),
|
|
2337
|
+
typeorm.JoinColumn({ name: 'itemId', referencedColumnName: 'id' }),
|
|
2448
2338
|
tslib.__metadata("design:type", exports.ScrapeOrderItemEntityClass)
|
|
2449
2339
|
], exports.ScrapeOrderChangeEntityClass.prototype, "item", void 0);
|
|
2450
2340
|
exports.ScrapeOrderChangeEntityClass = tslib.__decorate([
|
|
2451
|
-
typeorm
|
|
2341
|
+
typeorm.Entity('scrape_order_changes')
|
|
2452
2342
|
], exports.ScrapeOrderChangeEntityClass);
|
|
2453
2343
|
|
|
2454
2344
|
const entities = [
|
|
@@ -2513,13 +2403,9 @@ let ModelsModule = class ModelsModule {
|
|
|
2513
2403
|
};
|
|
2514
2404
|
ModelsModule = tslib.__decorate([
|
|
2515
2405
|
common.Module({
|
|
2516
|
-
imports: [typeorm.TypeOrmModule.forFeature(entities.map(([_, entity]) => entity))],
|
|
2517
|
-
providers: [
|
|
2518
|
-
|
|
2519
|
-
exports.WmsEventCollector,
|
|
2520
|
-
StockChangeSubscriber,
|
|
2521
|
-
],
|
|
2522
|
-
exports: [typeorm.TypeOrmModule, ...ResolvedEntitiesProviders, exports.WmsEventCollector],
|
|
2406
|
+
imports: [typeorm$1.TypeOrmModule.forFeature(entities.map(([_, entity]) => entity))],
|
|
2407
|
+
providers: [...ResolvedEntitiesProviders, exports.WmsEventCollector],
|
|
2408
|
+
exports: [typeorm$1.TypeOrmModule, ...ResolvedEntitiesProviders, exports.WmsEventCollector],
|
|
2523
2409
|
})
|
|
2524
2410
|
], ModelsModule);
|
|
2525
2411
|
|
|
@@ -2941,7 +2827,7 @@ exports.StockService = tslib.__decorate([
|
|
|
2941
2827
|
tslib.__param(1, common.Inject(StockEntity)),
|
|
2942
2828
|
tslib.__param(2, common.Inject(MaterialEntity)),
|
|
2943
2829
|
tslib.__param(3, common.Inject(WMS_CORE_MODULE_OPTIONS)),
|
|
2944
|
-
tslib.__metadata("design:paramtypes", [typeorm
|
|
2830
|
+
tslib.__metadata("design:paramtypes", [typeorm.DataSource, Object, Object, Object])
|
|
2945
2831
|
], exports.StockService);
|
|
2946
2832
|
|
|
2947
2833
|
/**
|
|
@@ -2996,7 +2882,7 @@ exports.LoaderService = class LoaderService {
|
|
|
2996
2882
|
const loaderRepository = manager.getRepository(this.loaderEntity);
|
|
2997
2883
|
const loaderTypeRepository = manager.getRepository(this.loaderTypeEntity);
|
|
2998
2884
|
const typeMap = await loaderTypeRepository
|
|
2999
|
-
.findBy({ id: typeorm
|
|
2885
|
+
.findBy({ id: typeorm.In(options.map(({ typeId }) => typeId)) })
|
|
3000
2886
|
.then((types) => new Map(types.map((t) => [t.id, t])));
|
|
3001
2887
|
const loaders = [];
|
|
3002
2888
|
await Promise.all(options.map(async (option) => {
|
|
@@ -3170,7 +3056,7 @@ exports.LoaderService = tslib.__decorate([
|
|
|
3170
3056
|
tslib.__param(1, common.Inject(LoadersEntity)),
|
|
3171
3057
|
tslib.__param(2, common.Inject(LoaderTypeEntity)),
|
|
3172
3058
|
tslib.__param(3, common.Inject(LoaderUnitEntity)),
|
|
3173
|
-
tslib.__metadata("design:paramtypes", [typeorm
|
|
3059
|
+
tslib.__metadata("design:paramtypes", [typeorm.DataSource, Object, Object, Object])
|
|
3174
3060
|
], exports.LoaderService);
|
|
3175
3061
|
|
|
3176
3062
|
/**
|
|
@@ -3289,7 +3175,7 @@ exports.MaterialService = tslib.__decorate([
|
|
|
3289
3175
|
common.Injectable(),
|
|
3290
3176
|
tslib.__param(1, common.Inject(MaterialEntity)),
|
|
3291
3177
|
tslib.__param(2, common.Inject(MaterialUnitEntity)),
|
|
3292
|
-
tslib.__metadata("design:paramtypes", [typeorm
|
|
3178
|
+
tslib.__metadata("design:paramtypes", [typeorm.DataSource, Object, Object])
|
|
3293
3179
|
], exports.MaterialService);
|
|
3294
3180
|
|
|
3295
3181
|
exports.BatchService = class BatchService {
|
|
@@ -3365,12 +3251,12 @@ exports.BatchService = class BatchService {
|
|
|
3365
3251
|
const batchRepository = manager.getRepository(exports.BatchEntityClass);
|
|
3366
3252
|
const batchGroupRepository = manager.getRepository(this.batchGroupEntity);
|
|
3367
3253
|
const unsplittedCondition = {
|
|
3368
|
-
saleId: typeorm
|
|
3369
|
-
saleSerialId: typeorm
|
|
3370
|
-
customerId: typeorm
|
|
3371
|
-
vendorId: typeorm
|
|
3372
|
-
transferId: typeorm
|
|
3373
|
-
inspectionResult: typeorm
|
|
3254
|
+
saleId: typeorm.IsNull(),
|
|
3255
|
+
saleSerialId: typeorm.IsNull(),
|
|
3256
|
+
customerId: typeorm.IsNull(),
|
|
3257
|
+
vendorId: typeorm.IsNull(),
|
|
3258
|
+
transferId: typeorm.IsNull(),
|
|
3259
|
+
inspectionResult: typeorm.IsNull(),
|
|
3374
3260
|
held: false,
|
|
3375
3261
|
inShipment: false,
|
|
3376
3262
|
};
|
|
@@ -3454,7 +3340,7 @@ exports.BatchService = tslib.__decorate([
|
|
|
3454
3340
|
common.Injectable(),
|
|
3455
3341
|
tslib.__param(1, common.Inject(BatchEntity)),
|
|
3456
3342
|
tslib.__param(2, common.Inject(BatchGroupEntity)),
|
|
3457
|
-
tslib.__metadata("design:paramtypes", [typeorm
|
|
3343
|
+
tslib.__metadata("design:paramtypes", [typeorm.DataSource, Object, Object])
|
|
3458
3344
|
], exports.BatchService);
|
|
3459
3345
|
|
|
3460
3346
|
exports.HelperService = class HelperService {
|
|
@@ -3476,7 +3362,7 @@ exports.HelperService = class HelperService {
|
|
|
3476
3362
|
};
|
|
3477
3363
|
exports.HelperService = tslib.__decorate([
|
|
3478
3364
|
common.Injectable(),
|
|
3479
|
-
tslib.__metadata("design:paramtypes", [typeorm
|
|
3365
|
+
tslib.__metadata("design:paramtypes", [typeorm.DataSource])
|
|
3480
3366
|
], exports.HelperService);
|
|
3481
3367
|
|
|
3482
3368
|
/**
|
|
@@ -3615,7 +3501,7 @@ exports.ReceiveInventoryOrderService = class ReceiveInventoryOrderService {
|
|
|
3615
3501
|
const receiveInventoryOrderItemRepository = manager.getRepository(this.receiveInventoryOrderItemEntity);
|
|
3616
3502
|
const order = await receiveInventoryOrderRepository.findOneByOrFail({
|
|
3617
3503
|
id,
|
|
3618
|
-
removedAt: typeorm
|
|
3504
|
+
removedAt: typeorm.IsNull(),
|
|
3619
3505
|
});
|
|
3620
3506
|
const { items, ...orderOptions } = options;
|
|
3621
3507
|
const updated = await receiveInventoryOrderRepository.save(receiveInventoryOrderRepository.create({
|
|
@@ -3730,7 +3616,7 @@ exports.ReceiveInventoryOrderService = class ReceiveInventoryOrderService {
|
|
|
3730
3616
|
const loaderRepository = manager.getRepository(exports.LoadersEntityClass);
|
|
3731
3617
|
const stockRepository = manager.getRepository(exports.StockEntityClass);
|
|
3732
3618
|
const items = await itemRepository.find({
|
|
3733
|
-
where: { id: typeorm
|
|
3619
|
+
where: { id: typeorm.In(options.map((o) => o.itemId)) },
|
|
3734
3620
|
relations: ['changes'],
|
|
3735
3621
|
});
|
|
3736
3622
|
const itemMap = new Map(items.map((i) => [i.id, i]));
|
|
@@ -3820,7 +3706,7 @@ exports.ReceiveInventoryOrderService = tslib.__decorate([
|
|
|
3820
3706
|
common.Injectable(),
|
|
3821
3707
|
tslib.__param(5, common.Inject(ReceiveInventoryOrderEntity)),
|
|
3822
3708
|
tslib.__param(6, common.Inject(ReceiveInventoryOrderItemEntity)),
|
|
3823
|
-
tslib.__metadata("design:paramtypes", [typeorm
|
|
3709
|
+
tslib.__metadata("design:paramtypes", [typeorm.DataSource,
|
|
3824
3710
|
exports.MaterialService,
|
|
3825
3711
|
exports.BatchService,
|
|
3826
3712
|
exports.HelperService,
|
|
@@ -4000,7 +3886,7 @@ exports.ShipInventoryOrderService = class ShipInventoryOrderService {
|
|
|
4000
3886
|
const materialRepository = manager.getRepository(exports.MaterialEntityClass);
|
|
4001
3887
|
const order = await shipInventoryOrderRepository.findOneByOrFail({
|
|
4002
3888
|
id,
|
|
4003
|
-
removedAt: typeorm
|
|
3889
|
+
removedAt: typeorm.IsNull(),
|
|
4004
3890
|
});
|
|
4005
3891
|
const { references, items, ...orderOptions } = options;
|
|
4006
3892
|
const updated = await shipInventoryOrderRepository.save(shipInventoryOrderRepository.create({
|
|
@@ -4011,7 +3897,7 @@ exports.ShipInventoryOrderService = class ShipInventoryOrderService {
|
|
|
4011
3897
|
const newItems = [];
|
|
4012
3898
|
const existingItems = [];
|
|
4013
3899
|
const items = await shipInventoryOrderReferenceRepository.find({
|
|
4014
|
-
where: { orderId: id, removedAt: typeorm
|
|
3900
|
+
where: { orderId: id, removedAt: typeorm.IsNull() },
|
|
4015
3901
|
});
|
|
4016
3902
|
const itemSet = new Set(items.map((i) => i.id));
|
|
4017
3903
|
const results = await Promise.all((references || []).map(async (item) => {
|
|
@@ -4054,7 +3940,7 @@ exports.ShipInventoryOrderService = class ShipInventoryOrderService {
|
|
|
4054
3940
|
const newItems = [];
|
|
4055
3941
|
const existingItems = [];
|
|
4056
3942
|
await shipInventoryOrderItemRepository
|
|
4057
|
-
.find({ where: { orderId: id, removedAt: typeorm
|
|
3943
|
+
.find({ where: { orderId: id, removedAt: typeorm.IsNull() } })
|
|
4058
3944
|
.then((dbItems) => {
|
|
4059
3945
|
const itemSet = new Set(dbItems.map((i) => i.id));
|
|
4060
3946
|
items?.forEach((item) => {
|
|
@@ -4132,7 +4018,7 @@ exports.ShipInventoryOrderService = class ShipInventoryOrderService {
|
|
|
4132
4018
|
const orderRepository = manager.getRepository(wmsBaseNestjsModule.OrderEntity);
|
|
4133
4019
|
const stockRepository = manager.getRepository(exports.StockEntityClass);
|
|
4134
4020
|
const items = await itemRepository.find({
|
|
4135
|
-
where: { id: typeorm
|
|
4021
|
+
where: { id: typeorm.In(options.map((o) => o.itemId)) },
|
|
4136
4022
|
relations: ['changes'],
|
|
4137
4023
|
});
|
|
4138
4024
|
const itemMap = new Map(items.map((item) => [item.id, item]));
|
|
@@ -4269,7 +4155,7 @@ exports.ShipInventoryOrderService = class ShipInventoryOrderService {
|
|
|
4269
4155
|
const shipInventoryOrderRepository = manager.getRepository(this.shipInventoryOrderEntity);
|
|
4270
4156
|
const order = await shipInventoryOrderRepository.findOneByOrFail({
|
|
4271
4157
|
id: options.orderId,
|
|
4272
|
-
removedAt: typeorm
|
|
4158
|
+
removedAt: typeorm.IsNull(),
|
|
4273
4159
|
});
|
|
4274
4160
|
if (options.items.length) {
|
|
4275
4161
|
const items = options.items.map((item) => ({
|
|
@@ -4289,7 +4175,7 @@ exports.ShipInventoryOrderService = class ShipInventoryOrderService {
|
|
|
4289
4175
|
const orderRepository = manager.getRepository(wmsBaseNestjsModule.OrderEntity);
|
|
4290
4176
|
const stockRepository = manager.getRepository(exports.StockEntityClass);
|
|
4291
4177
|
const items = await itemRepository.find({
|
|
4292
|
-
where: { id: typeorm
|
|
4178
|
+
where: { id: typeorm.In(options.map((option) => option.itemId)) },
|
|
4293
4179
|
relations: ['changes'],
|
|
4294
4180
|
});
|
|
4295
4181
|
const itemMap = new Map(items.map((item) => [item.id, item]));
|
|
@@ -4362,7 +4248,7 @@ exports.ShipInventoryOrderService = tslib.__decorate([
|
|
|
4362
4248
|
tslib.__param(5, common.Inject(ShipInventoryOrderItemEntity)),
|
|
4363
4249
|
tslib.__param(6, common.Inject(ShipInventoryOrderReferenceEntity)),
|
|
4364
4250
|
tslib.__param(7, common.Inject(SaleOrderEntity)),
|
|
4365
|
-
tslib.__metadata("design:paramtypes", [typeorm
|
|
4251
|
+
tslib.__metadata("design:paramtypes", [typeorm.DataSource,
|
|
4366
4252
|
exports.MaterialService,
|
|
4367
4253
|
exports.BatchService,
|
|
4368
4254
|
exports.StockService, Object, Object, Object, Object])
|
|
@@ -4442,7 +4328,7 @@ exports.LocationService = class LocationService {
|
|
|
4442
4328
|
exports.LocationService = tslib.__decorate([
|
|
4443
4329
|
common.Injectable(),
|
|
4444
4330
|
tslib.__param(1, common.Inject(LocationEntity)),
|
|
4445
|
-
tslib.__metadata("design:paramtypes", [typeorm
|
|
4331
|
+
tslib.__metadata("design:paramtypes", [typeorm.DataSource, Object])
|
|
4446
4332
|
], exports.LocationService);
|
|
4447
4333
|
|
|
4448
4334
|
exports.UnitService = class UnitService {
|
|
@@ -4456,7 +4342,7 @@ exports.UnitService = class UnitService {
|
|
|
4456
4342
|
};
|
|
4457
4343
|
exports.UnitService = tslib.__decorate([
|
|
4458
4344
|
common.Injectable(),
|
|
4459
|
-
tslib.__metadata("design:paramtypes", [typeorm
|
|
4345
|
+
tslib.__metadata("design:paramtypes", [typeorm.DataSource])
|
|
4460
4346
|
], exports.UnitService);
|
|
4461
4347
|
|
|
4462
4348
|
exports.TransferOrderService = class TransferOrderService {
|
|
@@ -4558,7 +4444,7 @@ exports.TransferOrderService = class TransferOrderService {
|
|
|
4558
4444
|
async cancelTransferInternal(options, manager) {
|
|
4559
4445
|
const repos = this.getRepositories(manager);
|
|
4560
4446
|
const items = await repos.transferOrderItem.find({
|
|
4561
|
-
where: { id: typeorm
|
|
4447
|
+
where: { id: typeorm.In(options.map((o) => o.itemId)) },
|
|
4562
4448
|
relations: ['changes'],
|
|
4563
4449
|
});
|
|
4564
4450
|
const itemMap = new Map(items.map((item) => [item.id, item]));
|
|
@@ -4866,7 +4752,7 @@ exports.TransferOrderService = class TransferOrderService {
|
|
|
4866
4752
|
const itemRepository = manager.getRepository(this.transferOrderItemEntity);
|
|
4867
4753
|
const stockRepository = manager.getRepository(this.stockEntity);
|
|
4868
4754
|
const items = await itemRepository.find({
|
|
4869
|
-
where: { id: typeorm
|
|
4755
|
+
where: { id: typeorm.In(options.map((o) => o.itemId)) },
|
|
4870
4756
|
relations: ['changes'],
|
|
4871
4757
|
});
|
|
4872
4758
|
const itemMap = new Map(items.map((item) => [item.id, item]));
|
|
@@ -5025,7 +4911,7 @@ exports.TransferOrderService = tslib.__decorate([
|
|
|
5025
4911
|
tslib.__param(5, common.Inject(TransferOrderEntity)),
|
|
5026
4912
|
tslib.__param(6, common.Inject(TransferOrderItemEntity)),
|
|
5027
4913
|
tslib.__param(7, common.Inject(StockEntity)),
|
|
5028
|
-
tslib.__metadata("design:paramtypes", [typeorm
|
|
4914
|
+
tslib.__metadata("design:paramtypes", [typeorm.DataSource,
|
|
5029
4915
|
exports.HelperService,
|
|
5030
4916
|
exports.MaterialService,
|
|
5031
4917
|
exports.BatchService,
|
|
@@ -5252,7 +5138,7 @@ exports.HoldInventoryOrderService = tslib.__decorate([
|
|
|
5252
5138
|
tslib.__param(5, common.Inject(HoldInventoryOrderEntity)),
|
|
5253
5139
|
tslib.__param(6, common.Inject(HoldInventoryOrderItemEntity)),
|
|
5254
5140
|
tslib.__param(7, common.Inject(StockEntity)),
|
|
5255
|
-
tslib.__metadata("design:paramtypes", [typeorm
|
|
5141
|
+
tslib.__metadata("design:paramtypes", [typeorm.DataSource,
|
|
5256
5142
|
exports.HelperService,
|
|
5257
5143
|
exports.MaterialService,
|
|
5258
5144
|
exports.BatchService,
|
|
@@ -5398,8 +5284,8 @@ exports.AllocateInventoryOrderService = class AllocateInventoryOrderService {
|
|
|
5398
5284
|
return;
|
|
5399
5285
|
const originalBatch = await this.batchService.batchRepository.findOneByOrFail({
|
|
5400
5286
|
id: data.batchId,
|
|
5401
|
-
saleId: typeorm
|
|
5402
|
-
saleSerialId: typeorm
|
|
5287
|
+
saleId: typeorm.Not(typeorm.IsNull()),
|
|
5288
|
+
saleSerialId: typeorm.Not(typeorm.IsNull()),
|
|
5403
5289
|
});
|
|
5404
5290
|
const splittedBatch = await this.batchService.splitBatch({
|
|
5405
5291
|
id: data.batchId,
|
|
@@ -5493,7 +5379,7 @@ exports.AllocateInventoryOrderService = tslib.__decorate([
|
|
|
5493
5379
|
tslib.__param(5, common.Inject(AllocateInventoryOrderEntity)),
|
|
5494
5380
|
tslib.__param(6, common.Inject(AllocateInventoryOrderItemEntity)),
|
|
5495
5381
|
tslib.__param(7, common.Inject(StockEntity)),
|
|
5496
|
-
tslib.__metadata("design:paramtypes", [typeorm
|
|
5382
|
+
tslib.__metadata("design:paramtypes", [typeorm.DataSource,
|
|
5497
5383
|
exports.HelperService,
|
|
5498
5384
|
exports.MaterialService,
|
|
5499
5385
|
exports.BatchService,
|
|
@@ -5596,7 +5482,7 @@ exports.SplitBatchOrderService = tslib.__decorate([
|
|
|
5596
5482
|
common.Injectable(),
|
|
5597
5483
|
tslib.__param(5, common.Inject(SplitBatchOrderEntity)),
|
|
5598
5484
|
tslib.__param(6, common.Inject(SplitBatchOrderItemEntity)),
|
|
5599
|
-
tslib.__metadata("design:paramtypes", [typeorm
|
|
5485
|
+
tslib.__metadata("design:paramtypes", [typeorm.DataSource,
|
|
5600
5486
|
exports.MaterialService,
|
|
5601
5487
|
exports.BatchService,
|
|
5602
5488
|
exports.HelperService,
|
|
@@ -5631,7 +5517,7 @@ exports.MergeBatchOrderService = class MergeBatchOrderService {
|
|
|
5631
5517
|
const batchRepository = manager.getRepository(exports.BatchEntityClass);
|
|
5632
5518
|
// Verify all source batches have identical metadata (except key and groupId)
|
|
5633
5519
|
const sourceBatches = await batchRepository.find({
|
|
5634
|
-
where: { id: typeorm
|
|
5520
|
+
where: { id: typeorm.In(options.items.map((item) => item.batchId)) },
|
|
5635
5521
|
});
|
|
5636
5522
|
if (sourceBatches.length !== options.items.length) {
|
|
5637
5523
|
throw new Error('Some source batches were not found');
|
|
@@ -5733,7 +5619,7 @@ exports.MergeBatchOrderService = tslib.__decorate([
|
|
|
5733
5619
|
common.Injectable(),
|
|
5734
5620
|
tslib.__param(5, common.Inject(MergeBatchOrderEntity)),
|
|
5735
5621
|
tslib.__param(6, common.Inject(MergeBatchOrderItemEntity)),
|
|
5736
|
-
tslib.__metadata("design:paramtypes", [typeorm
|
|
5622
|
+
tslib.__metadata("design:paramtypes", [typeorm.DataSource,
|
|
5737
5623
|
exports.MaterialService,
|
|
5738
5624
|
exports.BatchService,
|
|
5739
5625
|
exports.HelperService,
|
|
@@ -5856,7 +5742,7 @@ exports.ReclassifyInventoryOrderService = tslib.__decorate([
|
|
|
5856
5742
|
common.Injectable(),
|
|
5857
5743
|
tslib.__param(5, common.Inject(ReclassifyInventoryOrderEntity)),
|
|
5858
5744
|
tslib.__param(6, common.Inject(ReclassifyInventoryOrderItemEntity)),
|
|
5859
|
-
tslib.__metadata("design:paramtypes", [typeorm
|
|
5745
|
+
tslib.__metadata("design:paramtypes", [typeorm.DataSource,
|
|
5860
5746
|
exports.MaterialService,
|
|
5861
5747
|
exports.BatchService,
|
|
5862
5748
|
exports.HelperService,
|
|
@@ -6008,7 +5894,7 @@ exports.TransferVendorOrderService = class TransferVendorOrderService {
|
|
|
6008
5894
|
return;
|
|
6009
5895
|
const originalBatch = await this.batchService.batchRepository.findOneByOrFail({
|
|
6010
5896
|
id: data.batchId,
|
|
6011
|
-
vendorId: typeorm
|
|
5897
|
+
vendorId: typeorm.Not(typeorm.IsNull()),
|
|
6012
5898
|
});
|
|
6013
5899
|
const splittedBatch = await this.batchService.splitBatch({
|
|
6014
5900
|
id: data.batchId,
|
|
@@ -6077,7 +5963,7 @@ exports.TransferVendorOrderService = tslib.__decorate([
|
|
|
6077
5963
|
tslib.__param(5, common.Inject(TransferVendorOrderEntity)),
|
|
6078
5964
|
tslib.__param(6, common.Inject(TransferVendorOrderItemEntity)),
|
|
6079
5965
|
tslib.__param(7, common.Inject(StockEntity)),
|
|
6080
|
-
tslib.__metadata("design:paramtypes", [typeorm
|
|
5966
|
+
tslib.__metadata("design:paramtypes", [typeorm.DataSource,
|
|
6081
5967
|
exports.HelperService,
|
|
6082
5968
|
exports.MaterialService,
|
|
6083
5969
|
exports.BatchService,
|
|
@@ -6157,7 +6043,7 @@ exports.QualityInspectionOrderService = tslib.__decorate([
|
|
|
6157
6043
|
common.Injectable(),
|
|
6158
6044
|
tslib.__param(1, common.Inject(QualityInspectionOrderEntity)),
|
|
6159
6045
|
tslib.__param(2, common.Inject(QualityInspectionOrderItemEntity)),
|
|
6160
|
-
tslib.__metadata("design:paramtypes", [typeorm
|
|
6046
|
+
tslib.__metadata("design:paramtypes", [typeorm.DataSource, Object, Object, exports.BatchService,
|
|
6161
6047
|
exports.MaterialService,
|
|
6162
6048
|
exports.StockService])
|
|
6163
6049
|
], exports.QualityInspectionOrderService);
|
|
@@ -6307,7 +6193,7 @@ exports.TransferCustomerOrderService = class TransferCustomerOrderService {
|
|
|
6307
6193
|
return;
|
|
6308
6194
|
const originalBatch = await this.batchService.batchRepository.findOneByOrFail({
|
|
6309
6195
|
id: data.batchId,
|
|
6310
|
-
customerId: typeorm
|
|
6196
|
+
customerId: typeorm.Not(typeorm.IsNull()),
|
|
6311
6197
|
});
|
|
6312
6198
|
const splittedBatch = await this.batchService.splitBatch({
|
|
6313
6199
|
id: data.batchId,
|
|
@@ -6376,7 +6262,7 @@ exports.TransferCustomerOrderService = tslib.__decorate([
|
|
|
6376
6262
|
tslib.__param(5, common.Inject(TransferCustomerOrderEntity)),
|
|
6377
6263
|
tslib.__param(6, common.Inject(TransferCustomerOrderItemEntity)),
|
|
6378
6264
|
tslib.__param(7, common.Inject(StockEntity)),
|
|
6379
|
-
tslib.__metadata("design:paramtypes", [typeorm
|
|
6265
|
+
tslib.__metadata("design:paramtypes", [typeorm.DataSource,
|
|
6380
6266
|
exports.HelperService,
|
|
6381
6267
|
exports.MaterialService,
|
|
6382
6268
|
exports.BatchService,
|
|
@@ -6394,7 +6280,7 @@ exports.SaleOrderService = class SaleOrderService {
|
|
|
6394
6280
|
};
|
|
6395
6281
|
exports.SaleOrderService = tslib.__decorate([
|
|
6396
6282
|
common.Injectable(),
|
|
6397
|
-
tslib.__metadata("design:paramtypes", [typeorm
|
|
6283
|
+
tslib.__metadata("design:paramtypes", [typeorm.DataSource])
|
|
6398
6284
|
], exports.SaleOrderService);
|
|
6399
6285
|
|
|
6400
6286
|
exports.ScrapeService = class ScrapeService {
|
|
@@ -6473,7 +6359,7 @@ exports.ScrapeService = tslib.__decorate([
|
|
|
6473
6359
|
common.Injectable(),
|
|
6474
6360
|
tslib.__param(4, common.Inject(ScrapeOrderEntity)),
|
|
6475
6361
|
tslib.__param(5, common.Inject(StockEntity)),
|
|
6476
|
-
tslib.__metadata("design:paramtypes", [typeorm
|
|
6362
|
+
tslib.__metadata("design:paramtypes", [typeorm.DataSource,
|
|
6477
6363
|
exports.HelperService,
|
|
6478
6364
|
exports.MaterialService,
|
|
6479
6365
|
exports.StockService, Object, Object])
|
|
@@ -6508,9 +6394,172 @@ exports.WarehouseMapDataService = class WarehouseMapDataService {
|
|
|
6508
6394
|
};
|
|
6509
6395
|
exports.WarehouseMapDataService = tslib.__decorate([
|
|
6510
6396
|
common.Injectable(),
|
|
6511
|
-
tslib.__metadata("design:paramtypes", [typeorm
|
|
6397
|
+
tslib.__metadata("design:paramtypes", [typeorm.DataSource])
|
|
6512
6398
|
], exports.WarehouseMapDataService);
|
|
6513
6399
|
|
|
6400
|
+
/** DI token holding the resolved {@link WmsEventModuleOptions}. */
|
|
6401
|
+
const WMS_EVENT_OPTIONS = Symbol('WMS_EVENT_OPTIONS');
|
|
6402
|
+
/** DI token for an optional external emitter bridge (e.g. @nestjs/event-emitter). */
|
|
6403
|
+
const WMS_EVENT_EMITTER_BRIDGE = Symbol('WMS_EVENT_EMITTER_BRIDGE');
|
|
6404
|
+
/** DI token for the optional host-neutral actor extractor. */
|
|
6405
|
+
const WMS_ACTOR_EXTRACTOR = Symbol('WMS_ACTOR_EXTRACTOR');
|
|
6406
|
+
/** DI token holding the boolean "enrich stock events" flag (default false). */
|
|
6407
|
+
const WMS_STOCK_ENRICH = Symbol('WMS_STOCK_ENRICH');
|
|
6408
|
+
|
|
6409
|
+
/**
|
|
6410
|
+
* Resolve the `ChangeType` for a change table. Tables whose semantics depend on
|
|
6411
|
+
* the sign of `quantityChanged` (ship / transfer / vendor / customer / hold /
|
|
6412
|
+
* allocate) branch on it; the rest are fixed.
|
|
6413
|
+
*/
|
|
6414
|
+
const TABLE_TO_CHANGE_TYPE = new Map([
|
|
6415
|
+
['receive_inventory_order_changes', () => exports.ChangeType.RECEIVED],
|
|
6416
|
+
[
|
|
6417
|
+
'ship_inventory_order_changes',
|
|
6418
|
+
(q) => (q > 0 ? exports.ChangeType.IN_SHIPMENT : exports.ChangeType.SHIPPED),
|
|
6419
|
+
],
|
|
6420
|
+
[
|
|
6421
|
+
'transfer_order_changes',
|
|
6422
|
+
(q) => (q > 0 ? exports.ChangeType.IN_TRANSFER : exports.ChangeType.TRANSFERRED),
|
|
6423
|
+
],
|
|
6424
|
+
[
|
|
6425
|
+
'transfer_vendor_order_changes',
|
|
6426
|
+
(q) => q > 0 ? exports.ChangeType.VENDOR_TRANSFERRED : exports.ChangeType.VENDOR_RETURNED,
|
|
6427
|
+
],
|
|
6428
|
+
[
|
|
6429
|
+
'transfer_customer_order_changes',
|
|
6430
|
+
(q) => q > 0 ? exports.ChangeType.CUSTOMER_HELD : exports.ChangeType.CUSTOMER_RETURNED,
|
|
6431
|
+
],
|
|
6432
|
+
[
|
|
6433
|
+
'hold_inventory_order_changes',
|
|
6434
|
+
(q) => (q > 0 ? exports.ChangeType.HELD : exports.ChangeType.RELEASED),
|
|
6435
|
+
],
|
|
6436
|
+
[
|
|
6437
|
+
'allocate_inventory_order_changes',
|
|
6438
|
+
(q) => (q > 0 ? exports.ChangeType.ALLOCATED : exports.ChangeType.DEALLOCATED),
|
|
6439
|
+
],
|
|
6440
|
+
['split_batch_order_changes', () => exports.ChangeType.SPLITTED],
|
|
6441
|
+
['merge_batch_order_changes', () => exports.ChangeType.MERGED],
|
|
6442
|
+
['reclassify_inventory_order_changes', () => exports.ChangeType.RECLASSIFIED],
|
|
6443
|
+
['scrape_order_changes', () => exports.ChangeType.SCRAPED],
|
|
6444
|
+
]);
|
|
6445
|
+
const CHANGE_TYPE_TO_EVENT = {
|
|
6446
|
+
[exports.ChangeType.RECEIVED]: 'stock.received',
|
|
6447
|
+
[exports.ChangeType.IN_SHIPMENT]: 'stock.in-shipment',
|
|
6448
|
+
[exports.ChangeType.SHIPPED]: 'stock.shipped',
|
|
6449
|
+
[exports.ChangeType.IN_TRANSFER]: 'stock.in-transfer',
|
|
6450
|
+
[exports.ChangeType.TRANSFERRED]: 'stock.transferred',
|
|
6451
|
+
[exports.ChangeType.VENDOR_TRANSFERRED]: 'stock.vendor-transferred',
|
|
6452
|
+
[exports.ChangeType.VENDOR_RETURNED]: 'stock.vendor-returned',
|
|
6453
|
+
[exports.ChangeType.HELD]: 'stock.held',
|
|
6454
|
+
[exports.ChangeType.RELEASED]: 'stock.released',
|
|
6455
|
+
[exports.ChangeType.CUSTOMER_HELD]: 'stock.customer-held',
|
|
6456
|
+
[exports.ChangeType.CUSTOMER_RETURNED]: 'stock.customer-returned',
|
|
6457
|
+
[exports.ChangeType.SPLITTED]: 'stock.splitted',
|
|
6458
|
+
[exports.ChangeType.MERGED]: 'stock.merged',
|
|
6459
|
+
[exports.ChangeType.ALLOCATED]: 'stock.allocated',
|
|
6460
|
+
[exports.ChangeType.DEALLOCATED]: 'stock.deallocated',
|
|
6461
|
+
[exports.ChangeType.RECLASSIFIED]: 'stock.reclassified',
|
|
6462
|
+
[exports.ChangeType.SCRAPED]: 'stock.scraped',
|
|
6463
|
+
};
|
|
6464
|
+
const QUALITY_INSPECTION_TABLE = 'quality_inspection_order_changes';
|
|
6465
|
+
/**
|
|
6466
|
+
* Centralized collection of stock domain events. Listens to every
|
|
6467
|
+
* `*_order_change` insert and, using the change table name plus the sign of
|
|
6468
|
+
* `quantityChanged`, derives the `ChangeType` and buffers a `stock.*` event
|
|
6469
|
+
* into the active dispatch scope (flushed post-commit by the graphql
|
|
6470
|
+
* interceptor). This keeps the 12 domain services untouched and automatically
|
|
6471
|
+
* covers any future code path that writes a change row.
|
|
6472
|
+
*
|
|
6473
|
+
* It self-registers on the data source so no global TypeORM `subscribers`
|
|
6474
|
+
* config is required.
|
|
6475
|
+
*/
|
|
6476
|
+
let StockChangeSubscriber = class StockChangeSubscriber {
|
|
6477
|
+
collector;
|
|
6478
|
+
enrich;
|
|
6479
|
+
constructor(dataSource, collector, enrich = false) {
|
|
6480
|
+
this.collector = collector;
|
|
6481
|
+
this.enrich = enrich;
|
|
6482
|
+
dataSource.subscribers.push(this);
|
|
6483
|
+
}
|
|
6484
|
+
async afterInsert(event) {
|
|
6485
|
+
const tableName = event.metadata.tableName;
|
|
6486
|
+
const entity = event.entity;
|
|
6487
|
+
if (!entity || typeof entity.id !== 'string') {
|
|
6488
|
+
return;
|
|
6489
|
+
}
|
|
6490
|
+
const quantityDelta = Number(entity.quantityChanged);
|
|
6491
|
+
if (tableName === QUALITY_INSPECTION_TABLE) {
|
|
6492
|
+
const enrichment = this.enrich
|
|
6493
|
+
? await this.loadItemFields(event, entity.itemId)
|
|
6494
|
+
: undefined;
|
|
6495
|
+
this.collector.collect('stock.inspection-resolved', {
|
|
6496
|
+
orderId: entity.id,
|
|
6497
|
+
itemId: entity.itemId,
|
|
6498
|
+
quantityDelta,
|
|
6499
|
+
changeType: null,
|
|
6500
|
+
inspectionResult: entity.result ?? null,
|
|
6501
|
+
...enrichment,
|
|
6502
|
+
});
|
|
6503
|
+
return;
|
|
6504
|
+
}
|
|
6505
|
+
const resolveChangeType = TABLE_TO_CHANGE_TYPE.get(tableName);
|
|
6506
|
+
if (!resolveChangeType) {
|
|
6507
|
+
// Not a stock change table — enrich nothing, emit nothing.
|
|
6508
|
+
return;
|
|
6509
|
+
}
|
|
6510
|
+
const changeType = resolveChangeType(quantityDelta);
|
|
6511
|
+
const enrichment = this.enrich
|
|
6512
|
+
? await this.loadItemFields(event, entity.itemId)
|
|
6513
|
+
: undefined;
|
|
6514
|
+
this.collector.collect(CHANGE_TYPE_TO_EVENT[changeType], {
|
|
6515
|
+
orderId: entity.id,
|
|
6516
|
+
itemId: entity.itemId,
|
|
6517
|
+
quantityDelta,
|
|
6518
|
+
changeType,
|
|
6519
|
+
...enrichment,
|
|
6520
|
+
});
|
|
6521
|
+
}
|
|
6522
|
+
/**
|
|
6523
|
+
* Load `materialId / batchId / locationId / loaderId` from the change's order
|
|
6524
|
+
* item (one PK lookup, same transaction). Generic across all 12 change tables
|
|
6525
|
+
* via the `item` relation metadata. Returns `undefined` on any miss so the
|
|
6526
|
+
* event still fires with the lazy payload. split/merge/reclassify items carry
|
|
6527
|
+
* no material/batch — those stay null.
|
|
6528
|
+
*/
|
|
6529
|
+
async loadItemFields(event, itemId) {
|
|
6530
|
+
try {
|
|
6531
|
+
const itemRelation = event.metadata.relations.find((relation) => relation.propertyName === 'item');
|
|
6532
|
+
if (!itemRelation) {
|
|
6533
|
+
return undefined;
|
|
6534
|
+
}
|
|
6535
|
+
const item = await event.manager
|
|
6536
|
+
.getRepository(itemRelation.inverseEntityMetadata.target)
|
|
6537
|
+
.findOne({ where: { id: itemId } });
|
|
6538
|
+
if (!item) {
|
|
6539
|
+
return undefined;
|
|
6540
|
+
}
|
|
6541
|
+
return {
|
|
6542
|
+
materialId: item.materialId ?? null,
|
|
6543
|
+
batchId: item.batchId ?? null,
|
|
6544
|
+
locationId: item.locationId ?? null,
|
|
6545
|
+
loaderId: item.loaderId ?? null,
|
|
6546
|
+
};
|
|
6547
|
+
}
|
|
6548
|
+
catch {
|
|
6549
|
+
// Enrichment is best-effort; never break the mutation over it.
|
|
6550
|
+
return undefined;
|
|
6551
|
+
}
|
|
6552
|
+
}
|
|
6553
|
+
};
|
|
6554
|
+
StockChangeSubscriber = tslib.__decorate([
|
|
6555
|
+
common.Injectable(),
|
|
6556
|
+
tslib.__param(0, typeorm$1.InjectDataSource()),
|
|
6557
|
+
tslib.__param(2, common.Optional()),
|
|
6558
|
+
tslib.__param(2, common.Inject(WMS_STOCK_ENRICH)),
|
|
6559
|
+
tslib.__metadata("design:paramtypes", [typeorm.DataSource,
|
|
6560
|
+
exports.WmsEventCollector, Object])
|
|
6561
|
+
], StockChangeSubscriber);
|
|
6562
|
+
|
|
6514
6563
|
var WmsModuleCoreModule_1;
|
|
6515
6564
|
const exportDependencies = [
|
|
6516
6565
|
exports.LoaderService,
|
|
@@ -6543,7 +6592,9 @@ exports.WmsModuleCoreModule = WmsModuleCoreModule_1 = class WmsModuleCoreModule
|
|
|
6543
6592
|
imports: [coreModule, ModelsModule],
|
|
6544
6593
|
providers: [
|
|
6545
6594
|
...exportDependencies,
|
|
6595
|
+
StockChangeSubscriber,
|
|
6546
6596
|
{ provide: WMS_CORE_MODULE_OPTIONS, useValue: coreOptions },
|
|
6597
|
+
{ provide: WMS_STOCK_ENRICH, useValue: !!coreOptions.enrichStockEvents },
|
|
6547
6598
|
],
|
|
6548
6599
|
exports: [
|
|
6549
6600
|
...exportDependencies,
|
|
@@ -6554,13 +6605,14 @@ exports.WmsModuleCoreModule = WmsModuleCoreModule_1 = class WmsModuleCoreModule
|
|
|
6554
6605
|
};
|
|
6555
6606
|
}
|
|
6556
6607
|
static forRootAsync(options) {
|
|
6557
|
-
const { defaultLoaderSerialId, defaultLoaderTypeKey, defaultLocationKey, ...baseOptions } = options;
|
|
6608
|
+
const { defaultLoaderSerialId, defaultLoaderTypeKey, defaultLocationKey, enrichStockEvents, ...baseOptions } = options;
|
|
6558
6609
|
const coreModule = wmsBaseNestjsModule.WMSBaseModule.forRootAsync(baseOptions);
|
|
6559
6610
|
return {
|
|
6560
6611
|
module: WmsModuleCoreModule_1,
|
|
6561
6612
|
imports: [coreModule, ModelsModule],
|
|
6562
6613
|
providers: [
|
|
6563
6614
|
...exportDependencies,
|
|
6615
|
+
StockChangeSubscriber,
|
|
6564
6616
|
{
|
|
6565
6617
|
provide: WMS_CORE_MODULE_OPTIONS,
|
|
6566
6618
|
useValue: {
|
|
@@ -6569,6 +6621,7 @@ exports.WmsModuleCoreModule = WmsModuleCoreModule_1 = class WmsModuleCoreModule
|
|
|
6569
6621
|
defaultLocationKey,
|
|
6570
6622
|
},
|
|
6571
6623
|
},
|
|
6624
|
+
{ provide: WMS_STOCK_ENRICH, useValue: !!enrichStockEvents },
|
|
6572
6625
|
],
|
|
6573
6626
|
exports: [
|
|
6574
6627
|
...exportDependencies,
|
|
@@ -6585,11 +6638,6 @@ exports.WmsModuleCoreModule = WmsModuleCoreModule_1 = tslib.__decorate([
|
|
|
6585
6638
|
})
|
|
6586
6639
|
], exports.WmsModuleCoreModule);
|
|
6587
6640
|
|
|
6588
|
-
/** DI token holding the resolved {@link WmsEventModuleOptions}. */
|
|
6589
|
-
const WMS_EVENT_OPTIONS = Symbol('WMS_EVENT_OPTIONS');
|
|
6590
|
-
/** DI token for an optional external emitter bridge (e.g. @nestjs/event-emitter). */
|
|
6591
|
-
const WMS_EVENT_EMITTER_BRIDGE = Symbol('WMS_EVENT_EMITTER_BRIDGE');
|
|
6592
|
-
|
|
6593
6641
|
var WmsEventDispatcher_1;
|
|
6594
6642
|
/**
|
|
6595
6643
|
* Central event dispatcher. Runs consumer before-hooks (which may veto) and,
|
|
@@ -6696,9 +6744,11 @@ exports.TransferVendorOrderChangeEntity = TransferVendorOrderChangeEntity;
|
|
|
6696
6744
|
exports.TransferVendorOrderEntity = TransferVendorOrderEntity;
|
|
6697
6745
|
exports.TransferVendorOrderItemEntity = TransferVendorOrderItemEntity;
|
|
6698
6746
|
exports.UnitEntity = UnitEntity;
|
|
6747
|
+
exports.WMS_ACTOR_EXTRACTOR = WMS_ACTOR_EXTRACTOR;
|
|
6699
6748
|
exports.WMS_CORE_MODULE_OPTIONS = WMS_CORE_MODULE_OPTIONS;
|
|
6700
6749
|
exports.WMS_EVENT_EMITTER_BRIDGE = WMS_EVENT_EMITTER_BRIDGE;
|
|
6701
6750
|
exports.WMS_EVENT_OPTIONS = WMS_EVENT_OPTIONS;
|
|
6751
|
+
exports.WMS_STOCK_ENRICH = WMS_STOCK_ENRICH;
|
|
6702
6752
|
exports.WarehouseMapEntity = WarehouseMapEntity;
|
|
6703
6753
|
exports.collectToScope = collectToScope;
|
|
6704
6754
|
exports.runInDispatchScope = runInDispatchScope;
|