@things-factory/product-base 6.0.1 → 6.0.3

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/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@things-factory/product-base",
3
- "version": "6.0.1",
3
+ "version": "6.0.3",
4
4
  "main": "dist-server/index.js",
5
5
  "browser": "client/index.js",
6
6
  "things-factory": true,
@@ -23,9 +23,9 @@
23
23
  "migration:create": "node ../../node_modules/typeorm/cli.js migration:create -d ./server/migrations"
24
24
  },
25
25
  "dependencies": {
26
- "@things-factory/biz-base": "^6.0.1",
26
+ "@things-factory/biz-base": "^6.0.3",
27
27
  "@things-factory/env": "^6.0.1",
28
- "@things-factory/routing-base": "^6.0.1"
28
+ "@things-factory/routing-base": "^6.0.3"
29
29
  },
30
- "gitHead": "e5fe832cd3b1ac14b80d5bc9be2a2e650ab31d51"
30
+ "gitHead": "6d9a3aef103e6d8293bfce285662d15ec9c0d705"
31
31
  }
@@ -1,9 +0,0 @@
1
- "use strict";
2
- Object.defineProperty(exports, "__esModule", { value: true });
3
- exports.resolvers = exports.entities = void 0;
4
- const product_barcode_1 = require("./product-barcode");
5
- const product_barcode_query_1 = require("./product-barcode-query");
6
- const product_barcode_mutation_1 = require("./product-barcode-mutation");
7
- exports.entities = [product_barcode_1.ProductBarcode];
8
- exports.resolvers = [product_barcode_query_1.ProductBarcodeQuery, product_barcode_mutation_1.ProductBarcodeMutation];
9
- //# sourceMappingURL=index.js.map
@@ -1 +0,0 @@
1
- {"version":3,"file":"index.js","sourceRoot":"","sources":["../../../server/service/product-barcode/index.ts"],"names":[],"mappings":";;;AAAA,uDAAkD;AAClD,mEAA6D;AAC7D,yEAAmE;AAEtD,QAAA,QAAQ,GAAG,CAAC,gCAAc,CAAC,CAAA;AAC3B,QAAA,SAAS,GAAG,CAAC,2CAAmB,EAAE,iDAAsB,CAAC,CAAA"}
@@ -1,120 +0,0 @@
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
- Object.defineProperty(exports, "__esModule", { value: true });
15
- exports.ProductBarcodeMutation = void 0;
16
- const type_graphql_1 = require("type-graphql");
17
- const typeorm_1 = require("typeorm");
18
- const product_barcode_1 = require("./product-barcode");
19
- const product_barcode_type_1 = require("./product-barcode-type");
20
- let ProductBarcodeMutation = class ProductBarcodeMutation {
21
- async createProductBarcode(productBarcode, context) {
22
- const { domain, user, tx } = context.state;
23
- return await tx.getRepository(product_barcode_1.ProductBarcode).save(Object.assign(Object.assign({}, productBarcode), { domain, creator: user, updater: user }));
24
- }
25
- async updateProductBarcode(id, patch, context) {
26
- const { domain, user, tx } = context.state;
27
- const repository = tx.getRepository(product_barcode_1.ProductBarcode);
28
- const productBarcode = await repository.findOne({
29
- where: { domain, id }
30
- });
31
- return await repository.save(Object.assign(Object.assign(Object.assign({}, productBarcode), patch), { updater: user }));
32
- }
33
- async updateMultipleProductBarcode(patches, context) {
34
- const { domain, user, tx } = context.state;
35
- let results = [];
36
- const _createRecords = patches.filter((patch) => patch.cuFlag.toUpperCase() === '+');
37
- const _updateRecords = patches.filter((patch) => patch.cuFlag.toUpperCase() === 'M');
38
- const productBarcodeRepo = tx.getRepository(product_barcode_1.ProductBarcode);
39
- if (_createRecords.length > 0) {
40
- for (let i = 0; i < _createRecords.length; i++) {
41
- const newRecord = _createRecords[i];
42
- const result = await productBarcodeRepo.save(Object.assign(Object.assign({}, newRecord), { domain, creator: user, updater: user }));
43
- results.push(Object.assign(Object.assign({}, result), { cuFlag: '+' }));
44
- }
45
- }
46
- if (_updateRecords.length > 0) {
47
- for (let i = 0; i < _updateRecords.length; i++) {
48
- const newRecord = _updateRecords[i];
49
- const productBarcode = await productBarcodeRepo.findOne(newRecord.id);
50
- const result = await productBarcodeRepo.save(Object.assign(Object.assign(Object.assign({}, productBarcode), newRecord), { updater: user }));
51
- results.push(Object.assign(Object.assign({}, result), { cuFlag: 'M' }));
52
- }
53
- }
54
- return results;
55
- }
56
- async deleteProductBarcode(id, context) {
57
- const { domain, tx } = context.state;
58
- await tx.getRepository(product_barcode_1.ProductBarcode).delete({ domain, id });
59
- return true;
60
- }
61
- async deleteProductBarcodes(ids, context) {
62
- const { domain, tx } = context.state;
63
- await tx.getRepository(product_barcode_1.ProductBarcode).delete({
64
- domain,
65
- id: (0, typeorm_1.In)(ids)
66
- });
67
- return true;
68
- }
69
- };
70
- __decorate([
71
- (0, type_graphql_1.Directive)('@transaction'),
72
- (0, type_graphql_1.Mutation)(returns => product_barcode_1.ProductBarcode, { description: 'To create new ProductBarcode' }),
73
- __param(0, (0, type_graphql_1.Arg)('productBarcode')),
74
- __param(1, (0, type_graphql_1.Ctx)()),
75
- __metadata("design:type", Function),
76
- __metadata("design:paramtypes", [product_barcode_type_1.NewProductBarcode, Object]),
77
- __metadata("design:returntype", Promise)
78
- ], ProductBarcodeMutation.prototype, "createProductBarcode", null);
79
- __decorate([
80
- (0, type_graphql_1.Directive)('@transaction'),
81
- (0, type_graphql_1.Mutation)(returns => product_barcode_1.ProductBarcode, { description: 'To modify ProductBarcode information' }),
82
- __param(0, (0, type_graphql_1.Arg)('id')),
83
- __param(1, (0, type_graphql_1.Arg)('patch')),
84
- __param(2, (0, type_graphql_1.Ctx)()),
85
- __metadata("design:type", Function),
86
- __metadata("design:paramtypes", [String, product_barcode_type_1.ProductBarcodePatch, Object]),
87
- __metadata("design:returntype", Promise)
88
- ], ProductBarcodeMutation.prototype, "updateProductBarcode", null);
89
- __decorate([
90
- (0, type_graphql_1.Directive)('@transaction'),
91
- (0, type_graphql_1.Mutation)(returns => [product_barcode_1.ProductBarcode], { description: "To modify multiple ProductBarcodes' information" }),
92
- __param(0, (0, type_graphql_1.Arg)('patches', type => [product_barcode_type_1.ProductBarcodePatch])),
93
- __param(1, (0, type_graphql_1.Ctx)()),
94
- __metadata("design:type", Function),
95
- __metadata("design:paramtypes", [Array, Object]),
96
- __metadata("design:returntype", Promise)
97
- ], ProductBarcodeMutation.prototype, "updateMultipleProductBarcode", null);
98
- __decorate([
99
- (0, type_graphql_1.Directive)('@transaction'),
100
- (0, type_graphql_1.Mutation)(returns => Boolean, { description: 'To delete ProductBarcode' }),
101
- __param(0, (0, type_graphql_1.Arg)('id')),
102
- __param(1, (0, type_graphql_1.Ctx)()),
103
- __metadata("design:type", Function),
104
- __metadata("design:paramtypes", [String, Object]),
105
- __metadata("design:returntype", Promise)
106
- ], ProductBarcodeMutation.prototype, "deleteProductBarcode", null);
107
- __decorate([
108
- (0, type_graphql_1.Directive)('@transaction'),
109
- (0, type_graphql_1.Mutation)(returns => Boolean, { description: 'To delete multiple productBarcodes' }),
110
- __param(0, (0, type_graphql_1.Arg)('ids', type => [String])),
111
- __param(1, (0, type_graphql_1.Ctx)()),
112
- __metadata("design:type", Function),
113
- __metadata("design:paramtypes", [Array, Object]),
114
- __metadata("design:returntype", Promise)
115
- ], ProductBarcodeMutation.prototype, "deleteProductBarcodes", null);
116
- ProductBarcodeMutation = __decorate([
117
- (0, type_graphql_1.Resolver)(product_barcode_1.ProductBarcode)
118
- ], ProductBarcodeMutation);
119
- exports.ProductBarcodeMutation = ProductBarcodeMutation;
120
- //# sourceMappingURL=product-barcode-mutation.js.map
@@ -1 +0,0 @@
1
- {"version":3,"file":"product-barcode-mutation.js","sourceRoot":"","sources":["../../../server/service/product-barcode/product-barcode-mutation.ts"],"names":[],"mappings":";;;;;;;;;;;;;;;AAAA,+CAAsE;AACtE,qCAA2C;AAC3C,uDAAkD;AAClD,iEAA+E;AAGxE,IAAM,sBAAsB,GAA5B,MAAM,sBAAsB;IAG3B,AAAN,KAAK,CAAC,oBAAoB,CACD,cAAiC,EACjD,OAAY;QAEnB,MAAM,EAAE,MAAM,EAAE,IAAI,EAAE,EAAE,EAAE,GAAG,OAAO,CAAC,KAAK,CAAA;QAE1C,OAAO,MAAM,EAAE,CAAC,aAAa,CAAC,gCAAc,CAAC,CAAC,IAAI,iCAC7C,cAAc,KACjB,MAAM,EACN,OAAO,EAAE,IAAI,EACb,OAAO,EAAE,IAAI,IACb,CAAA;IACJ,CAAC;IAIK,AAAN,KAAK,CAAC,oBAAoB,CACb,EAAU,EACP,KAA0B,EACjC,OAAY;QAEnB,MAAM,EAAE,MAAM,EAAE,IAAI,EAAE,EAAE,EAAE,GAAG,OAAO,CAAC,KAAK,CAAA;QAE1C,MAAM,UAAU,GAAG,EAAE,CAAC,aAAa,CAAC,gCAAc,CAAC,CAAA;QACnD,MAAM,cAAc,GAAG,MAAM,UAAU,CAAC,OAAO,CAAC;YAC9C,KAAK,EAAE,EAAE,MAAM,EAAE,EAAE,EAAE;SACtB,CAAC,CAAA;QAEF,OAAO,MAAM,UAAU,CAAC,IAAI,+CACvB,cAAc,GACd,KAAK,KACR,OAAO,EAAE,IAAI,IACb,CAAA;IACJ,CAAC;IAIK,AAAN,KAAK,CAAC,4BAA4B,CACe,OAA8B,EACtE,OAAY;QAEnB,MAAM,EAAE,MAAM,EAAE,IAAI,EAAE,EAAE,EAAE,GAAG,OAAO,CAAC,KAAK,CAAA;QAE1C,IAAI,OAAO,GAAG,EAAE,CAAA;QAChB,MAAM,cAAc,GAAG,OAAO,CAAC,MAAM,CAAC,CAAC,KAAU,EAAE,EAAE,CAAC,KAAK,CAAC,MAAM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AAc,CAAC,EAAE,EAAE,WAAW,EAAE,iDAAiD,EAAE,CAAC;IAEvG,WAAA,IAAA,kBAAG,EAAC,SAAS,EAAE,IAAI,CAAC,EAAE,CAAC,CAAC,0CAAmB,CAAC,CAAC,CAAA;IAC7C,WAAA,IAAA,kBAAG,GAAE,CAAA;;;;0EAwCP;AAIK;IAFL,IAAA,wBAAS,EAAC,cAAc,CAAC;IACzB,IAAA,uBAAQ,EAAC,OAAO,CAAC,EAAE,CAAC,OAAO,EAAE,EAAE,WAAW,EAAE,0BAA0B,EAAE,CAAC;IAC9C,WAAA,IAAA,kBAAG,EAAC,IAAI,CAAC,CAAA;IAAc,WAAA,IAAA,kBAAG,GAAE,CAAA;;;;kEAKvD;AAIK;IAFL,IAAA,wBAAS,EAAC,cAAc,CAAC;IACzB,IAAA,uBAAQ,EAAC,OAAO,CAAC,EAAE,CAAC,OAAO,EAAE,EAAE,WAAW,EAAE,oCAAoC,EAAE,CAAC;IACvD,WAAA,IAAA,kBAAG,EAAC,KAAK,EAAE,IAAI,CAAC,EAAE,CAAC,CAAC,MAAM,CAAC,CAAC,CAAA;IAAiB,WAAA,IAAA,kBAAG,GAAE,CAAA;;;;mEAS9E;AAxGU,sBAAsB;IADlC,IAAA,uBAAQ,EAAC,gCAAc,CAAC;GACZ,sBAAsB,CAyGlC;AAzGY,wDAAsB"}
@@ -1,87 +0,0 @@
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
- var _a;
15
- Object.defineProperty(exports, "__esModule", { value: true });
16
- exports.ProductBarcodeQuery = void 0;
17
- const type_graphql_1 = require("type-graphql");
18
- const typeorm_1 = require("typeorm");
19
- const shell_1 = require("@things-factory/shell");
20
- const auth_base_1 = require("@things-factory/auth-base");
21
- const product_barcode_1 = require("./product-barcode");
22
- const product_barcode_type_1 = require("./product-barcode-type");
23
- let ProductBarcodeQuery = class ProductBarcodeQuery {
24
- async productBarcode(id, context) {
25
- const { domain } = context.state;
26
- return await (0, typeorm_1.getRepository)(product_barcode_1.ProductBarcode).findOne({
27
- where: { domain, id }
28
- });
29
- }
30
- async productBarcodes(params, context) {
31
- const { domain } = context.state;
32
- const convertedParams = (0, shell_1.convertListParams)(params, domain.id);
33
- const [items, total] = await (0, typeorm_1.getRepository)(product_barcode_1.ProductBarcode).findAndCount(convertedParams);
34
- return { items, total };
35
- }
36
- async domain(productBarcode) {
37
- return await (0, typeorm_1.getRepository)(shell_1.Domain).findOne(productBarcode.domainId);
38
- }
39
- async updater(productBarcode) {
40
- return await (0, typeorm_1.getRepository)(auth_base_1.User).findOne(productBarcode.updaterId);
41
- }
42
- async creator(productBarcode) {
43
- return await (0, typeorm_1.getRepository)(auth_base_1.User).findOne(productBarcode.creatorId);
44
- }
45
- };
46
- __decorate([
47
- (0, type_graphql_1.Query)(returns => product_barcode_1.ProductBarcode, { description: 'To fetch a ProductBarcode' }),
48
- __param(0, (0, type_graphql_1.Arg)('id')),
49
- __param(1, (0, type_graphql_1.Ctx)()),
50
- __metadata("design:type", Function),
51
- __metadata("design:paramtypes", [String, Object]),
52
- __metadata("design:returntype", Promise)
53
- ], ProductBarcodeQuery.prototype, "productBarcode", null);
54
- __decorate([
55
- (0, type_graphql_1.Query)(returns => product_barcode_type_1.ProductBarcodeList, { description: 'To fetch multiple ProductBarcodes' }),
56
- __param(0, (0, type_graphql_1.Args)()),
57
- __param(1, (0, type_graphql_1.Ctx)()),
58
- __metadata("design:type", Function),
59
- __metadata("design:paramtypes", [typeof (_a = typeof shell_1.ListParam !== "undefined" && shell_1.ListParam) === "function" ? _a : Object, Object]),
60
- __metadata("design:returntype", Promise)
61
- ], ProductBarcodeQuery.prototype, "productBarcodes", null);
62
- __decorate([
63
- (0, type_graphql_1.FieldResolver)(type => shell_1.Domain),
64
- __param(0, (0, type_graphql_1.Root)()),
65
- __metadata("design:type", Function),
66
- __metadata("design:paramtypes", [product_barcode_1.ProductBarcode]),
67
- __metadata("design:returntype", Promise)
68
- ], ProductBarcodeQuery.prototype, "domain", null);
69
- __decorate([
70
- (0, type_graphql_1.FieldResolver)(type => auth_base_1.User),
71
- __param(0, (0, type_graphql_1.Root)()),
72
- __metadata("design:type", Function),
73
- __metadata("design:paramtypes", [product_barcode_1.ProductBarcode]),
74
- __metadata("design:returntype", Promise)
75
- ], ProductBarcodeQuery.prototype, "updater", null);
76
- __decorate([
77
- (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", [product_barcode_1.ProductBarcode]),
81
- __metadata("design:returntype", Promise)
82
- ], ProductBarcodeQuery.prototype, "creator", null);
83
- ProductBarcodeQuery = __decorate([
84
- (0, type_graphql_1.Resolver)(product_barcode_1.ProductBarcode)
85
- ], ProductBarcodeQuery);
86
- exports.ProductBarcodeQuery = ProductBarcodeQuery;
87
- //# sourceMappingURL=product-barcode-query.js.map
@@ -1 +0,0 @@
1
- {"version":3,"file":"product-barcode-query.js","sourceRoot":"","sources":["../../../server/service/product-barcode/product-barcode-query.ts"],"names":[],"mappings":";;;;;;;;;;;;;;;;AAAA,+CAA8F;AAC9F,qCAAuC;AACvC,iDAA4E;AAC5E,yDAAgD;AAChD,uDAAkD;AAClD,iEAA2D;A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E,EAAE,WAAW,EAAE,2BAA2B,EAAE,CAAC;IACzD,WAAA,IAAA,kBAAG,EAAC,IAAI,CAAC,CAAA;IAAc,WAAA,IAAA,kBAAG,GAAE,CAAA;;;;yDAMjD;AAGK;IADL,IAAA,oBAAK,EAAC,OAAO,CAAC,EAAE,CAAC,yCAAkB,EAAE,EAAE,WAAW,EAAE,mCAAmC,EAAE,CAAC;IACpE,WAAA,IAAA,mBAAI,GAAE,CAAA;IAAqB,WAAA,IAAA,kBAAG,GAAE,CAAA;;yDAAjB,iBAAS,oBAAT,iBAAS;;0DAO9C;AAGK;IADL,IAAA,4BAAa,EAAC,IAAI,CAAC,EAAE,CAAC,cAAM,CAAC;IAChB,WAAA,IAAA,mBAAI,GAAE,CAAA;;qCAAiB,gCAAc;;iDAElD;AAGK;IADL,IAAA,4BAAa,EAAC,IAAI,CAAC,EAAE,CAAC,gBAAI,CAAC;IACb,WAAA,IAAA,mBAAI,GAAE,CAAA;;qCAAiB,gCAAc;;kDAEnD;AAGK;IADL,IAAA,4BAAa,EAAC,IAAI,CAAC,EAAE,CAAC,gBAAI,CAAC;IACb,WAAA,IAAA,mBAAI,GAAE,CAAA;;qCAAiB,gCAAc;;kDAEnD;AAjCU,mBAAmB;IAD/B,IAAA,uBAAQ,EAAC,gCAAc,CAAC;GACZ,mBAAmB,CAkC/B;AAlCY,kDAAmB"}
@@ -1,63 +0,0 @@
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 _a;
12
- Object.defineProperty(exports, "__esModule", { value: true });
13
- exports.ProductBarcodeList = exports.ProductBarcodePatch = exports.NewProductBarcode = void 0;
14
- const type_graphql_1 = require("type-graphql");
15
- const shell_1 = require("@things-factory/shell");
16
- const product_barcode_1 = require("./product-barcode");
17
- let NewProductBarcode = class NewProductBarcode {
18
- };
19
- __decorate([
20
- (0, type_graphql_1.Field)(),
21
- __metadata("design:type", String)
22
- ], NewProductBarcode.prototype, "name", void 0);
23
- __decorate([
24
- (0, type_graphql_1.Field)(),
25
- __metadata("design:type", typeof (_a = typeof shell_1.ObjectRef !== "undefined" && shell_1.ObjectRef) === "function" ? _a : Object)
26
- ], NewProductBarcode.prototype, "productDetail", void 0);
27
- NewProductBarcode = __decorate([
28
- (0, type_graphql_1.InputType)()
29
- ], NewProductBarcode);
30
- exports.NewProductBarcode = NewProductBarcode;
31
- let ProductBarcodePatch = class ProductBarcodePatch {
32
- };
33
- __decorate([
34
- (0, type_graphql_1.Field)(type => type_graphql_1.ID, { nullable: true }),
35
- __metadata("design:type", String)
36
- ], ProductBarcodePatch.prototype, "id", void 0);
37
- __decorate([
38
- (0, type_graphql_1.Field)({ nullable: true }),
39
- __metadata("design:type", String)
40
- ], ProductBarcodePatch.prototype, "gtin", void 0);
41
- __decorate([
42
- (0, type_graphql_1.Field)({ nullable: true }),
43
- __metadata("design:type", String)
44
- ], ProductBarcodePatch.prototype, "cuFlag", void 0);
45
- ProductBarcodePatch = __decorate([
46
- (0, type_graphql_1.InputType)()
47
- ], ProductBarcodePatch);
48
- exports.ProductBarcodePatch = ProductBarcodePatch;
49
- let ProductBarcodeList = class ProductBarcodeList {
50
- };
51
- __decorate([
52
- (0, type_graphql_1.Field)(type => [product_barcode_1.ProductBarcode]),
53
- __metadata("design:type", Array)
54
- ], ProductBarcodeList.prototype, "items", void 0);
55
- __decorate([
56
- (0, type_graphql_1.Field)(type => type_graphql_1.Int),
57
- __metadata("design:type", Number)
58
- ], ProductBarcodeList.prototype, "total", void 0);
59
- ProductBarcodeList = __decorate([
60
- (0, type_graphql_1.ObjectType)()
61
- ], ProductBarcodeList);
62
- exports.ProductBarcodeList = ProductBarcodeList;
63
- //# sourceMappingURL=product-barcode-type.js.map
@@ -1 +0,0 @@
1
- {"version":3,"file":"product-barcode-type.js","sourceRoot":"","sources":["../../../server/service/product-barcode/product-barcode-type.ts"],"names":[],"mappings":";;;;;;;;;;;;;AAAA,+CAAsF;AAEtF,iDAAiD;AAEjD,uDAAkD;AAG3C,IAAM,iBAAiB,GAAvB,MAAM,iBAAiB;CAM7B,CAAA;AALC;IAAC,IAAA,oBAAK,GAAE;;+CACI;AAEZ;IAAC,IAAA,oBAAK,GAAE;kDACO,iBAAS,oBAAT,iBAAS;wDAAA;AALb,iBAAiB;IAD7B,IAAA,wBAAS,GAAE;GACC,iBAAiB,CAM7B;AANY,8CAAiB;AASvB,IAAM,mBAAmB,GAAzB,MAAM,mBAAmB;CAS/B,CAAA;AARC;IAAC,IAAA,oBAAK,EAAC,IAAI,CAAC,EAAE,CAAC,iBAAE,EAAE,EAAE,QAAQ,EAAE,IAAI,EAAE,CAAC;;+CAC3B;AAEX;IAAC,IAAA,oBAAK,EAAC,EAAE,QAAQ,EAAE,IAAI,EAAE,CAAC;;iDACb;AAEb;IAAC,IAAA,oBAAK,EAAC,EAAE,QAAQ,EAAE,IAAI,EAAE,CAAC;;mDACZ;AARH,mBAAmB;IAD/B,IAAA,wBAAS,GAAE;GACC,mBAAmB,CAS/B;AATY,kDAAmB;AAYzB,IAAM,kBAAkB,GAAxB,MAAM,kBAAkB;CAM9B,CAAA;AALC;IAAC,IAAA,oBAAK,EAAC,IAAI,CAAC,EAAE,CAAC,CAAC,gCAAc,CAAC,CAAC;;iDACT;AAEvB;IAAC,IAAA,oBAAK,EAAC,IAAI,CAAC,EAAE,CAAC,kBAAG,CAAC;;iDACN;AALF,kBAAkB;IAD9B,IAAA,yBAAU,GAAE;GACA,kBAAkB,CAM9B;AANY,gDAAkB"}
@@ -1,99 +0,0 @@
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 _a, _b, _c;
12
- Object.defineProperty(exports, "__esModule", { value: true });
13
- exports.ProductBarcode = void 0;
14
- const typeorm_1 = require("typeorm");
15
- const type_graphql_1 = require("type-graphql");
16
- const product_detail_1 = require("../product-detail/product-detail");
17
- const product_1 = require("../product/product");
18
- const shell_1 = require("@things-factory/shell");
19
- const auth_base_1 = require("@things-factory/auth-base");
20
- let ProductBarcode = class ProductBarcode {
21
- };
22
- __decorate([
23
- (0, typeorm_1.PrimaryGeneratedColumn)('uuid'),
24
- (0, type_graphql_1.Field)(type => type_graphql_1.ID),
25
- __metadata("design:type", String)
26
- ], ProductBarcode.prototype, "id", void 0);
27
- __decorate([
28
- (0, typeorm_1.ManyToOne)(type => shell_1.Domain),
29
- (0, type_graphql_1.Field)({ nullable: true }),
30
- __metadata("design:type", typeof (_a = typeof shell_1.Domain !== "undefined" && shell_1.Domain) === "function" ? _a : Object)
31
- ], ProductBarcode.prototype, "domain", void 0);
32
- __decorate([
33
- (0, typeorm_1.RelationId)((productBarcode) => productBarcode.domain),
34
- __metadata("design:type", String)
35
- ], ProductBarcode.prototype, "domainId", void 0);
36
- __decorate([
37
- (0, typeorm_1.Column)(),
38
- (0, type_graphql_1.Field)(),
39
- __metadata("design:type", String)
40
- ], ProductBarcode.prototype, "gtin", void 0);
41
- __decorate([
42
- (0, typeorm_1.ManyToOne)(type => product_1.Product),
43
- (0, type_graphql_1.Field)(type => product_1.Product),
44
- __metadata("design:type", product_1.Product)
45
- ], ProductBarcode.prototype, "product", void 0);
46
- __decorate([
47
- (0, typeorm_1.RelationId)((productBarcode) => productBarcode.product),
48
- __metadata("design:type", String)
49
- ], ProductBarcode.prototype, "productId", void 0);
50
- __decorate([
51
- (0, typeorm_1.ManyToOne)(type => product_detail_1.ProductDetail),
52
- (0, type_graphql_1.Field)(type => product_detail_1.ProductDetail),
53
- __metadata("design:type", product_detail_1.ProductDetail)
54
- ], ProductBarcode.prototype, "productDetail", void 0);
55
- __decorate([
56
- (0, typeorm_1.RelationId)((productBarcode) => productBarcode.productDetail),
57
- __metadata("design:type", String)
58
- ], ProductBarcode.prototype, "productDetailId", void 0);
59
- __decorate([
60
- (0, typeorm_1.CreateDateColumn)(),
61
- (0, type_graphql_1.Field)({ nullable: true }),
62
- __metadata("design:type", Date)
63
- ], ProductBarcode.prototype, "createdAt", void 0);
64
- __decorate([
65
- (0, typeorm_1.UpdateDateColumn)(),
66
- (0, type_graphql_1.Field)({ nullable: true }),
67
- __metadata("design:type", Date)
68
- ], ProductBarcode.prototype, "updatedAt", void 0);
69
- __decorate([
70
- (0, typeorm_1.ManyToOne)(type => auth_base_1.User, {
71
- nullable: true
72
- }),
73
- (0, type_graphql_1.Field)({ nullable: true }),
74
- __metadata("design:type", typeof (_b = typeof auth_base_1.User !== "undefined" && auth_base_1.User) === "function" ? _b : Object)
75
- ], ProductBarcode.prototype, "creator", void 0);
76
- __decorate([
77
- (0, typeorm_1.RelationId)((productBarcode) => productBarcode.creator),
78
- __metadata("design:type", String)
79
- ], ProductBarcode.prototype, "creatorId", void 0);
80
- __decorate([
81
- (0, typeorm_1.ManyToOne)(type => auth_base_1.User, {
82
- nullable: true
83
- }),
84
- (0, type_graphql_1.Field)({ nullable: true }),
85
- __metadata("design:type", typeof (_c = typeof auth_base_1.User !== "undefined" && auth_base_1.User) === "function" ? _c : Object)
86
- ], ProductBarcode.prototype, "updater", void 0);
87
- __decorate([
88
- (0, typeorm_1.RelationId)((productBarcode) => productBarcode.updater),
89
- __metadata("design:type", String)
90
- ], ProductBarcode.prototype, "updaterId", void 0);
91
- ProductBarcode = __decorate([
92
- (0, typeorm_1.Entity)(),
93
- (0, typeorm_1.Index)('ix_product_barcode_0', (productBarcode) => [productBarcode.domain, productBarcode.id], {
94
- unique: true
95
- }),
96
- (0, type_graphql_1.ObjectType)({ description: 'Entity for ProductBarcode' })
97
- ], ProductBarcode);
98
- exports.ProductBarcode = ProductBarcode;
99
- //# sourceMappingURL=product-barcode.js.map
@@ -1 +0,0 @@
1
- {"version":3,"file":"product-barcode.js","sourceRoot":"","sources":["../../../server/service/product-barcode/product-barcode.ts"],"names":[],"mappings":";;;;;;;;;;;;;AAAA,qCASgB;AAChB,+CAAoD;AAEpD,qEAAgE;AAChE,gDAA4C;AAC5C,iDAA8C;AAC9C,yDAAgD;AAOzC,IAAM,cAAc,GAApB,MAAM,cAAc;CAuD1B,CAAA;AAtDC;IAAC,IAAA,gCAAsB,EAAC,MAAM,CAAC;IAC9B,IAAA,oBAAK,EAAC,IAAI,CAAC,EAAE,CAAC,iBAAE,CAAC;;0CACC;AAEnB;IAAC,IAAA,mBAAS,EAAC,IAAI,CAAC,EAAE,CAAC,cAAM,CAAC;IACzB,IAAA,oBAAK,EAAC,EAAE,QAAQ,EAAE,IAAI,EAAE,CAAC;kDACjB,cAAM,oBAAN,cAAM;8CAAA;AAEf;IAAC,IAAA,oBAAU,EAAC,CAAC,cAA8B,EAAE,EAAE,CAAC,cAAc,CAAC,MAAM,CAAC;;gDACrD;AAEjB;IAAC,IAAA,gBAAM,GAAE;IACR,IAAA,oBAAK,GAAE;;4CACI;AAEZ;IAAC,IAAA,mBAAS,EAAC,IAAI,CAAC,EAAE,C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