@things-factory/warehouse-base 5.0.2 → 5.0.12
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/dist-server/constants/index.js +6 -19
- package/dist-server/constants/index.js.map +1 -1
- package/dist-server/constants/inventory.js.map +1 -1
- package/dist-server/constants/location.js.map +1 -1
- package/dist-server/constants/pallet.js.map +1 -1
- package/dist-server/constants/rule-type.js.map +1 -1
- package/dist-server/constants/tote.js.map +1 -1
- package/dist-server/controllers/ecommerce/ecommerce-controller.js.map +1 -1
- package/dist-server/controllers/ecommerce/index.js +3 -16
- package/dist-server/controllers/ecommerce/index.js.map +1 -1
- package/dist-server/controllers/ecommerce/sellercraft-controller.js.map +1 -1
- package/dist-server/controllers/index.js +3 -16
- package/dist-server/controllers/index.js.map +1 -1
- package/dist-server/controllers/warehouse-controller.js.map +1 -1
- package/dist-server/index.js +6 -19
- package/dist-server/index.js.map +1 -1
- package/dist-server/middlewares/index.js.map +1 -1
- package/dist-server/migrations/index.js.map +1 -1
- package/dist-server/service/index.js +28 -41
- package/dist-server/service/index.js.map +1 -1
- package/dist-server/service/inventory/index.js.map +1 -1
- package/dist-server/service/inventory/inventory-mutation.js +50 -61
- package/dist-server/service/inventory/inventory-mutation.js.map +1 -1
- package/dist-server/service/inventory/inventory-query.js +125 -136
- package/dist-server/service/inventory/inventory-query.js.map +1 -1
- package/dist-server/service/inventory/inventory-types.js +198 -206
- package/dist-server/service/inventory/inventory-types.js.map +1 -1
- package/dist-server/service/inventory/inventory.js +133 -141
- package/dist-server/service/inventory/inventory.js.map +1 -1
- package/dist-server/service/inventory-change/index.js.map +1 -1
- package/dist-server/service/inventory-change/inventory-change-mutation.js +51 -62
- package/dist-server/service/inventory-change/inventory-change-mutation.js.map +1 -1
- package/dist-server/service/inventory-change/inventory-change-query.js +29 -40
- package/dist-server/service/inventory-change/inventory-change-query.js.map +1 -1
- package/dist-server/service/inventory-change/inventory-change-types.js +20 -28
- package/dist-server/service/inventory-change/inventory-change-types.js.map +1 -1
- package/dist-server/service/inventory-change/inventory-change.js +68 -76
- package/dist-server/service/inventory-change/inventory-change.js.map +1 -1
- package/dist-server/service/inventory-history/index.js.map +1 -1
- package/dist-server/service/inventory-history/inventory-history-mutation.js +33 -44
- package/dist-server/service/inventory-history/inventory-history-mutation.js.map +1 -1
- package/dist-server/service/inventory-history/inventory-history-query.js +105 -116
- package/dist-server/service/inventory-history/inventory-history-query.js.map +1 -1
- package/dist-server/service/inventory-history/inventory-history-types.js +282 -290
- package/dist-server/service/inventory-history/inventory-history-types.js.map +1 -1
- package/dist-server/service/inventory-history/inventory-history.js +82 -90
- package/dist-server/service/inventory-history/inventory-history.js.map +1 -1
- package/dist-server/service/inventory-item/index.js.map +1 -1
- package/dist-server/service/inventory-item/inventory-item-mutation.js +47 -58
- package/dist-server/service/inventory-item/inventory-item-mutation.js.map +1 -1
- package/dist-server/service/inventory-item/inventory-item-query.js +41 -52
- package/dist-server/service/inventory-item/inventory-item-query.js.map +1 -1
- package/dist-server/service/inventory-item/inventory-item-type.js +44 -52
- package/dist-server/service/inventory-item/inventory-item-type.js.map +1 -1
- package/dist-server/service/inventory-item/inventory-item.js +44 -52
- package/dist-server/service/inventory-item/inventory-item.js.map +1 -1
- package/dist-server/service/inventory-item-change/index.js.map +1 -1
- package/dist-server/service/inventory-item-change/inventory-item-change-mutation.js +33 -44
- package/dist-server/service/inventory-item-change/inventory-item-change-mutation.js.map +1 -1
- package/dist-server/service/inventory-item-change/inventory-item-change-query.js +29 -40
- package/dist-server/service/inventory-item-change/inventory-item-change-query.js.map +1 -1
- package/dist-server/service/inventory-item-change/inventory-item-change-type.js +40 -48
- package/dist-server/service/inventory-item-change/inventory-item-change-type.js.map +1 -1
- package/dist-server/service/inventory-item-change/inventory-item-change.js +34 -42
- package/dist-server/service/inventory-item-change/inventory-item-change.js.map +1 -1
- package/dist-server/service/inventory-product/index.js.map +1 -1
- package/dist-server/service/inventory-product/inventory-product-mutation.js +33 -44
- package/dist-server/service/inventory-product/inventory-product-mutation.js.map +1 -1
- package/dist-server/service/inventory-product/inventory-product-query.js +29 -40
- package/dist-server/service/inventory-product/inventory-product-query.js.map +1 -1
- package/dist-server/service/inventory-product/inventory-product-type.js +34 -42
- package/dist-server/service/inventory-product/inventory-product-type.js.map +1 -1
- package/dist-server/service/inventory-product/inventory-product.js +34 -42
- package/dist-server/service/inventory-product/inventory-product.js.map +1 -1
- package/dist-server/service/location/index.js.map +1 -1
- package/dist-server/service/location/location-mutation.js +39 -50
- package/dist-server/service/location/location-mutation.js.map +1 -1
- package/dist-server/service/location/location-query.js +65 -76
- package/dist-server/service/location/location-query.js.map +1 -1
- package/dist-server/service/location/location-types.js +105 -113
- package/dist-server/service/location/location-types.js.map +1 -1
- package/dist-server/service/location/location.js +41 -49
- package/dist-server/service/location/location.js.map +1 -1
- package/dist-server/service/movement/index.js.map +1 -1
- package/dist-server/service/movement/movement-mutation.js +21 -32
- package/dist-server/service/movement/movement-mutation.js.map +1 -1
- package/dist-server/service/movement/movement-query.js +51 -65
- package/dist-server/service/movement/movement-query.js.map +1 -1
- package/dist-server/service/movement/movement-types.js +43 -51
- package/dist-server/service/movement/movement-types.js.map +1 -1
- package/dist-server/service/movement/movement.js +30 -38
- package/dist-server/service/movement/movement.js.map +1 -1
- package/dist-server/service/pallet/index.js.map +1 -1
- package/dist-server/service/pallet/pallet-mutation.js +39 -50
- package/dist-server/service/pallet/pallet-mutation.js.map +1 -1
- package/dist-server/service/pallet/pallet-query.js +48 -59
- package/dist-server/service/pallet/pallet-query.js.map +1 -1
- package/dist-server/service/pallet/pallet-types.js +39 -47
- package/dist-server/service/pallet/pallet-types.js.map +1 -1
- package/dist-server/service/pallet/pallet.js +34 -42
- package/dist-server/service/pallet/pallet.js.map +1 -1
- package/dist-server/service/pallet-count/index.js.map +1 -1
- package/dist-server/service/pallet-count/pallet-count-mutation.js +39 -50
- package/dist-server/service/pallet-count/pallet-count-mutation.js.map +1 -1
- package/dist-server/service/pallet-count/pallet-count-query.js +28 -39
- package/dist-server/service/pallet-count/pallet-count-query.js.map +1 -1
- package/dist-server/service/pallet-count/pallet-count-types.js +20 -28
- package/dist-server/service/pallet-count/pallet-count-types.js.map +1 -1
- package/dist-server/service/pallet-count/pallet-count.js +26 -34
- package/dist-server/service/pallet-count/pallet-count.js.map +1 -1
- package/dist-server/service/pallet-history/index.js.map +1 -1
- package/dist-server/service/pallet-history/pallet-history-mutation.js +33 -44
- package/dist-server/service/pallet-history/pallet-history-mutation.js.map +1 -1
- package/dist-server/service/pallet-history/pallet-history-query.js +29 -40
- package/dist-server/service/pallet-history/pallet-history-query.js.map +1 -1
- package/dist-server/service/pallet-history/pallet-history-types.js +20 -28
- package/dist-server/service/pallet-history/pallet-history-types.js.map +1 -1
- package/dist-server/service/pallet-history/pallet-history.js +34 -42
- package/dist-server/service/pallet-history/pallet-history.js.map +1 -1
- package/dist-server/service/reduced-inventory-history/index.js.map +1 -1
- package/dist-server/service/reduced-inventory-history/reduced-inventory-history.js +52 -60
- package/dist-server/service/reduced-inventory-history/reduced-inventory-history.js.map +1 -1
- package/dist-server/service/tote/index.js.map +1 -1
- package/dist-server/service/tote/tote-mutation.js +46 -57
- package/dist-server/service/tote/tote-mutation.js.map +1 -1
- package/dist-server/service/tote/tote-query.js +44 -55
- package/dist-server/service/tote/tote-query.js.map +1 -1
- package/dist-server/service/tote/tote-types.js +24 -32
- package/dist-server/service/tote/tote-types.js.map +1 -1
- package/dist-server/service/tote/tote.js +30 -38
- package/dist-server/service/tote/tote.js.map +1 -1
- package/dist-server/service/warehouse/index.js.map +1 -1
- package/dist-server/service/warehouse/warehouse-mutation.js +33 -44
- package/dist-server/service/warehouse/warehouse-mutation.js.map +1 -1
- package/dist-server/service/warehouse/warehouse-query.js +29 -40
- package/dist-server/service/warehouse/warehouse-query.js.map +1 -1
- package/dist-server/service/warehouse/warehouse-types.js +28 -36
- package/dist-server/service/warehouse/warehouse-types.js.map +1 -1
- package/dist-server/service/warehouse/warehouse.js +31 -39
- package/dist-server/service/warehouse/warehouse.js.map +1 -1
- package/dist-server/tsconfig.tsbuildinfo +1 -0
- package/dist-server/utils/datetime-util.js.map +1 -1
- package/dist-server/utils/index.js +4 -17
- package/dist-server/utils/index.js.map +1 -1
- package/dist-server/utils/inventory-no-generator.js.map +1 -1
- package/dist-server/utils/inventory-util.js.map +1 -1
- package/package.json +8 -8
- package/server/service/inventory/inventory-mutation.ts +2 -2
- package/server/service/inventory/inventory-query.ts +48 -16
- package/server/service/inventory/inventory.ts +6 -5
- package/server/service/inventory-change/inventory-change-mutation.ts +1 -1
- package/server/service/inventory-change/inventory-change-query.ts +2 -2
- package/server/service/inventory-history/inventory-history-query.ts +29 -28
- package/server/service/inventory-history/inventory-history.ts +39 -39
- package/server/service/inventory-item/inventory-item-mutation.ts +3 -3
- package/server/service/movement/movement-query.ts +3 -6
|
@@ -1,19 +1,8 @@
|
|
|
1
1
|
"use strict";
|
|
2
|
-
var __decorate = (this && this.__decorate) || function (decorators, target, key, desc) {
|
|
3
|
-
var c = arguments.length, r = c < 3 ? target : desc === null ? desc = Object.getOwnPropertyDescriptor(target, key) : desc, d;
|
|
4
|
-
if (typeof Reflect === "object" && typeof Reflect.decorate === "function") r = Reflect.decorate(decorators, target, key, desc);
|
|
5
|
-
else for (var i = decorators.length - 1; i >= 0; i--) if (d = decorators[i]) r = (c < 3 ? d(r) : c > 3 ? d(target, key, r) : d(target, key)) || r;
|
|
6
|
-
return c > 3 && r && Object.defineProperty(target, key, r), r;
|
|
7
|
-
};
|
|
8
|
-
var __metadata = (this && this.__metadata) || function (k, v) {
|
|
9
|
-
if (typeof Reflect === "object" && typeof Reflect.metadata === "function") return Reflect.metadata(k, v);
|
|
10
|
-
};
|
|
11
|
-
var __param = (this && this.__param) || function (paramIndex, decorator) {
|
|
12
|
-
return function (target, key) { decorator(target, key, paramIndex); }
|
|
13
|
-
};
|
|
14
2
|
var _a;
|
|
15
3
|
Object.defineProperty(exports, "__esModule", { value: true });
|
|
16
4
|
exports.WarehouseQuery = void 0;
|
|
5
|
+
const tslib_1 = require("tslib");
|
|
17
6
|
const type_graphql_1 = require("type-graphql");
|
|
18
7
|
const typeorm_1 = require("typeorm");
|
|
19
8
|
const auth_base_1 = require("@things-factory/auth-base");
|
|
@@ -50,44 +39,44 @@ let WarehouseQuery = class WarehouseQuery {
|
|
|
50
39
|
return await (0, typeorm_1.getRepository)(auth_base_1.User).findOne(warehouse.creatorId);
|
|
51
40
|
}
|
|
52
41
|
};
|
|
53
|
-
__decorate([
|
|
42
|
+
tslib_1.__decorate([
|
|
54
43
|
(0, type_graphql_1.Query)(returns => warehouse_1.Warehouse),
|
|
55
|
-
__param(0, (0, type_graphql_1.Arg)('id')),
|
|
56
|
-
__param(1, (0, type_graphql_1.Ctx)()),
|
|
57
|
-
__metadata("design:type", Function),
|
|
58
|
-
__metadata("design:paramtypes", [String, Object]),
|
|
59
|
-
__metadata("design:returntype", Promise)
|
|
44
|
+
tslib_1.__param(0, (0, type_graphql_1.Arg)('id')),
|
|
45
|
+
tslib_1.__param(1, (0, type_graphql_1.Ctx)()),
|
|
46
|
+
tslib_1.__metadata("design:type", Function),
|
|
47
|
+
tslib_1.__metadata("design:paramtypes", [String, Object]),
|
|
48
|
+
tslib_1.__metadata("design:returntype", Promise)
|
|
60
49
|
], WarehouseQuery.prototype, "warehouse", null);
|
|
61
|
-
__decorate([
|
|
50
|
+
tslib_1.__decorate([
|
|
62
51
|
(0, type_graphql_1.Query)(returns => warehouse_types_1.WarehouseList),
|
|
63
|
-
__param(0, (0, type_graphql_1.Args)()),
|
|
64
|
-
__param(1, (0, type_graphql_1.Ctx)()),
|
|
65
|
-
__metadata("design:type", Function),
|
|
66
|
-
__metadata("design:paramtypes", [typeof (_a = typeof shell_1.ListParam !== "undefined" && shell_1.ListParam) === "function" ? _a : Object, Object]),
|
|
67
|
-
__metadata("design:returntype", Promise)
|
|
52
|
+
tslib_1.__param(0, (0, type_graphql_1.Args)()),
|
|
53
|
+
tslib_1.__param(1, (0, type_graphql_1.Ctx)()),
|
|
54
|
+
tslib_1.__metadata("design:type", Function),
|
|
55
|
+
tslib_1.__metadata("design:paramtypes", [typeof (_a = typeof shell_1.ListParam !== "undefined" && shell_1.ListParam) === "function" ? _a : Object, Object]),
|
|
56
|
+
tslib_1.__metadata("design:returntype", Promise)
|
|
68
57
|
], WarehouseQuery.prototype, "warehouses", null);
|
|
69
|
-
__decorate([
|
|
58
|
+
tslib_1.__decorate([
|
|
70
59
|
(0, type_graphql_1.FieldResolver)(type => shell_1.Domain),
|
|
71
|
-
__param(0, (0, type_graphql_1.Root)()),
|
|
72
|
-
__metadata("design:type", Function),
|
|
73
|
-
__metadata("design:paramtypes", [warehouse_1.Warehouse]),
|
|
74
|
-
__metadata("design:returntype", Promise)
|
|
60
|
+
tslib_1.__param(0, (0, type_graphql_1.Root)()),
|
|
61
|
+
tslib_1.__metadata("design:type", Function),
|
|
62
|
+
tslib_1.__metadata("design:paramtypes", [warehouse_1.Warehouse]),
|
|
63
|
+
tslib_1.__metadata("design:returntype", Promise)
|
|
75
64
|
], WarehouseQuery.prototype, "domain", null);
|
|
76
|
-
__decorate([
|
|
65
|
+
tslib_1.__decorate([
|
|
77
66
|
(0, type_graphql_1.FieldResolver)(type => auth_base_1.User),
|
|
78
|
-
__param(0, (0, type_graphql_1.Root)()),
|
|
79
|
-
__metadata("design:type", Function),
|
|
80
|
-
__metadata("design:paramtypes", [warehouse_1.Warehouse]),
|
|
81
|
-
__metadata("design:returntype", Promise)
|
|
67
|
+
tslib_1.__param(0, (0, type_graphql_1.Root)()),
|
|
68
|
+
tslib_1.__metadata("design:type", Function),
|
|
69
|
+
tslib_1.__metadata("design:paramtypes", [warehouse_1.Warehouse]),
|
|
70
|
+
tslib_1.__metadata("design:returntype", Promise)
|
|
82
71
|
], WarehouseQuery.prototype, "updater", null);
|
|
83
|
-
__decorate([
|
|
72
|
+
tslib_1.__decorate([
|
|
84
73
|
(0, type_graphql_1.FieldResolver)(type => auth_base_1.User),
|
|
85
|
-
__param(0, (0, type_graphql_1.Root)()),
|
|
86
|
-
__metadata("design:type", Function),
|
|
87
|
-
__metadata("design:paramtypes", [warehouse_1.Warehouse]),
|
|
88
|
-
__metadata("design:returntype", Promise)
|
|
74
|
+
tslib_1.__param(0, (0, type_graphql_1.Root)()),
|
|
75
|
+
tslib_1.__metadata("design:type", Function),
|
|
76
|
+
tslib_1.__metadata("design:paramtypes", [warehouse_1.Warehouse]),
|
|
77
|
+
tslib_1.__metadata("design:returntype", Promise)
|
|
89
78
|
], WarehouseQuery.prototype, "creator", null);
|
|
90
|
-
WarehouseQuery = __decorate([
|
|
79
|
+
WarehouseQuery = tslib_1.__decorate([
|
|
91
80
|
(0, type_graphql_1.Resolver)(warehouse_1.Warehouse)
|
|
92
81
|
], WarehouseQuery);
|
|
93
82
|
exports.WarehouseQuery = WarehouseQuery;
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"warehouse-query.js","sourceRoot":"","sources":["../../../server/service/warehouse/warehouse-query.ts"],"names":[],"mappings":"
|
|
1
|
+
{"version":3,"file":"warehouse-query.js","sourceRoot":"","sources":["../../../server/service/warehouse/warehouse-query.ts"],"names":[],"mappings":";;;;;AAAA,+CAAmF;AACnF,qCAAuC;AAEvC,yDAAgD;AAChD,iDAA4E;AAE5E,2CAAuC;AACvC,uDAAiD;AAGjD,IAAa,cAAc,GAA3B,MAAa,cAAc;IAEzB,KAAK,CAAC,SAAS,CAAY,EAAU,EAAS,OAAY;QACxD,MAAM,EAAE,MAAM,EAAE,GAAuB,OAAO,CAAC,KAAK,CAAA;QAEpD,OAAO,MAAM,IAAA,uBAAa,EAAC,qBAAS,CAAC,CAAC,OAAO,CAAC;YAC5C,KAAK,EAAE;gBACL,MAAM,EAAE,MAAM;gBACd,IAAI;aACL;YACD,SAAS,EAAE,CAAC,QAAQ,EAAE,WAAW,EAAE,SAAS,EAAE,SAAS,CAAC;SACzD,CAAC,CAAA;IACJ,CAAC;IAGD,KAAK,CAAC,UAAU,CAAS,MAAiB,EAAS,OAAY;QAC7D,MAAM,EAAE,MAAM,EAAE,GAAuB,OAAO,CAAC,KAAK,CAAA;QAEpD,MAAM,eAAe,GAAG,IAAA,yBAAiB,EAAC,MAAM,EAAE;YAChD,MAAM,EAAE,MAAM,CAAC,EAAE;YACjB,WAAW,EAAE,CAAC,MAAM,EAAE,aAAa,CAAC;SACrC,CAAC,CAAA;QACF,MAAM,CAAC,KAAK,EAAE,KAAK,CAAC,GAAG,MAAM,IAAA,uBAAa,EAAC,qBAAS,CAAC,CAAC,YAAY,iCAC7D,eAAe,KAClB,SAAS,EAAE,CAAC,QAAQ,EAAE,SAAS,EAAE,SAAS,CAAC,IAC3C,CAAA;QACF,OAAO,EAAE,KAAK,EAAE,KAAK,EAAE,CAAA;IACzB,CAAC;IAGD,KAAK,CAAC,MAAM,CAAS,SAAoB;QACvC,OAAO,MAAM,IAAA,uBAAa,EAAC,cAAM,CAAC,CAAC,OAAO,CAAC,SAAS,CAAC,QAAQ,CAAC,CAAA;IAChE,CAAC;IAGD,KAAK,CAAC,OAAO,CAAS,SAAoB;QACxC,OAAO,MAAM,IAAA,uBAAa,EAAC,gBAAI,CAAC,CAAC,OAAO,CAAC,SAAS,CAAC,SAAS,CAAC,CAAA;IAC/D,CAAC;IAGD,KAAK,CAAC,OAAO,CAAS,SAAoB;QACxC,OAAO,MAAM,IAAA,uBAAa,EAAC,gBAAI,CAAC,CAAC,OAAO,CAAC,SAAS,CAAC,SAAS,CAAC,CAAA;IAC/D,CAAC;CACF,CAAA;AAzCC;IADC,IAAA,oBAAK,EAAC,OAAO,CAAC,EAAE,CAAC,qBAAS,CAAC;IACX,mBAAA,IAAA,kBAAG,EAAC,IAAI,CAAC,CAAA;IAAc,mBAAA,IAAA,kBAAG,GAAE,CAAA;;;;+CAU5C;AAGD;IADC,IAAA,oBAAK,EAAC,OAAO,CAAC,EAAE,CAAC,+BAAa,CAAC;IACd,mBAAA,IAAA,mBAAI,GAAE,CAAA;IAAqB,mBAAA,IAAA,kBAAG,GAAE,CAAA;;iEAAjB,iBAAS,oBAAT,iBAAS;;gDAYzC;AAGD;IADC,IAAA,4BAAa,EAAC,IAAI,CAAC,EAAE,CAAC,cAAM,CAAC;IAChB,mBAAA,IAAA,mBAAI,GAAE,CAAA;;6CAAY,qBAAS;;4CAExC;AAGD;IADC,IAAA,4BAAa,EAAC,IAAI,CAAC,EAAE,CAAC,gBAAI,CAAC;IACb,mBAAA,IAAA,mBAAI,GAAE,CAAA;;6CAAY,qBAAS;;6CAEzC;AAGD;IADC,IAAA,4BAAa,EAAC,IAAI,CAAC,EAAE,CAAC,gBAAI,CAAC;IACb,mBAAA,IAAA,mBAAI,GAAE,CAAA;;6CAAY,qBAAS;;6CAEzC;AA1CU,cAAc;IAD1B,IAAA,uBAAQ,EAAC,qBAAS,CAAC;GACP,cAAc,CA2C1B;AA3CY,wCAAc","sourcesContent":["import { Arg, Args, Ctx, FieldResolver, Query, Resolver, Root } from 'type-graphql'\nimport { getRepository } from 'typeorm'\n\nimport { User } from '@things-factory/auth-base'\nimport { convertListParams, Domain, ListParam } from '@things-factory/shell'\n\nimport { Warehouse } from './warehouse'\nimport { WarehouseList } from './warehouse-types'\n\n@Resolver(Warehouse)\nexport class WarehouseQuery {\n @Query(returns => Warehouse)\n async warehouse(@Arg('id') id: string, @Ctx() context: any): Promise<Warehouse> {\n const { domain }: { domain: Domain } = context.state\n\n return await getRepository(Warehouse).findOne({\n where: {\n domain: domain,\n name\n },\n relations: ['domain', 'locations', 'creator', 'updater']\n })\n }\n\n @Query(returns => WarehouseList)\n async warehouses(@Args() params: ListParam, @Ctx() context: any): Promise<WarehouseList> {\n const { domain }: { domain: Domain } = context.state\n\n const convertedParams = convertListParams(params, {\n domain: domain.id,\n searchables: ['name', 'description']\n })\n const [items, total] = await getRepository(Warehouse).findAndCount({\n ...convertedParams,\n relations: ['domain', 'creator', 'updater']\n })\n return { items, total }\n }\n\n @FieldResolver(type => Domain)\n async domain(@Root() warehouse: Warehouse) {\n return await getRepository(Domain).findOne(warehouse.domainId)\n }\n\n @FieldResolver(type => User)\n async updater(@Root() warehouse: Warehouse) {\n return await getRepository(User).findOne(warehouse.updaterId)\n }\n\n @FieldResolver(type => User)\n async creator(@Root() warehouse: Warehouse) {\n return await getRepository(User).findOne(warehouse.creatorId)\n }\n}\n"]}
|
|
@@ -1,81 +1,73 @@
|
|
|
1
1
|
"use strict";
|
|
2
|
-
var __decorate = (this && this.__decorate) || function (decorators, target, key, desc) {
|
|
3
|
-
var c = arguments.length, r = c < 3 ? target : desc === null ? desc = Object.getOwnPropertyDescriptor(target, key) : desc, d;
|
|
4
|
-
if (typeof Reflect === "object" && typeof Reflect.decorate === "function") r = Reflect.decorate(decorators, target, key, desc);
|
|
5
|
-
else for (var i = decorators.length - 1; i >= 0; i--) if (d = decorators[i]) r = (c < 3 ? d(r) : c > 3 ? d(target, key, r) : d(target, key)) || r;
|
|
6
|
-
return c > 3 && r && Object.defineProperty(target, key, r), r;
|
|
7
|
-
};
|
|
8
|
-
var __metadata = (this && this.__metadata) || function (k, v) {
|
|
9
|
-
if (typeof Reflect === "object" && typeof Reflect.metadata === "function") return Reflect.metadata(k, v);
|
|
10
|
-
};
|
|
11
2
|
Object.defineProperty(exports, "__esModule", { value: true });
|
|
12
3
|
exports.WarehousePatch = exports.WarehouseList = exports.NewWarehouse = void 0;
|
|
4
|
+
const tslib_1 = require("tslib");
|
|
13
5
|
const type_graphql_1 = require("type-graphql");
|
|
14
6
|
const shell_1 = require("@things-factory/shell");
|
|
15
7
|
const warehouse_1 = require("./warehouse");
|
|
16
8
|
let NewWarehouse = class NewWarehouse {
|
|
17
9
|
};
|
|
18
|
-
__decorate([
|
|
10
|
+
tslib_1.__decorate([
|
|
19
11
|
(0, type_graphql_1.Field)({ nullable: true }),
|
|
20
|
-
__metadata("design:type", String)
|
|
12
|
+
tslib_1.__metadata("design:type", String)
|
|
21
13
|
], NewWarehouse.prototype, "id", void 0);
|
|
22
|
-
__decorate([
|
|
14
|
+
tslib_1.__decorate([
|
|
23
15
|
(0, type_graphql_1.Field)(),
|
|
24
|
-
__metadata("design:type", String)
|
|
16
|
+
tslib_1.__metadata("design:type", String)
|
|
25
17
|
], NewWarehouse.prototype, "name", void 0);
|
|
26
|
-
__decorate([
|
|
18
|
+
tslib_1.__decorate([
|
|
27
19
|
(0, type_graphql_1.Field)(type => [shell_1.ObjectRef], { nullable: true }),
|
|
28
|
-
__metadata("design:type", Array)
|
|
20
|
+
tslib_1.__metadata("design:type", Array)
|
|
29
21
|
], NewWarehouse.prototype, "locations", void 0);
|
|
30
|
-
__decorate([
|
|
22
|
+
tslib_1.__decorate([
|
|
31
23
|
(0, type_graphql_1.Field)({ nullable: true }),
|
|
32
|
-
__metadata("design:type", String)
|
|
24
|
+
tslib_1.__metadata("design:type", String)
|
|
33
25
|
], NewWarehouse.prototype, "description", void 0);
|
|
34
|
-
NewWarehouse = __decorate([
|
|
26
|
+
NewWarehouse = tslib_1.__decorate([
|
|
35
27
|
(0, type_graphql_1.InputType)()
|
|
36
28
|
], NewWarehouse);
|
|
37
29
|
exports.NewWarehouse = NewWarehouse;
|
|
38
30
|
let WarehouseList = class WarehouseList {
|
|
39
31
|
};
|
|
40
|
-
__decorate([
|
|
32
|
+
tslib_1.__decorate([
|
|
41
33
|
(0, type_graphql_1.Field)(type => [warehouse_1.Warehouse], { nullable: true }),
|
|
42
|
-
__metadata("design:type", Array)
|
|
34
|
+
tslib_1.__metadata("design:type", Array)
|
|
43
35
|
], WarehouseList.prototype, "items", void 0);
|
|
44
|
-
__decorate([
|
|
36
|
+
tslib_1.__decorate([
|
|
45
37
|
(0, type_graphql_1.Field)(type => type_graphql_1.Int, { nullable: true }),
|
|
46
|
-
__metadata("design:type", Number)
|
|
38
|
+
tslib_1.__metadata("design:type", Number)
|
|
47
39
|
], WarehouseList.prototype, "total", void 0);
|
|
48
|
-
WarehouseList = __decorate([
|
|
40
|
+
WarehouseList = tslib_1.__decorate([
|
|
49
41
|
(0, type_graphql_1.ObjectType)()
|
|
50
42
|
], WarehouseList);
|
|
51
43
|
exports.WarehouseList = WarehouseList;
|
|
52
44
|
let WarehousePatch = class WarehousePatch {
|
|
53
45
|
};
|
|
54
|
-
__decorate([
|
|
46
|
+
tslib_1.__decorate([
|
|
55
47
|
(0, type_graphql_1.Field)({ nullable: true }),
|
|
56
|
-
__metadata("design:type", String)
|
|
48
|
+
tslib_1.__metadata("design:type", String)
|
|
57
49
|
], WarehousePatch.prototype, "id", void 0);
|
|
58
|
-
__decorate([
|
|
50
|
+
tslib_1.__decorate([
|
|
59
51
|
(0, type_graphql_1.Field)({ nullable: true }),
|
|
60
|
-
__metadata("design:type", String)
|
|
52
|
+
tslib_1.__metadata("design:type", String)
|
|
61
53
|
], WarehousePatch.prototype, "name", void 0);
|
|
62
|
-
__decorate([
|
|
54
|
+
tslib_1.__decorate([
|
|
63
55
|
(0, type_graphql_1.Field)({ nullable: true }),
|
|
64
|
-
__metadata("design:type", String)
|
|
56
|
+
tslib_1.__metadata("design:type", String)
|
|
65
57
|
], WarehousePatch.prototype, "type", void 0);
|
|
66
|
-
__decorate([
|
|
58
|
+
tslib_1.__decorate([
|
|
67
59
|
(0, type_graphql_1.Field)(type => [shell_1.ObjectRef], { nullable: true }),
|
|
68
|
-
__metadata("design:type", Array)
|
|
60
|
+
tslib_1.__metadata("design:type", Array)
|
|
69
61
|
], WarehousePatch.prototype, "locations", void 0);
|
|
70
|
-
__decorate([
|
|
62
|
+
tslib_1.__decorate([
|
|
71
63
|
(0, type_graphql_1.Field)({ nullable: true }),
|
|
72
|
-
__metadata("design:type", String)
|
|
64
|
+
tslib_1.__metadata("design:type", String)
|
|
73
65
|
], WarehousePatch.prototype, "description", void 0);
|
|
74
|
-
__decorate([
|
|
66
|
+
tslib_1.__decorate([
|
|
75
67
|
(0, type_graphql_1.Field)({ nullable: true }),
|
|
76
|
-
__metadata("design:type", String)
|
|
68
|
+
tslib_1.__metadata("design:type", String)
|
|
77
69
|
], WarehousePatch.prototype, "cuFlag", void 0);
|
|
78
|
-
WarehousePatch = __decorate([
|
|
70
|
+
WarehousePatch = tslib_1.__decorate([
|
|
79
71
|
(0, type_graphql_1.InputType)()
|
|
80
72
|
], WarehousePatch);
|
|
81
73
|
exports.WarehousePatch = WarehousePatch;
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"warehouse-types.js","sourceRoot":"","sources":["../../../server/service/warehouse/warehouse-types.ts"],"names":[],"mappings":"
|
|
1
|
+
{"version":3,"file":"warehouse-types.js","sourceRoot":"","sources":["../../../server/service/warehouse/warehouse-types.ts"],"names":[],"mappings":";;;;AAAA,+CAAgE;AAEhE,iDAAiD;AAEjD,2CAAuC;AAGvC,IAAa,YAAY,GAAzB,MAAa,YAAY;CAYxB,CAAA;AAVC;IADC,IAAA,oBAAK,EAAC,EAAE,QAAQ,EAAE,IAAI,EAAE,CAAC;;wCACf;AAGX;IADC,IAAA,oBAAK,GAAE;;0CACI;AAGZ;IADC,IAAA,oBAAK,EAAC,IAAI,CAAC,EAAE,CAAC,CAAC,iBAAS,CAAC,EAAE,EAAE,QAAQ,EAAE,IAAI,EAAE,CAAC;;+CACxB;AAGvB;IADC,IAAA,oBAAK,EAAC,EAAE,QAAQ,EAAE,IAAI,EAAE,CAAC;;iDACN;AAXT,YAAY;IADxB,IAAA,wBAAS,GAAE;GACC,YAAY,CAYxB;AAZY,oCAAY;AAezB,IAAa,aAAa,GAA1B,MAAa,aAAa;CAMzB,CAAA;AAJC;IADC,IAAA,oBAAK,EAAC,IAAI,CAAC,EAAE,CAAC,CAAC,qBAAS,CAAC,EAAE,EAAE,QAAQ,EAAE,IAAI,EAAE,CAAC;;4CAC5B;AAGnB;IADC,IAAA,oBAAK,EAAC,IAAI,CAAC,EAAE,CAAC,kBAAG,EAAE,EAAE,QAAQ,EAAE,IAAI,EAAE,CAAC;;4CACzB;AALH,aAAa;IADzB,IAAA,yBAAU,GAAE;GACA,aAAa,CAMzB;AANY,sCAAa;AAS1B,IAAa,cAAc,GAA3B,MAAa,cAAc;CAkB1B,CAAA;AAhBC;IADC,IAAA,oBAAK,EAAC,EAAE,QAAQ,EAAE,IAAI,EAAE,CAAC;;0CACf;AAGX;IADC,IAAA,oBAAK,EAAC,EAAE,QAAQ,EAAE,IAAI,EAAE,CAAC;;4CACb;AAGb;IADC,IAAA,oBAAK,EAAC,EAAE,QAAQ,EAAE,IAAI,EAAE,CAAC;;4CACb;AAGb;IADC,IAAA,oBAAK,EAAC,IAAI,CAAC,EAAE,CAAC,CAAC,iBAAS,CAAC,EAAE,EAAE,QAAQ,EAAE,IAAI,EAAE,CAAC;;iDACxB;AAGvB;IADC,IAAA,oBAAK,EAAC,EAAE,QAAQ,EAAE,IAAI,EAAE,CAAC;;mDACN;AAGpB;IADC,IAAA,oBAAK,EAAC,EAAE,QAAQ,EAAE,IAAI,EAAE,CAAC;;8CACX;AAjBJ,cAAc;IAD1B,IAAA,wBAAS,GAAE;GACC,cAAc,CAkB1B;AAlBY,wCAAc","sourcesContent":["import { Field, InputType, Int, ObjectType } from 'type-graphql'\n\nimport { ObjectRef } from '@things-factory/shell'\n\nimport { Warehouse } from './warehouse'\n\n@InputType()\nexport class NewWarehouse {\n @Field({ nullable: true })\n id?: string\n\n @Field()\n name: string\n\n @Field(type => [ObjectRef], { nullable: true })\n locations?: ObjectRef[]\n\n @Field({ nullable: true })\n description?: string\n}\n\n@ObjectType()\nexport class WarehouseList {\n @Field(type => [Warehouse], { nullable: true })\n items?: Warehouse[]\n\n @Field(type => Int, { nullable: true })\n total?: number\n}\n\n@InputType()\nexport class WarehousePatch {\n @Field({ nullable: true })\n id?: string\n\n @Field({ nullable: true })\n name?: string\n\n @Field({ nullable: true })\n type?: string\n\n @Field(type => [ObjectRef], { nullable: true })\n locations?: ObjectRef[]\n\n @Field({ nullable: true })\n description?: string\n\n @Field({ nullable: true })\n cuFlag?: string\n}\n"]}
|
|
@@ -1,16 +1,8 @@
|
|
|
1
1
|
"use strict";
|
|
2
|
-
var __decorate = (this && this.__decorate) || function (decorators, target, key, desc) {
|
|
3
|
-
var c = arguments.length, r = c < 3 ? target : desc === null ? desc = Object.getOwnPropertyDescriptor(target, key) : desc, d;
|
|
4
|
-
if (typeof Reflect === "object" && typeof Reflect.decorate === "function") r = Reflect.decorate(decorators, target, key, desc);
|
|
5
|
-
else for (var i = decorators.length - 1; i >= 0; i--) if (d = decorators[i]) r = (c < 3 ? d(r) : c > 3 ? d(target, key, r) : d(target, key)) || r;
|
|
6
|
-
return c > 3 && r && Object.defineProperty(target, key, r), r;
|
|
7
|
-
};
|
|
8
|
-
var __metadata = (this && this.__metadata) || function (k, v) {
|
|
9
|
-
if (typeof Reflect === "object" && typeof Reflect.metadata === "function") return Reflect.metadata(k, v);
|
|
10
|
-
};
|
|
11
2
|
var _a, _b, _c, _d;
|
|
12
3
|
Object.defineProperty(exports, "__esModule", { value: true });
|
|
13
4
|
exports.Warehouse = void 0;
|
|
5
|
+
const tslib_1 = require("tslib");
|
|
14
6
|
const type_graphql_1 = require("type-graphql");
|
|
15
7
|
const typeorm_1 = require("typeorm");
|
|
16
8
|
const auth_base_1 = require("@things-factory/auth-base");
|
|
@@ -30,85 +22,85 @@ let Warehouse = class Warehouse {
|
|
|
30
22
|
}
|
|
31
23
|
}
|
|
32
24
|
};
|
|
33
|
-
__decorate([
|
|
25
|
+
tslib_1.__decorate([
|
|
34
26
|
(0, typeorm_1.PrimaryGeneratedColumn)('uuid'),
|
|
35
27
|
(0, type_graphql_1.Field)(type => type_graphql_1.ID),
|
|
36
|
-
__metadata("design:type", String)
|
|
28
|
+
tslib_1.__metadata("design:type", String)
|
|
37
29
|
], Warehouse.prototype, "id", void 0);
|
|
38
|
-
__decorate([
|
|
30
|
+
tslib_1.__decorate([
|
|
39
31
|
(0, typeorm_1.ManyToOne)(type => shell_1.Domain),
|
|
40
32
|
(0, type_graphql_1.Field)(),
|
|
41
|
-
__metadata("design:type", typeof (_a = typeof shell_1.Domain !== "undefined" && shell_1.Domain) === "function" ? _a : Object)
|
|
33
|
+
tslib_1.__metadata("design:type", typeof (_a = typeof shell_1.Domain !== "undefined" && shell_1.Domain) === "function" ? _a : Object)
|
|
42
34
|
], Warehouse.prototype, "domain", void 0);
|
|
43
|
-
__decorate([
|
|
35
|
+
tslib_1.__decorate([
|
|
44
36
|
(0, typeorm_1.RelationId)((warehouse) => warehouse.domain),
|
|
45
|
-
__metadata("design:type", String)
|
|
37
|
+
tslib_1.__metadata("design:type", String)
|
|
46
38
|
], Warehouse.prototype, "domainId", void 0);
|
|
47
|
-
__decorate([
|
|
39
|
+
tslib_1.__decorate([
|
|
48
40
|
(0, typeorm_1.ManyToOne)(type => biz_base_1.Bizplace),
|
|
49
41
|
(0, type_graphql_1.Field)(),
|
|
50
|
-
__metadata("design:type", typeof (_b = typeof biz_base_1.Bizplace !== "undefined" && biz_base_1.Bizplace) === "function" ? _b : Object)
|
|
42
|
+
tslib_1.__metadata("design:type", typeof (_b = typeof biz_base_1.Bizplace !== "undefined" && biz_base_1.Bizplace) === "function" ? _b : Object)
|
|
51
43
|
], Warehouse.prototype, "bizplace", void 0);
|
|
52
|
-
__decorate([
|
|
44
|
+
tslib_1.__decorate([
|
|
53
45
|
(0, typeorm_1.Column)(),
|
|
54
46
|
(0, type_graphql_1.Field)(),
|
|
55
|
-
__metadata("design:type", String)
|
|
47
|
+
tslib_1.__metadata("design:type", String)
|
|
56
48
|
], Warehouse.prototype, "name", void 0);
|
|
57
|
-
__decorate([
|
|
49
|
+
tslib_1.__decorate([
|
|
58
50
|
(0, typeorm_1.OneToMany)(type => location_1.Location, location => location.warehouse),
|
|
59
51
|
(0, type_graphql_1.Field)(type => [location_1.Location]),
|
|
60
|
-
__metadata("design:type", Array)
|
|
52
|
+
tslib_1.__metadata("design:type", Array)
|
|
61
53
|
], Warehouse.prototype, "locations", void 0);
|
|
62
|
-
__decorate([
|
|
54
|
+
tslib_1.__decorate([
|
|
63
55
|
(0, typeorm_1.Column)(),
|
|
64
56
|
(0, type_graphql_1.Field)(),
|
|
65
|
-
__metadata("design:type", String)
|
|
57
|
+
tslib_1.__metadata("design:type", String)
|
|
66
58
|
], Warehouse.prototype, "type", void 0);
|
|
67
|
-
__decorate([
|
|
59
|
+
tslib_1.__decorate([
|
|
68
60
|
(0, typeorm_1.Column)({
|
|
69
61
|
nullable: true
|
|
70
62
|
}),
|
|
71
63
|
(0, type_graphql_1.Field)({ nullable: true }),
|
|
72
|
-
__metadata("design:type", String)
|
|
64
|
+
tslib_1.__metadata("design:type", String)
|
|
73
65
|
], Warehouse.prototype, "description", void 0);
|
|
74
|
-
__decorate([
|
|
66
|
+
tslib_1.__decorate([
|
|
75
67
|
(0, typeorm_1.ManyToOne)(type => auth_base_1.User, {
|
|
76
68
|
nullable: true
|
|
77
69
|
}),
|
|
78
70
|
(0, type_graphql_1.Field)({ nullable: true }),
|
|
79
|
-
__metadata("design:type", typeof (_c = typeof auth_base_1.User !== "undefined" && auth_base_1.User) === "function" ? _c : Object)
|
|
71
|
+
tslib_1.__metadata("design:type", typeof (_c = typeof auth_base_1.User !== "undefined" && auth_base_1.User) === "function" ? _c : Object)
|
|
80
72
|
], Warehouse.prototype, "creator", void 0);
|
|
81
|
-
__decorate([
|
|
73
|
+
tslib_1.__decorate([
|
|
82
74
|
(0, typeorm_1.RelationId)((warehouse) => warehouse.creator),
|
|
83
|
-
__metadata("design:type", String)
|
|
75
|
+
tslib_1.__metadata("design:type", String)
|
|
84
76
|
], Warehouse.prototype, "creatorId", void 0);
|
|
85
|
-
__decorate([
|
|
77
|
+
tslib_1.__decorate([
|
|
86
78
|
(0, typeorm_1.ManyToOne)(type => auth_base_1.User, {
|
|
87
79
|
nullable: true
|
|
88
80
|
}),
|
|
89
81
|
(0, type_graphql_1.Field)({ nullable: true }),
|
|
90
|
-
__metadata("design:type", typeof (_d = typeof auth_base_1.User !== "undefined" && auth_base_1.User) === "function" ? _d : Object)
|
|
82
|
+
tslib_1.__metadata("design:type", typeof (_d = typeof auth_base_1.User !== "undefined" && auth_base_1.User) === "function" ? _d : Object)
|
|
91
83
|
], Warehouse.prototype, "updater", void 0);
|
|
92
|
-
__decorate([
|
|
84
|
+
tslib_1.__decorate([
|
|
93
85
|
(0, typeorm_1.RelationId)((warehouse) => warehouse.updater),
|
|
94
|
-
__metadata("design:type", String)
|
|
86
|
+
tslib_1.__metadata("design:type", String)
|
|
95
87
|
], Warehouse.prototype, "updaterId", void 0);
|
|
96
|
-
__decorate([
|
|
88
|
+
tslib_1.__decorate([
|
|
97
89
|
(0, typeorm_1.CreateDateColumn)(),
|
|
98
90
|
(0, type_graphql_1.Field)({ nullable: true }),
|
|
99
|
-
__metadata("design:type", Date)
|
|
91
|
+
tslib_1.__metadata("design:type", Date)
|
|
100
92
|
], Warehouse.prototype, "createdAt", void 0);
|
|
101
|
-
__decorate([
|
|
93
|
+
tslib_1.__decorate([
|
|
102
94
|
(0, typeorm_1.UpdateDateColumn)(),
|
|
103
95
|
(0, type_graphql_1.Field)({ nullable: true }),
|
|
104
|
-
__metadata("design:type", Date)
|
|
96
|
+
tslib_1.__metadata("design:type", Date)
|
|
105
97
|
], Warehouse.prototype, "updatedAt", void 0);
|
|
106
|
-
Warehouse = __decorate([
|
|
98
|
+
Warehouse = tslib_1.__decorate([
|
|
107
99
|
(0, typeorm_1.Entity)(),
|
|
108
100
|
(0, typeorm_1.Index)('ix_warehouse_0', (warehouse) => [warehouse.domain, warehouse.name], { unique: true }),
|
|
109
101
|
(0, typeorm_1.Index)('ix_warehouse_1', (warehouse) => [warehouse.domain, warehouse.id], { unique: true }),
|
|
110
102
|
(0, type_graphql_1.ObjectType)(),
|
|
111
|
-
__metadata("design:paramtypes", [Object])
|
|
103
|
+
tslib_1.__metadata("design:paramtypes", [Object])
|
|
112
104
|
], Warehouse);
|
|
113
105
|
exports.Warehouse = Warehouse;
|
|
114
106
|
//# sourceMappingURL=warehouse.js.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"warehouse.js","sourceRoot":"","sources":["../../../server/service/warehouse/warehouse.ts"],"names":[],"mappings":"
|
|
1
|
+
{"version":3,"file":"warehouse.js","sourceRoot":"","sources":["../../../server/service/warehouse/warehouse.ts"],"names":[],"mappings":"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","sourcesContent":["import { Field, ID, ObjectType } from 'type-graphql'\nimport {\n Column,\n CreateDateColumn,\n Entity,\n Index,\n ManyToOne,\n OneToMany,\n PrimaryGeneratedColumn,\n RelationId,\n UpdateDateColumn\n} from 'typeorm'\n\nimport { User } from '@things-factory/auth-base'\nimport { Bizplace } from '@things-factory/biz-base'\nimport { Domain } from '@things-factory/shell'\n\nimport { Location } from '../location/location'\n\n@Entity()\n@Index('ix_warehouse_0', (warehouse: Warehouse) => [warehouse.domain, warehouse.name], { unique: true })\n@Index('ix_warehouse_1', (warehouse: Warehouse) => [warehouse.domain, warehouse.id], { unique: true })\n@ObjectType()\nexport class Warehouse {\n @PrimaryGeneratedColumn('uuid')\n @Field(type => ID)\n id: string\n\n @ManyToOne(type => Domain)\n @Field()\n domain: Domain\n\n @RelationId((warehouse: Warehouse) => warehouse.domain)\n domainId: string\n\n @ManyToOne(type => Bizplace)\n @Field()\n bizplace: Bizplace\n\n @Column()\n @Field()\n name: string\n\n @OneToMany(type => Location, location => location.warehouse)\n @Field(type => [Location])\n locations: Location[]\n\n @Column()\n @Field()\n type: string\n\n @Column({\n nullable: true\n })\n @Field({ nullable: true })\n description: string\n\n @ManyToOne(type => User, {\n nullable: true\n })\n @Field({ nullable: true })\n creator: User\n\n @RelationId((warehouse: Warehouse) => warehouse.creator)\n creatorId: string\n\n @ManyToOne(type => User, {\n nullable: true\n })\n @Field({ nullable: true })\n updater: User\n\n @RelationId((warehouse: Warehouse) => warehouse.updater)\n updaterId: string\n\n @CreateDateColumn()\n @Field({ nullable: true })\n createdAt: Date\n\n @UpdateDateColumn()\n @Field({ nullable: true })\n updatedAt: Date\n\n constructor(obj?) {\n if (obj) {\n this.id = obj.Warehouse_id\n this.name = obj.Warehouse_name\n this.locations = obj.Warehouse_locations\n this.type = obj.Warehouse_type\n this.description = obj.Warehouse_description\n this.createdAt = obj.Warehouse_created_at\n this.updatedAt = obj.Warehouse_updated_at\n }\n }\n}\n"]}
|