@things-factory/product-base 4.3.671 → 4.3.673
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 +18 -0
- package/dist-server/constants/index.js.map +1 -0
- package/dist-server/constants/product.js +25 -0
- package/dist-server/constants/product.js.map +1 -0
- package/dist-server/controllers/index.js +1 -0
- package/dist-server/controllers/index.js.map +1 -0
- package/dist-server/index.js +19 -0
- package/dist-server/index.js.map +1 -0
- package/dist-server/middlewares/index.js +1 -0
- package/dist-server/middlewares/index.js.map +1 -0
- package/dist-server/migrations/index.js +12 -0
- package/dist-server/migrations/index.js.map +1 -0
- package/dist-server/service/index.js +74 -0
- package/dist-server/service/index.js.map +1 -0
- package/dist-server/service/product/index.js +10 -0
- package/dist-server/service/product/index.js.map +1 -0
- package/dist-server/service/product/product-mutation.js +408 -0
- package/dist-server/service/product/product-mutation.js.map +1 -0
- package/dist-server/service/product/product-query.js +373 -0
- package/dist-server/service/product/product-query.js.map +1 -0
- package/dist-server/service/product/product-types.js +618 -0
- package/dist-server/service/product/product-types.js.map +1 -0
- package/dist-server/service/product/product.js +615 -0
- package/dist-server/service/product/product.js.map +1 -0
- package/dist-server/service/product/validate-product.js +26 -0
- package/dist-server/service/product/validate-product.js.map +1 -0
- package/dist-server/service/product-barcode/index.js +9 -0
- package/dist-server/service/product-barcode/index.js.map +1 -0
- package/dist-server/service/product-barcode/product-barcode-mutation.js +120 -0
- package/dist-server/service/product-barcode/product-barcode-mutation.js.map +1 -0
- package/dist-server/service/product-barcode/product-barcode-query.js +87 -0
- package/dist-server/service/product-barcode/product-barcode-query.js.map +1 -0
- package/dist-server/service/product-barcode/product-barcode-type.js +63 -0
- package/dist-server/service/product-barcode/product-barcode-type.js.map +1 -0
- package/dist-server/service/product-barcode/product-barcode.js +104 -0
- package/dist-server/service/product-barcode/product-barcode.js.map +1 -0
- package/dist-server/service/product-bundle/index.js +9 -0
- package/dist-server/service/product-bundle/index.js.map +1 -0
- package/dist-server/service/product-bundle/product-bundle-mutation.js +130 -0
- package/dist-server/service/product-bundle/product-bundle-mutation.js.map +1 -0
- package/dist-server/service/product-bundle/product-bundle-query.js +128 -0
- package/dist-server/service/product-bundle/product-bundle-query.js.map +1 -0
- package/dist-server/service/product-bundle/product-bundle-types.js +85 -0
- package/dist-server/service/product-bundle/product-bundle-types.js.map +1 -0
- package/dist-server/service/product-bundle/product-bundle.js +128 -0
- package/dist-server/service/product-bundle/product-bundle.js.map +1 -0
- package/dist-server/service/product-bundle-setting/index.js +9 -0
- package/dist-server/service/product-bundle-setting/index.js.map +1 -0
- package/dist-server/service/product-bundle-setting/product-bundle-setting-mutation.js +165 -0
- package/dist-server/service/product-bundle-setting/product-bundle-setting-mutation.js.map +1 -0
- package/dist-server/service/product-bundle-setting/product-bundle-setting-query.js +113 -0
- package/dist-server/service/product-bundle-setting/product-bundle-setting-query.js.map +1 -0
- package/dist-server/service/product-bundle-setting/product-bundle-setting-types.js +69 -0
- package/dist-server/service/product-bundle-setting/product-bundle-setting-types.js.map +1 -0
- package/dist-server/service/product-bundle-setting/product-bundle-setting.js +63 -0
- package/dist-server/service/product-bundle-setting/product-bundle-setting.js.map +1 -0
- package/dist-server/service/product-combination/index.js +9 -0
- package/dist-server/service/product-combination/index.js.map +1 -0
- package/dist-server/service/product-combination/product-combination-mutation.js +137 -0
- package/dist-server/service/product-combination/product-combination-mutation.js.map +1 -0
- package/dist-server/service/product-combination/product-combination-query.js +86 -0
- package/dist-server/service/product-combination/product-combination-query.js.map +1 -0
- package/dist-server/service/product-combination/product-combination-type.js +83 -0
- package/dist-server/service/product-combination/product-combination-type.js.map +1 -0
- package/dist-server/service/product-combination/product-combination.js +133 -0
- package/dist-server/service/product-combination/product-combination.js.map +1 -0
- package/dist-server/service/product-combination-setting/index.js +9 -0
- package/dist-server/service/product-combination-setting/index.js.map +1 -0
- package/dist-server/service/product-combination-setting/product-combination-setting-mutation.js +221 -0
- package/dist-server/service/product-combination-setting/product-combination-setting-mutation.js.map +1 -0
- package/dist-server/service/product-combination-setting/product-combination-setting-query.js +177 -0
- package/dist-server/service/product-combination-setting/product-combination-setting-query.js.map +1 -0
- package/dist-server/service/product-combination-setting/product-combination-setting-type.js +75 -0
- package/dist-server/service/product-combination-setting/product-combination-setting-type.js.map +1 -0
- package/dist-server/service/product-combination-setting/product-combination-setting.js +105 -0
- package/dist-server/service/product-combination-setting/product-combination-setting.js.map +1 -0
- package/dist-server/service/product-detail/index.js +9 -0
- package/dist-server/service/product-detail/index.js.map +1 -0
- package/dist-server/service/product-detail/product-detail-mutation.js +374 -0
- package/dist-server/service/product-detail/product-detail-mutation.js.map +1 -0
- package/dist-server/service/product-detail/product-detail-query.js +223 -0
- package/dist-server/service/product-detail/product-detail-query.js.map +1 -0
- package/dist-server/service/product-detail/product-detail-types.js +392 -0
- package/dist-server/service/product-detail/product-detail-types.js.map +1 -0
- package/dist-server/service/product-detail/product-detail.js +444 -0
- package/dist-server/service/product-detail/product-detail.js.map +1 -0
- package/dist-server/service/product-detail-bizplace-setting/index.js +9 -0
- package/dist-server/service/product-detail-bizplace-setting/index.js.map +1 -0
- package/dist-server/service/product-detail-bizplace-setting/product-detail-bizplace-setting-mutation.js +118 -0
- package/dist-server/service/product-detail-bizplace-setting/product-detail-bizplace-setting-mutation.js.map +1 -0
- package/dist-server/service/product-detail-bizplace-setting/product-detail-bizplace-setting-query.js +107 -0
- package/dist-server/service/product-detail-bizplace-setting/product-detail-bizplace-setting-query.js.map +1 -0
- package/dist-server/service/product-detail-bizplace-setting/product-detail-bizplace-setting-types.js +99 -0
- package/dist-server/service/product-detail-bizplace-setting/product-detail-bizplace-setting-types.js.map +1 -0
- package/dist-server/service/product-detail-bizplace-setting/product-detail-bizplace-setting.js +120 -0
- package/dist-server/service/product-detail-bizplace-setting/product-detail-bizplace-setting.js.map +1 -0
- package/dist-server/service/product-set/index.js +9 -0
- package/dist-server/service/product-set/index.js.map +1 -0
- package/dist-server/service/product-set/product-set-mutation.js +146 -0
- package/dist-server/service/product-set/product-set-mutation.js.map +1 -0
- package/dist-server/service/product-set/product-set-query.js +136 -0
- package/dist-server/service/product-set/product-set-query.js.map +1 -0
- package/dist-server/service/product-set/product-set-types.js +77 -0
- package/dist-server/service/product-set/product-set-types.js.map +1 -0
- package/dist-server/service/product-set/product-set.js +118 -0
- package/dist-server/service/product-set/product-set.js.map +1 -0
- package/dist-server/utils/index.js +18 -0
- package/dist-server/utils/index.js.map +1 -0
- package/dist-server/utils/product-util.js +16 -0
- package/dist-server/utils/product-util.js.map +1 -0
- package/package.json +4 -4
|
@@ -0,0 +1,136 @@
|
|
|
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, _b;
|
|
15
|
+
Object.defineProperty(exports, "__esModule", { value: true });
|
|
16
|
+
exports.ProductSetQuery = void 0;
|
|
17
|
+
const auth_base_1 = require("@things-factory/auth-base");
|
|
18
|
+
const biz_base_1 = require("@things-factory/biz-base");
|
|
19
|
+
const shell_1 = require("@things-factory/shell");
|
|
20
|
+
const type_graphql_1 = require("type-graphql");
|
|
21
|
+
const typeorm_1 = require("typeorm");
|
|
22
|
+
const product_set_1 = require("./product-set");
|
|
23
|
+
const product_set_types_1 = require("./product-set-types");
|
|
24
|
+
let ProductSetQuery = class ProductSetQuery {
|
|
25
|
+
async myBizplaceProductSets(params, context) {
|
|
26
|
+
const { domain, user } = context.state;
|
|
27
|
+
const qb = (0, typeorm_1.getRepository)(product_set_1.ProductSet).createQueryBuilder();
|
|
28
|
+
const productFilters = params.filters.filter(x => x.name == 'product_set_info');
|
|
29
|
+
const filters = params.filters.filter(x => x.name != 'product_set_info');
|
|
30
|
+
const productFilterColumns = ['name', 'description'];
|
|
31
|
+
if (!params.filters.find(filter => filter.name === 'bizplace_id')) {
|
|
32
|
+
const companyBizplace = await (0, biz_base_1.getCompanyBizplace)(domain, user);
|
|
33
|
+
const myBizplace = await (0, biz_base_1.getMyBizplace)(domain, user);
|
|
34
|
+
params.filters = [...filters, { name: 'bizplace_id', operator: 'in', value: [companyBizplace.id, myBizplace.id] }];
|
|
35
|
+
}
|
|
36
|
+
(0, shell_1.buildQuery)(qb, params, context, false);
|
|
37
|
+
if (productFilters && productFilters.length > 0) {
|
|
38
|
+
let productInfo = productFilters[0];
|
|
39
|
+
qb.andWhere(new typeorm_1.Brackets(qb2 => {
|
|
40
|
+
productFilterColumns.forEach(filter => {
|
|
41
|
+
const condition = (0, shell_1.buildCondition)(qb.alias, filter, productInfo.operator, productInfo.value, productInfo.relation, Object.keys(qb.getParameters()).length);
|
|
42
|
+
qb2.orWhere(condition.clause, condition.parameters);
|
|
43
|
+
});
|
|
44
|
+
}));
|
|
45
|
+
}
|
|
46
|
+
const [items, total] = await qb
|
|
47
|
+
.leftJoinAndSelect('ProductSet.bizplace', 'Bizplace')
|
|
48
|
+
.leftJoinAndSelect('ProductSet.creator', 'Creator')
|
|
49
|
+
.leftJoinAndSelect('ProductSet.updater', 'Updater')
|
|
50
|
+
.leftJoinAndSelect('ProductSet.product', 'Product')
|
|
51
|
+
.getManyAndCount();
|
|
52
|
+
return { items, total };
|
|
53
|
+
}
|
|
54
|
+
async productSets(params, context) {
|
|
55
|
+
const { domain, user } = context.state;
|
|
56
|
+
if (!params.filters.find((filter) => filter.name === 'bizplace_id')) {
|
|
57
|
+
let bizplaceFilter = params.filters.find((filter) => filter.name === 'bizplace_id');
|
|
58
|
+
const companyBizplace = await (0, biz_base_1.getCompanyBizplace)(domain, user);
|
|
59
|
+
const myBizplace = await (0, biz_base_1.getMyBizplace)(domain, user);
|
|
60
|
+
bizplaceFilter = { name: 'bizplace_id', operator: 'in', value: [companyBizplace.id, myBizplace.id] };
|
|
61
|
+
}
|
|
62
|
+
const convertedParams = (0, shell_1.convertListParams)(params);
|
|
63
|
+
const [items, total] = await (0, typeorm_1.getRepository)(product_set_1.ProductSet).findAndCount(Object.assign(Object.assign({}, convertedParams), { relations: ['domain', 'creator', 'updater', 'product'] }));
|
|
64
|
+
return { items, total };
|
|
65
|
+
}
|
|
66
|
+
async productSet(name, context) {
|
|
67
|
+
const { domain, user } = context.state;
|
|
68
|
+
const repository = (0, typeorm_1.getRepository)(product_set_1.ProductSet);
|
|
69
|
+
return await repository.findOne({
|
|
70
|
+
where: { domain, name },
|
|
71
|
+
relations: ['domain', 'creator', 'updater']
|
|
72
|
+
});
|
|
73
|
+
}
|
|
74
|
+
async domain(productSet) {
|
|
75
|
+
return await (0, typeorm_1.getRepository)(shell_1.Domain).findOne(productSet.domainId);
|
|
76
|
+
}
|
|
77
|
+
async creator(productSet) {
|
|
78
|
+
return await (0, typeorm_1.getRepository)(auth_base_1.User).findOne(productSet.creatorId);
|
|
79
|
+
}
|
|
80
|
+
async updater(productSet) {
|
|
81
|
+
return await (0, typeorm_1.getRepository)(auth_base_1.User).findOne(productSet.updaterId);
|
|
82
|
+
}
|
|
83
|
+
};
|
|
84
|
+
__decorate([
|
|
85
|
+
(0, type_graphql_1.Directive)('@privilege(category: "order", privilege: "query")'),
|
|
86
|
+
(0, type_graphql_1.Query)(returns => product_set_types_1.ProductSetList),
|
|
87
|
+
__param(0, (0, type_graphql_1.Args)()),
|
|
88
|
+
__param(1, (0, type_graphql_1.Ctx)()),
|
|
89
|
+
__metadata("design:type", Function),
|
|
90
|
+
__metadata("design:paramtypes", [typeof (_a = typeof shell_1.ListParam !== "undefined" && shell_1.ListParam) === "function" ? _a : Object, Object]),
|
|
91
|
+
__metadata("design:returntype", Promise)
|
|
92
|
+
], ProductSetQuery.prototype, "myBizplaceProductSets", null);
|
|
93
|
+
__decorate([
|
|
94
|
+
(0, type_graphql_1.Directive)('@privilege(category: "order", privilege: "query")'),
|
|
95
|
+
(0, type_graphql_1.Query)(returns => product_set_types_1.ProductSetList),
|
|
96
|
+
__param(0, (0, type_graphql_1.Args)()),
|
|
97
|
+
__param(1, (0, type_graphql_1.Ctx)()),
|
|
98
|
+
__metadata("design:type", Function),
|
|
99
|
+
__metadata("design:paramtypes", [typeof (_b = typeof shell_1.ListParam !== "undefined" && shell_1.ListParam) === "function" ? _b : Object, Object]),
|
|
100
|
+
__metadata("design:returntype", Promise)
|
|
101
|
+
], ProductSetQuery.prototype, "productSets", null);
|
|
102
|
+
__decorate([
|
|
103
|
+
(0, type_graphql_1.Directive)('@privilege(category: "order", privilege: "query")'),
|
|
104
|
+
(0, type_graphql_1.Query)(returns => product_set_1.ProductSet),
|
|
105
|
+
__param(0, (0, type_graphql_1.Arg)('name')),
|
|
106
|
+
__param(1, (0, type_graphql_1.Ctx)()),
|
|
107
|
+
__metadata("design:type", Function),
|
|
108
|
+
__metadata("design:paramtypes", [String, Object]),
|
|
109
|
+
__metadata("design:returntype", Promise)
|
|
110
|
+
], ProductSetQuery.prototype, "productSet", null);
|
|
111
|
+
__decorate([
|
|
112
|
+
(0, type_graphql_1.FieldResolver)(type => shell_1.Domain),
|
|
113
|
+
__param(0, (0, type_graphql_1.Root)()),
|
|
114
|
+
__metadata("design:type", Function),
|
|
115
|
+
__metadata("design:paramtypes", [product_set_1.ProductSet]),
|
|
116
|
+
__metadata("design:returntype", Promise)
|
|
117
|
+
], ProductSetQuery.prototype, "domain", null);
|
|
118
|
+
__decorate([
|
|
119
|
+
(0, type_graphql_1.FieldResolver)(type => auth_base_1.User),
|
|
120
|
+
__param(0, (0, type_graphql_1.Root)()),
|
|
121
|
+
__metadata("design:type", Function),
|
|
122
|
+
__metadata("design:paramtypes", [product_set_1.ProductSet]),
|
|
123
|
+
__metadata("design:returntype", Promise)
|
|
124
|
+
], ProductSetQuery.prototype, "creator", null);
|
|
125
|
+
__decorate([
|
|
126
|
+
(0, type_graphql_1.FieldResolver)(type => auth_base_1.User),
|
|
127
|
+
__param(0, (0, type_graphql_1.Root)()),
|
|
128
|
+
__metadata("design:type", Function),
|
|
129
|
+
__metadata("design:paramtypes", [product_set_1.ProductSet]),
|
|
130
|
+
__metadata("design:returntype", Promise)
|
|
131
|
+
], ProductSetQuery.prototype, "updater", null);
|
|
132
|
+
ProductSetQuery = __decorate([
|
|
133
|
+
(0, type_graphql_1.Resolver)(product_set_1.ProductSet)
|
|
134
|
+
], ProductSetQuery);
|
|
135
|
+
exports.ProductSetQuery = ProductSetQuery;
|
|
136
|
+
//# sourceMappingURL=product-set-query.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"product-set-query.js","sourceRoot":"","sources":["../../../server/service/product-set/product-set-query.ts"],"names":[],"mappings":";;;;;;;;;;;;;;;;AAAA,yDAAgD;AAChD,uDAAsF;AACtF,iDAAwG;AACxG,+CAA8F;AAC9F,qCAAqE;AACrE,+CAA0C;AAC1C,2DAAoD;AAG7C,IAAM,eAAe,GAArB,MAAM,eAAe;IAGpB,AAAN,KAAK,CAAC,qBAAqB,CAAS,MAAiB,EAAS,OAAY;QACxE,MAAM,EAAE,MAAM,EAAE,IAAI,EAAE,GAAmC,OAAO,CAAC,KAAK,CAAA;QACtE,MAAM,EAAE,GAAmC,IAAA,uBAAa,EAAC,wBAAU,CAAC,CAAC,kBAAkB,EAAE,CAAA;QAEzF,MA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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
|
+
Object.defineProperty(exports, "__esModule", { value: true });
|
|
12
|
+
exports.ProductSetPatch = exports.ProductSetList = exports.NewProductSet = void 0;
|
|
13
|
+
const type_graphql_1 = require("type-graphql");
|
|
14
|
+
const product_set_1 = require("./product-set");
|
|
15
|
+
let NewProductSet = class NewProductSet {
|
|
16
|
+
};
|
|
17
|
+
__decorate([
|
|
18
|
+
(0, type_graphql_1.Field)(),
|
|
19
|
+
__metadata("design:type", String)
|
|
20
|
+
], NewProductSet.prototype, "name", void 0);
|
|
21
|
+
__decorate([
|
|
22
|
+
(0, type_graphql_1.Field)({ nullable: true }),
|
|
23
|
+
__metadata("design:type", String)
|
|
24
|
+
], NewProductSet.prototype, "description", void 0);
|
|
25
|
+
__decorate([
|
|
26
|
+
(0, type_graphql_1.Field)({ nullable: true }),
|
|
27
|
+
__metadata("design:type", String)
|
|
28
|
+
], NewProductSet.prototype, "status", void 0);
|
|
29
|
+
__decorate([
|
|
30
|
+
(0, type_graphql_1.Field)({ nullable: true }),
|
|
31
|
+
__metadata("design:type", String)
|
|
32
|
+
], NewProductSet.prototype, "type", void 0);
|
|
33
|
+
NewProductSet = __decorate([
|
|
34
|
+
(0, type_graphql_1.InputType)()
|
|
35
|
+
], NewProductSet);
|
|
36
|
+
exports.NewProductSet = NewProductSet;
|
|
37
|
+
let ProductSetList = class ProductSetList {
|
|
38
|
+
};
|
|
39
|
+
__decorate([
|
|
40
|
+
(0, type_graphql_1.Field)(type => [product_set_1.ProductSet], { nullable: true }),
|
|
41
|
+
__metadata("design:type", Array)
|
|
42
|
+
], ProductSetList.prototype, "items", void 0);
|
|
43
|
+
__decorate([
|
|
44
|
+
(0, type_graphql_1.Field)(type => type_graphql_1.Int, { nullable: true }),
|
|
45
|
+
__metadata("design:type", Number)
|
|
46
|
+
], ProductSetList.prototype, "total", void 0);
|
|
47
|
+
ProductSetList = __decorate([
|
|
48
|
+
(0, type_graphql_1.ObjectType)()
|
|
49
|
+
], ProductSetList);
|
|
50
|
+
exports.ProductSetList = ProductSetList;
|
|
51
|
+
let ProductSetPatch = class ProductSetPatch {
|
|
52
|
+
};
|
|
53
|
+
__decorate([
|
|
54
|
+
(0, type_graphql_1.Field)(type => type_graphql_1.ID, { nullable: true }),
|
|
55
|
+
__metadata("design:type", String)
|
|
56
|
+
], ProductSetPatch.prototype, "id", void 0);
|
|
57
|
+
__decorate([
|
|
58
|
+
(0, type_graphql_1.Field)({ nullable: true }),
|
|
59
|
+
__metadata("design:type", String)
|
|
60
|
+
], ProductSetPatch.prototype, "name", void 0);
|
|
61
|
+
__decorate([
|
|
62
|
+
(0, type_graphql_1.Field)({ nullable: true }),
|
|
63
|
+
__metadata("design:type", String)
|
|
64
|
+
], ProductSetPatch.prototype, "description", void 0);
|
|
65
|
+
__decorate([
|
|
66
|
+
(0, type_graphql_1.Field)({ nullable: true }),
|
|
67
|
+
__metadata("design:type", String)
|
|
68
|
+
], ProductSetPatch.prototype, "type", void 0);
|
|
69
|
+
__decorate([
|
|
70
|
+
(0, type_graphql_1.Field)({ nullable: true }),
|
|
71
|
+
__metadata("design:type", String)
|
|
72
|
+
], ProductSetPatch.prototype, "cuFlag", void 0);
|
|
73
|
+
ProductSetPatch = __decorate([
|
|
74
|
+
(0, type_graphql_1.InputType)()
|
|
75
|
+
], ProductSetPatch);
|
|
76
|
+
exports.ProductSetPatch = ProductSetPatch;
|
|
77
|
+
//# sourceMappingURL=product-set-types.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"product-set-types.js","sourceRoot":"","sources":["../../../server/service/product-set/product-set-types.ts"],"names":[],"mappings":";;;;;;;;;;;;AAAA,+CAAoE;AAEpE,+CAA0C;AAGnC,IAAM,aAAa,GAAnB,MAAM,aAAa;CAYzB,CAAA;AAXC;IAAC,IAAA,oBAAK,GAAE;;2CACI;AAEZ;IAAC,IAAA,oBAAK,EAAC,EAAE,QAAQ,EAAE,IAAI,EAAE,CAAC;;kDACN;AAEpB;IAAC,IAAA,oBAAK,EAAC,EAAE,QAAQ,EAAE,IAAI,EAAE,CAAC;;6CACX;AAEf;IAAC,IAAA,oBAAK,EAAC,EAAE,QAAQ,EAAE,IAAI,EAAE,CAAC;;2CACb;AAXF,aAAa;IADzB,IAAA,wBAAS,GAAE;GACC,aAAa,CAYzB;AAZY,sCAAa;AAenB,IAAM,cAAc,GAApB,MAAM,cAAc;CAM1B,CAAA;AALC;IAAC,IAAA,oBAAK,EAAC,IAAI,CAAC,EAAE,CAAC,CAAC,wBAAU,CAAC,EAAE,EAAE,QAAQ,EAAE,IAAI,EAAE,CAAC;;6CAC5B;AAEpB;IAAC,IAAA,oBAAK,EAAC,IAAI,CAAC,EAAE,CAAC,kBAAG,EAAE,EAAE,QAAQ,EAAE,IAAI,EAAE,CAAC;;6CACzB;AALH,cAAc;IAD1B,IAAA,yBAAU,GAAE;GACA,cAAc,CAM1B;AANY,wCAAc;AASpB,IAAM,eAAe,GAArB,MAAM,eAAe;CAe3B,CAAA;AAdC;IAAC,IAAA,oBAAK,EAAC,IAAI,CAAC,EAAE,CAAC,iBAAE,EAAE,EAAE,QAAQ,EAAE,IAAI,EAAE,CAAC;;2CAC3B;AAEX;IAAC,IAAA,oBAAK,EAAC,EAAE,QAAQ,EAAE,IAAI,EAAE,CAAC;;6CACb;AAEb;IAAC,IAAA,oBAAK,EAAC,EAAE,QAAQ,EAAE,IAAI,EAAE,CAAC;;oDACN;AAEpB;IAAC,IAAA,oBAAK,EAAC,EAAE,QAAQ,EAAE,IAAI,EAAE,CAAC;;6CACb;AAEb;IAAC,IAAA,oBAAK,EAAC,EAAE,QAAQ,EAAE,IAAI,EAAE,CAAC;;+CACX;AAdJ,eAAe;IAD3B,IAAA,wBAAS,GAAE;GACC,eAAe,CAe3B;AAfY,0CAAe"}
|
|
@@ -0,0 +1,118 @@
|
|
|
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, _d;
|
|
12
|
+
Object.defineProperty(exports, "__esModule", { value: true });
|
|
13
|
+
exports.ProductSet = void 0;
|
|
14
|
+
const auth_base_1 = require("@things-factory/auth-base");
|
|
15
|
+
const biz_base_1 = require("@things-factory/biz-base");
|
|
16
|
+
const shell_1 = require("@things-factory/shell");
|
|
17
|
+
const type_graphql_1 = require("type-graphql");
|
|
18
|
+
const typeorm_1 = require("typeorm");
|
|
19
|
+
const product_1 = require("../product/product");
|
|
20
|
+
let ProductSet = class ProductSet {
|
|
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
|
+
], ProductSet.prototype, "id", void 0);
|
|
27
|
+
__decorate([
|
|
28
|
+
(0, typeorm_1.ManyToOne)(type => shell_1.Domain),
|
|
29
|
+
(0, type_graphql_1.Field)(),
|
|
30
|
+
__metadata("design:type", typeof (_a = typeof shell_1.Domain !== "undefined" && shell_1.Domain) === "function" ? _a : Object)
|
|
31
|
+
], ProductSet.prototype, "domain", void 0);
|
|
32
|
+
__decorate([
|
|
33
|
+
(0, typeorm_1.RelationId)((productSet) => productSet.domain),
|
|
34
|
+
__metadata("design:type", String)
|
|
35
|
+
], ProductSet.prototype, "domainId", void 0);
|
|
36
|
+
__decorate([
|
|
37
|
+
(0, typeorm_1.ManyToOne)(type => biz_base_1.Bizplace, {
|
|
38
|
+
nullable: false
|
|
39
|
+
}),
|
|
40
|
+
(0, type_graphql_1.Field)({ nullable: true }),
|
|
41
|
+
__metadata("design:type", typeof (_b = typeof biz_base_1.Bizplace !== "undefined" && biz_base_1.Bizplace) === "function" ? _b : Object)
|
|
42
|
+
], ProductSet.prototype, "bizplace", void 0);
|
|
43
|
+
__decorate([
|
|
44
|
+
(0, typeorm_1.Column)({ nullable: true }),
|
|
45
|
+
(0, type_graphql_1.Field)({ nullable: true }),
|
|
46
|
+
__metadata("design:type", String)
|
|
47
|
+
], ProductSet.prototype, "code", void 0);
|
|
48
|
+
__decorate([
|
|
49
|
+
(0, typeorm_1.Column)(),
|
|
50
|
+
(0, type_graphql_1.Field)(),
|
|
51
|
+
__metadata("design:type", String)
|
|
52
|
+
], ProductSet.prototype, "name", void 0);
|
|
53
|
+
__decorate([
|
|
54
|
+
(0, typeorm_1.Column)({
|
|
55
|
+
nullable: true
|
|
56
|
+
}),
|
|
57
|
+
(0, type_graphql_1.Field)({ nullable: true }),
|
|
58
|
+
__metadata("design:type", String)
|
|
59
|
+
], ProductSet.prototype, "description", void 0);
|
|
60
|
+
__decorate([
|
|
61
|
+
(0, typeorm_1.OneToMany)(type => product_1.Product, product => product.productSet, {
|
|
62
|
+
nullable: true
|
|
63
|
+
}),
|
|
64
|
+
(0, type_graphql_1.Field)(type => [product_1.Product], { nullable: true }),
|
|
65
|
+
__metadata("design:type", Array)
|
|
66
|
+
], ProductSet.prototype, "product", void 0);
|
|
67
|
+
__decorate([
|
|
68
|
+
(0, typeorm_1.Column)({
|
|
69
|
+
nullable: true,
|
|
70
|
+
default: 'ACTIVE'
|
|
71
|
+
}),
|
|
72
|
+
(0, type_graphql_1.Field)({ nullable: true }),
|
|
73
|
+
__metadata("design:type", String)
|
|
74
|
+
], ProductSet.prototype, "status", void 0);
|
|
75
|
+
__decorate([
|
|
76
|
+
(0, typeorm_1.Column)(),
|
|
77
|
+
(0, type_graphql_1.Field)(),
|
|
78
|
+
__metadata("design:type", String)
|
|
79
|
+
], ProductSet.prototype, "type", void 0);
|
|
80
|
+
__decorate([
|
|
81
|
+
(0, typeorm_1.CreateDateColumn)(),
|
|
82
|
+
(0, type_graphql_1.Field)({ nullable: true }),
|
|
83
|
+
__metadata("design:type", Date)
|
|
84
|
+
], ProductSet.prototype, "createdAt", void 0);
|
|
85
|
+
__decorate([
|
|
86
|
+
(0, typeorm_1.UpdateDateColumn)(),
|
|
87
|
+
(0, type_graphql_1.Field)({ nullable: true }),
|
|
88
|
+
__metadata("design:type", Date)
|
|
89
|
+
], ProductSet.prototype, "updatedAt", void 0);
|
|
90
|
+
__decorate([
|
|
91
|
+
(0, typeorm_1.ManyToOne)(type => auth_base_1.User, {
|
|
92
|
+
nullable: true
|
|
93
|
+
}),
|
|
94
|
+
(0, type_graphql_1.Field)({ nullable: true }),
|
|
95
|
+
__metadata("design:type", typeof (_c = typeof auth_base_1.User !== "undefined" && auth_base_1.User) === "function" ? _c : Object)
|
|
96
|
+
], ProductSet.prototype, "creator", void 0);
|
|
97
|
+
__decorate([
|
|
98
|
+
(0, typeorm_1.RelationId)((productSet) => productSet.creator),
|
|
99
|
+
__metadata("design:type", String)
|
|
100
|
+
], ProductSet.prototype, "creatorId", void 0);
|
|
101
|
+
__decorate([
|
|
102
|
+
(0, typeorm_1.ManyToOne)(type => auth_base_1.User, {
|
|
103
|
+
nullable: true
|
|
104
|
+
}),
|
|
105
|
+
(0, type_graphql_1.Field)({ nullable: true }),
|
|
106
|
+
__metadata("design:type", typeof (_d = typeof auth_base_1.User !== "undefined" && auth_base_1.User) === "function" ? _d : Object)
|
|
107
|
+
], ProductSet.prototype, "updater", void 0);
|
|
108
|
+
__decorate([
|
|
109
|
+
(0, typeorm_1.RelationId)((productSet) => productSet.updater),
|
|
110
|
+
__metadata("design:type", String)
|
|
111
|
+
], ProductSet.prototype, "updaterId", void 0);
|
|
112
|
+
ProductSet = __decorate([
|
|
113
|
+
(0, typeorm_1.Entity)(),
|
|
114
|
+
(0, typeorm_1.Index)('ix_product_set_0', (productSet) => [productSet.bizplace, productSet.name], { unique: true }),
|
|
115
|
+
(0, type_graphql_1.ObjectType)()
|
|
116
|
+
], ProductSet);
|
|
117
|
+
exports.ProductSet = ProductSet;
|
|
118
|
+
//# sourceMappingURL=product-set.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"product-set.js","sourceRoot":"","sources":["../../../server/service/product-set/product-set.ts"],"names":[],"mappings":";;;;;;;;;;;;;AAAA,yDAAgD;AAChD,uDAAmD;AACnD,iDAA8C;AAC9C,+CAAoD;AACpD,qCAUgB;AAChB,gDAA4C;AAKrC,IAAM,UAAU,GAAhB,MAAM,UAAU;CA0EtB,CAAA;AAzEC;IAAC,IAAA,gCAAsB,EAAC,MAAM,CAAC;IAC9B,IAAA,oBAAK,EAAC,IAAI,CAAC,EAAE,CAAC,iBAAE,CAAC;;sCACC;AAEnB;IAAC,IAAA,mBAAS,EAAC,IAAI,CAAC,EAAE,CAAC,cAAM,CAAC;IACzB,IAAA,oBAAK,GAAE;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C,EAAE,QAAQ,EAAE,IAAI,EAAE,CAAC;8BACf,IAAI;6CAAA;AAEf;IAAC,IAAA,0BAAgB,GAAE;IAClB,IAAA,oBAAK,EAAC,EAAE,QAAQ,EAAE,IAAI,EAAE,CAAC;8BACf,IAAI;6CAAA;AAEf;IAAC,IAAA,mBAAS,EAAC,IAAI,CAAC,EAAE,CAAC,gBAAI,EAAE;QACvB,QAAQ,EAAE,IAAI;KACf,CAAC;IACD,IAAA,oBAAK,EAAC,EAAE,QAAQ,EAAE,IAAI,EAAE,CAAC;kDACjB,gBAAI,oBAAJ,gBAAI;2CAAA;AAEb;IAAC,IAAA,oBAAU,EAAC,CAAC,UAAsB,EAAE,EAAE,CAAC,UAAU,CAAC,OAAO,CAAC;;6CAC1C;AAEjB;IAAC,IAAA,mBAAS,EAAC,IAAI,CAAC,EAAE,CAAC,gBAAI,EAAE;QACvB,QAAQ,EAAE,IAAI;KACf,CAAC;IACD,IAAA,oBAAK,EAAC,EAAE,QAAQ,EAAE,IAAI,EAAE,CAAC;kDACjB,gBAAI,oBAAJ,gBAAI;2CAAA;AAEb;IAAC,IAAA,oBAAU,EAAC,CAAC,UAAsB,EAAE,EAAE,CAAC,UAAU,CAAC,OAAO,CAAC;;6CAC1C;AAzEN,UAAU;IAHtB,IAAA,gBAAM,GAAE;IACR,IAAA,eAAK,EAAC,kBAAkB,EAAE,CAAC,UAAsB,EAAE,EAAE,CAAC,CAAC,UAAU,CAAC,QAAQ,EAAE,UAAU,CAAC,IAAI,CAAC,EAAE,EAAE,MAAM,EAAE,IAAI,EAAE,CAAC;IAC/G,IAAA,yBAAU,GAAE;GACA,UAAU,CA0EtB;AA1EY,gCAAU"}
|
|
@@ -0,0 +1,18 @@
|
|
|
1
|
+
"use strict";
|
|
2
|
+
var __createBinding = (this && this.__createBinding) || (Object.create ? (function(o, m, k, k2) {
|
|
3
|
+
if (k2 === undefined) k2 = k;
|
|
4
|
+
var desc = Object.getOwnPropertyDescriptor(m, k);
|
|
5
|
+
if (!desc || ("get" in desc ? !m.__esModule : desc.writable || desc.configurable)) {
|
|
6
|
+
desc = { enumerable: true, get: function() { return m[k]; } };
|
|
7
|
+
}
|
|
8
|
+
Object.defineProperty(o, k2, desc);
|
|
9
|
+
}) : (function(o, m, k, k2) {
|
|
10
|
+
if (k2 === undefined) k2 = k;
|
|
11
|
+
o[k2] = m[k];
|
|
12
|
+
}));
|
|
13
|
+
var __exportStar = (this && this.__exportStar) || function(m, exports) {
|
|
14
|
+
for (var p in m) if (p !== "default" && !Object.prototype.hasOwnProperty.call(exports, p)) __createBinding(exports, m, p);
|
|
15
|
+
};
|
|
16
|
+
Object.defineProperty(exports, "__esModule", { value: true });
|
|
17
|
+
__exportStar(require("./product-util"), exports);
|
|
18
|
+
//# sourceMappingURL=index.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"index.js","sourceRoot":"","sources":["../../server/utils/index.ts"],"names":[],"mappings":";;;;;;;;;;;;;;;;AAAA,iDAA8B"}
|
|
@@ -0,0 +1,16 @@
|
|
|
1
|
+
"use strict";
|
|
2
|
+
Object.defineProperty(exports, "__esModule", { value: true });
|
|
3
|
+
exports.ProductUtil = void 0;
|
|
4
|
+
class ProductUtil {
|
|
5
|
+
static productSetCode() {
|
|
6
|
+
return 'PS' + generateRandomString(10);
|
|
7
|
+
}
|
|
8
|
+
}
|
|
9
|
+
exports.ProductUtil = ProductUtil;
|
|
10
|
+
const generateRandomString = function (length, randomString = '') {
|
|
11
|
+
randomString += Math.random().toString(20).substr(2, length);
|
|
12
|
+
if (randomString.length > length)
|
|
13
|
+
return randomString.slice(0, length);
|
|
14
|
+
return generateRandomString(length, randomString);
|
|
15
|
+
};
|
|
16
|
+
//# sourceMappingURL=product-util.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"product-util.js","sourceRoot":"","sources":["../../server/utils/product-util.ts"],"names":[],"mappings":";;;AAAA,MAAa,WAAW;IACtB,MAAM,CAAC,cAAc;QACnB,OAAO,IAAI,GAAG,oBAAoB,CAAC,EAAE,CAAC,CAAA;IACxC,CAAC;CACF;AAJD,kCAIC;AAED,MAAM,oBAAoB,GAAG,UAAU,MAAM,EAAE,YAAY,GAAG,EAAE;IAC9D,YAAY,IAAI,IAAI,CAAC,MAAM,EAAE,CAAC,QAAQ,CAAC,EAAE,CAAC,CAAC,MAAM,CAAC,CAAC,EAAE,MAAM,CAAC,CAAA;IAC5D,IAAI,YAAY,CAAC,MAAM,GAAG,MAAM;QAAE,OAAO,YAAY,CAAC,KAAK,CAAC,CAAC,EAAE,MAAM,CAAC,CAAA;IACtE,OAAO,oBAAoB,CAAC,MAAM,EAAE,YAAY,CAAC,CAAA;AACnD,CAAC,CAAA"}
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@things-factory/product-base",
|
|
3
|
-
"version": "4.3.
|
|
3
|
+
"version": "4.3.673",
|
|
4
4
|
"main": "dist-server/index.js",
|
|
5
5
|
"browser": "client/index.js",
|
|
6
6
|
"things-factory": true,
|
|
@@ -23,8 +23,8 @@
|
|
|
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": "^4.3.
|
|
27
|
-
"@things-factory/routing-base": "^4.3.
|
|
26
|
+
"@things-factory/biz-base": "^4.3.673",
|
|
27
|
+
"@things-factory/routing-base": "^4.3.673"
|
|
28
28
|
},
|
|
29
|
-
"gitHead": "
|
|
29
|
+
"gitHead": "d22f985380f3af2ebc0f81ea8bec478ba00b4777"
|
|
30
30
|
}
|