@things-factory/product-base 5.0.1 → 5.0.11
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 +2 -15
- package/dist-server/constants/index.js.map +1 -1
- package/dist-server/constants/product.js.map +1 -1
- package/dist-server/controllers/index.js.map +1 -1
- package/dist-server/index.js +3 -16
- 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 +17 -30
- package/dist-server/service/index.js.map +1 -1
- package/dist-server/service/product/index.js.map +1 -1
- package/dist-server/service/product/product-mutation.js +61 -73
- package/dist-server/service/product/product-mutation.js.map +1 -1
- package/dist-server/service/product/product-query.js +78 -89
- package/dist-server/service/product/product-query.js.map +1 -1
- package/dist-server/service/product/product-types.js +261 -272
- package/dist-server/service/product/product-types.js.map +1 -1
- package/dist-server/service/product/product.js +179 -187
- package/dist-server/service/product/product.js.map +1 -1
- package/dist-server/service/product/validate-product.js +2 -4
- package/dist-server/service/product/validate-product.js.map +1 -1
- package/dist-server/service/product-bundle/index.js.map +1 -1
- package/dist-server/service/product-bundle/product-bundle-mutation.js +33 -44
- package/dist-server/service/product-bundle/product-bundle-mutation.js.map +1 -1
- package/dist-server/service/product-bundle/product-bundle-query.js +35 -46
- package/dist-server/service/product-bundle/product-bundle-query.js.map +1 -1
- package/dist-server/service/product-bundle/product-bundle-types.js +30 -38
- package/dist-server/service/product-bundle/product-bundle-types.js.map +1 -1
- package/dist-server/service/product-bundle/product-bundle.js +40 -48
- package/dist-server/service/product-bundle/product-bundle.js.map +1 -1
- package/dist-server/service/product-bundle-setting/index.js.map +1 -1
- package/dist-server/service/product-bundle-setting/product-bundle-setting-mutation.js +27 -38
- package/dist-server/service/product-bundle-setting/product-bundle-setting-mutation.js.map +1 -1
- package/dist-server/service/product-bundle-setting/product-bundle-setting-query.js +14 -25
- package/dist-server/service/product-bundle-setting/product-bundle-setting-query.js.map +1 -1
- package/dist-server/service/product-bundle-setting/product-bundle-setting-types.js +23 -31
- package/dist-server/service/product-bundle-setting/product-bundle-setting-types.js.map +1 -1
- package/dist-server/service/product-bundle-setting/product-bundle-setting.js +16 -24
- package/dist-server/service/product-bundle-setting/product-bundle-setting.js.map +1 -1
- package/dist-server/service/product-combination/index.js.map +1 -1
- package/dist-server/service/product-combination/product-combination-mutation.js +34 -45
- package/dist-server/service/product-combination/product-combination-mutation.js.map +1 -1
- package/dist-server/service/product-combination/product-combination-query.js +29 -40
- package/dist-server/service/product-combination/product-combination-query.js.map +1 -1
- package/dist-server/service/product-combination/product-combination-type.js +28 -36
- package/dist-server/service/product-combination/product-combination-type.js.map +1 -1
- package/dist-server/service/product-combination/product-combination.js +42 -50
- package/dist-server/service/product-combination/product-combination.js.map +1 -1
- package/dist-server/service/product-combination-setting/index.js.map +1 -1
- package/dist-server/service/product-combination-setting/product-combination-setting-mutation.js +40 -51
- package/dist-server/service/product-combination-setting/product-combination-setting-mutation.js.map +1 -1
- package/dist-server/service/product-combination-setting/product-combination-setting-query.js +35 -46
- package/dist-server/service/product-combination-setting/product-combination-setting-query.js.map +1 -1
- package/dist-server/service/product-combination-setting/product-combination-setting-type.js +24 -32
- package/dist-server/service/product-combination-setting/product-combination-setting-type.js.map +1 -1
- package/dist-server/service/product-combination-setting/product-combination-setting.js +36 -44
- package/dist-server/service/product-combination-setting/product-combination-setting.js.map +1 -1
- package/dist-server/service/product-detail/index.js.map +1 -1
- package/dist-server/service/product-detail/product-detail-mutation.js +30 -51
- package/dist-server/service/product-detail/product-detail-mutation.js.map +1 -1
- package/dist-server/service/product-detail/product-detail-query.js +33 -44
- package/dist-server/service/product-detail/product-detail-query.js.map +1 -1
- package/dist-server/service/product-detail/product-detail-types.js +180 -188
- package/dist-server/service/product-detail/product-detail-types.js.map +1 -1
- package/dist-server/service/product-detail/product-detail.js +127 -135
- package/dist-server/service/product-detail/product-detail.js.map +1 -1
- package/dist-server/service/product-detail-bizplace-setting/index.js.map +1 -1
- package/dist-server/service/product-detail-bizplace-setting/product-detail-bizplace-setting-mutation.js +28 -39
- package/dist-server/service/product-detail-bizplace-setting/product-detail-bizplace-setting-mutation.js.map +1 -1
- package/dist-server/service/product-detail-bizplace-setting/product-detail-bizplace-setting-query.js +29 -40
- package/dist-server/service/product-detail-bizplace-setting/product-detail-bizplace-setting-query.js.map +1 -1
- package/dist-server/service/product-detail-bizplace-setting/product-detail-bizplace-setting-types.js +36 -44
- package/dist-server/service/product-detail-bizplace-setting/product-detail-bizplace-setting-types.js.map +1 -1
- package/dist-server/service/product-detail-bizplace-setting/product-detail-bizplace-setting.js +32 -40
- package/dist-server/service/product-detail-bizplace-setting/product-detail-bizplace-setting.js.map +1 -1
- package/dist-server/service/product-set/index.js.map +1 -1
- package/dist-server/service/product-set/product-set-mutation.js +33 -44
- package/dist-server/service/product-set/product-set-mutation.js.map +1 -1
- package/dist-server/service/product-set/product-set-query.js +35 -46
- package/dist-server/service/product-set/product-set-query.js.map +1 -1
- package/dist-server/service/product-set/product-set-types.js +26 -34
- package/dist-server/service/product-set/product-set-types.js.map +1 -1
- package/dist-server/service/product-set/product-set.js +34 -42
- package/dist-server/service/product-set/product-set.js.map +1 -1
- package/dist-server/tsconfig.tsbuildinfo +1 -0
- package/dist-server/utils/index.js +2 -15
- package/dist-server/utils/index.js.map +1 -1
- package/dist-server/utils/product-util.js.map +1 -1
- package/package.json +4 -4
- package/server/service/product/product-mutation.ts +2 -0
- package/server/service/product/product-query.ts +1 -1
- package/server/service/product/product.ts +2 -2
|
@@ -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, _b;
|
|
15
3
|
Object.defineProperty(exports, "__esModule", { value: true });
|
|
16
4
|
exports.ProductSetQuery = 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");
|
|
@@ -81,55 +70,55 @@ let ProductSetQuery = class ProductSetQuery {
|
|
|
81
70
|
return await (0, typeorm_1.getRepository)(auth_base_1.User).findOne(productSet.updaterId);
|
|
82
71
|
}
|
|
83
72
|
};
|
|
84
|
-
__decorate([
|
|
73
|
+
tslib_1.__decorate([
|
|
85
74
|
(0, type_graphql_1.Directive)('@privilege(category: "order", privilege: "query")'),
|
|
86
75
|
(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)
|
|
76
|
+
tslib_1.__param(0, (0, type_graphql_1.Args)()),
|
|
77
|
+
tslib_1.__param(1, (0, type_graphql_1.Ctx)()),
|
|
78
|
+
tslib_1.__metadata("design:type", Function),
|
|
79
|
+
tslib_1.__metadata("design:paramtypes", [typeof (_a = typeof shell_1.ListParam !== "undefined" && shell_1.ListParam) === "function" ? _a : Object, Object]),
|
|
80
|
+
tslib_1.__metadata("design:returntype", Promise)
|
|
92
81
|
], ProductSetQuery.prototype, "myBizplaceProductSets", null);
|
|
93
|
-
__decorate([
|
|
82
|
+
tslib_1.__decorate([
|
|
94
83
|
(0, type_graphql_1.Directive)('@privilege(category: "order", privilege: "query")'),
|
|
95
84
|
(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)
|
|
85
|
+
tslib_1.__param(0, (0, type_graphql_1.Args)()),
|
|
86
|
+
tslib_1.__param(1, (0, type_graphql_1.Ctx)()),
|
|
87
|
+
tslib_1.__metadata("design:type", Function),
|
|
88
|
+
tslib_1.__metadata("design:paramtypes", [typeof (_b = typeof shell_1.ListParam !== "undefined" && shell_1.ListParam) === "function" ? _b : Object, Object]),
|
|
89
|
+
tslib_1.__metadata("design:returntype", Promise)
|
|
101
90
|
], ProductSetQuery.prototype, "productSets", null);
|
|
102
|
-
__decorate([
|
|
91
|
+
tslib_1.__decorate([
|
|
103
92
|
(0, type_graphql_1.Directive)('@privilege(category: "order", privilege: "query")'),
|
|
104
93
|
(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)
|
|
94
|
+
tslib_1.__param(0, (0, type_graphql_1.Arg)('name')),
|
|
95
|
+
tslib_1.__param(1, (0, type_graphql_1.Ctx)()),
|
|
96
|
+
tslib_1.__metadata("design:type", Function),
|
|
97
|
+
tslib_1.__metadata("design:paramtypes", [String, Object]),
|
|
98
|
+
tslib_1.__metadata("design:returntype", Promise)
|
|
110
99
|
], ProductSetQuery.prototype, "productSet", null);
|
|
111
|
-
__decorate([
|
|
100
|
+
tslib_1.__decorate([
|
|
112
101
|
(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)
|
|
102
|
+
tslib_1.__param(0, (0, type_graphql_1.Root)()),
|
|
103
|
+
tslib_1.__metadata("design:type", Function),
|
|
104
|
+
tslib_1.__metadata("design:paramtypes", [product_set_1.ProductSet]),
|
|
105
|
+
tslib_1.__metadata("design:returntype", Promise)
|
|
117
106
|
], ProductSetQuery.prototype, "domain", null);
|
|
118
|
-
__decorate([
|
|
107
|
+
tslib_1.__decorate([
|
|
119
108
|
(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)
|
|
109
|
+
tslib_1.__param(0, (0, type_graphql_1.Root)()),
|
|
110
|
+
tslib_1.__metadata("design:type", Function),
|
|
111
|
+
tslib_1.__metadata("design:paramtypes", [product_set_1.ProductSet]),
|
|
112
|
+
tslib_1.__metadata("design:returntype", Promise)
|
|
124
113
|
], ProductSetQuery.prototype, "creator", null);
|
|
125
|
-
__decorate([
|
|
114
|
+
tslib_1.__decorate([
|
|
126
115
|
(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)
|
|
116
|
+
tslib_1.__param(0, (0, type_graphql_1.Root)()),
|
|
117
|
+
tslib_1.__metadata("design:type", Function),
|
|
118
|
+
tslib_1.__metadata("design:paramtypes", [product_set_1.ProductSet]),
|
|
119
|
+
tslib_1.__metadata("design:returntype", Promise)
|
|
131
120
|
], ProductSetQuery.prototype, "updater", null);
|
|
132
|
-
ProductSetQuery = __decorate([
|
|
121
|
+
ProductSetQuery = tslib_1.__decorate([
|
|
133
122
|
(0, type_graphql_1.Resolver)(product_set_1.ProductSet)
|
|
134
123
|
], ProductSetQuery);
|
|
135
124
|
exports.ProductSetQuery = ProductSetQuery;
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"product-set-query.js","sourceRoot":"","sources":["../../../server/service/product-set/product-set-query.ts"],"names":[],"mappings":"
|
|
1
|
+
{"version":3,"file":"product-set-query.js","sourceRoot":"","sources":["../../../server/service/product-set/product-set-query.ts"],"names":[],"mappings":";;;;;AAAA,+CAA8F;AAC9F,qCAAqE;AAErE,yDAAgD;AAChD,uDAAsF;AACtF,iDAAwG;AAExG,+CAA0C;AAC1C,2DAAoD;AAGpD,IAAa,eAAe,GAA5B,MAAa,eAAe;IAG1B,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,MAAM,cAAc,GAAG,MAAM,CAAC,OAAO,CAAC,MAAM,CAAC,CAAC,CAAC,EAAE,CAAC,CAAC,CAAC,IAAI,IAAI,kBAAkB,CAAC,CA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,IAAA,mBAAI,GAAE,CAAA;IAAqB,mBAAA,IAAA,kBAAG,GAAE,CAAA;;iEAAjB,iBAAS,oBAAT,iBAAS;;4DA2CpD;AAID;IAFC,IAAA,wBAAS,EAAC,mDAAmD,CAAC;IAC9D,IAAA,oBAAK,EAAC,OAAO,CAAC,EAAE,CAAC,kCAAc,CAAC;IACd,mBAAA,IAAA,mBAAI,GAAE,CAAA;IAAqB,mBAAA,IAAA,kBAAG,GAAE,CAAA;;iEAAjB,iBAAS,oBAAT,iBAAS;;kDAkB1C;AAID;IAFC,IAAA,wBAAS,EAAC,mDAAmD,CAAC;IAC9D,IAAA,oBAAK,EAAC,OAAO,CAAC,EAAE,CAAC,wBAAU,CAAC;IACX,mBAAA,IAAA,kBAAG,EAAC,MAAM,CAAC,CAAA;IAAgB,mBAAA,IAAA,kBAAG,GAAE,CAAA;;;;iDAQjD;AAGD;IADC,IAAA,4BAAa,EAAC,IAAI,CAAC,EAAE,CAAC,cAAM,CAAC;IAChB,mBAAA,IAAA,mBAAI,GAAE,CAAA;;6CAAa,wBAAU;;6CAE1C;AAGD;IADC,IAAA,4BAAa,EAAC,IAAI,CAAC,EAAE,CAAC,gBAAI,CAAC;IACb,mBAAA,IAAA,mBAAI,GAAE,CAAA;;6CAAa,wBAAU;;8CAE3C;AAGD;IADC,IAAA,4BAAa,EAAC,IAAI,CAAC,EAAE,CAAC,gBAAI,CAAC;IACb,mBAAA,IAAA,mBAAI,GAAE,CAAA;;6CAAa,wBAAU;;8CAE3C;AA/FU,eAAe;IAD3B,IAAA,uBAAQ,EAAC,wBAAU,CAAC;GACR,eAAe,CAgG3B;AAhGY,0CAAe","sourcesContent":["import { Arg, Args, Ctx, Directive, FieldResolver, Query, Resolver, Root } from 'type-graphql'\nimport { Brackets, getRepository, SelectQueryBuilder } from 'typeorm'\n\nimport { User } from '@things-factory/auth-base'\nimport { Bizplace, getCompanyBizplace, getMyBizplace } from '@things-factory/biz-base'\nimport { buildCondition, buildQuery, convertListParams, Domain, ListParam } from '@things-factory/shell'\n\nimport { ProductSet } from './product-set'\nimport { ProductSetList } from './product-set-types'\n\n@Resolver(ProductSet)\nexport class ProductSetQuery {\n @Directive('@privilege(category: \"order\", privilege: \"query\")')\n @Query(returns => ProductSetList)\n async myBizplaceProductSets(@Args() params: ListParam, @Ctx() context: any): Promise<ProductSetList> {\n const { domain, user }: { domain: Domain; user: User } = context.state\n const qb: SelectQueryBuilder<ProductSet> = getRepository(ProductSet).createQueryBuilder()\n\n const productFilters = params.filters.filter(x => x.name == 'product_set_info')\n const filters = params.filters.filter(x => x.name != 'product_set_info')\n const productFilterColumns = ['name', 'description']\n\n if (!params.filters.find(filter => filter.name === 'bizplace_id')) {\n const companyBizplace: Bizplace = await getCompanyBizplace(domain, user)\n const myBizplace: Bizplace = await getMyBizplace(domain, user)\n params.filters = [...filters, { name: 'bizplace_id', operator: 'in', value: [companyBizplace.id, myBizplace.id] }]\n }\n\n buildQuery(qb, params, context, { domainRef: false })\n if (productFilters && productFilters.length > 0) {\n let productInfo = productFilters[0]\n qb.andWhere(\n new Brackets(qb2 => {\n productFilterColumns.forEach(filter => {\n const condition = buildCondition(\n qb.alias,\n filter,\n productInfo.operator,\n productInfo.value,\n productInfo.relation,\n Object.keys(qb.getParameters()).length\n )\n\n qb2.orWhere(condition.clause, condition.parameters)\n })\n })\n )\n }\n\n const [items, total] = await qb\n .leftJoinAndSelect('ProductSet.bizplace', 'Bizplace')\n .leftJoinAndSelect('ProductSet.creator', 'Creator')\n .leftJoinAndSelect('ProductSet.updater', 'Updater')\n .leftJoinAndSelect('ProductSet.product', 'Product')\n .getManyAndCount()\n\n return { items, total }\n }\n\n @Directive('@privilege(category: \"order\", privilege: \"query\")')\n @Query(returns => ProductSetList)\n async productSets(@Args() params: ListParam, @Ctx() context: any): Promise<ProductSetList> {\n const { domain, user }: { domain: Domain; user: User } = context.state\n\n if (!params.filters.find((filter: any) => filter.name === 'bizplace_id')) {\n let bizplaceFilter = params.filters.find((filter: any) => filter.name === 'bizplace_id')\n const companyBizplace: Bizplace = await getCompanyBizplace(domain, user)\n const myBizplace: Bizplace = await getMyBizplace(domain, user)\n\n bizplaceFilter = { name: 'bizplace_id', operator: 'in', value: [companyBizplace.id, myBizplace.id] }\n }\n\n const convertedParams = convertListParams(params)\n const [items, total] = await getRepository(ProductSet).findAndCount({\n ...convertedParams,\n relations: ['domain', 'creator', 'updater', 'product']\n })\n\n return { items, total }\n }\n\n @Directive('@privilege(category: \"order\", privilege: \"query\")')\n @Query(returns => ProductSet)\n async productSet(@Arg('name') name: string, @Ctx() context: any): Promise<ProductSet> {\n const { domain, user }: { domain: Domain; user: User } = context.state\n const repository = getRepository(ProductSet)\n\n return await repository.findOne({\n where: { domain, name },\n relations: ['domain', 'creator', 'updater']\n })\n }\n\n @FieldResolver(type => Domain)\n async domain(@Root() productSet: ProductSet): Promise<Domain> {\n return await getRepository(Domain).findOne(productSet.domainId)\n }\n\n @FieldResolver(type => User)\n async creator(@Root() productSet: ProductSet): Promise<User> {\n return await getRepository(User).findOne(productSet.creatorId)\n }\n\n @FieldResolver(type => User)\n async updater(@Root() productSet: ProductSet): Promise<User> {\n return await getRepository(User).findOne(productSet.updaterId)\n }\n}\n"]}
|
|
@@ -1,76 +1,68 @@
|
|
|
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.ProductSetPatch = exports.ProductSetList = exports.NewProductSet = void 0;
|
|
4
|
+
const tslib_1 = require("tslib");
|
|
13
5
|
const type_graphql_1 = require("type-graphql");
|
|
14
6
|
const product_set_1 = require("./product-set");
|
|
15
7
|
let NewProductSet = class NewProductSet {
|
|
16
8
|
};
|
|
17
|
-
__decorate([
|
|
9
|
+
tslib_1.__decorate([
|
|
18
10
|
(0, type_graphql_1.Field)(),
|
|
19
|
-
__metadata("design:type", String)
|
|
11
|
+
tslib_1.__metadata("design:type", String)
|
|
20
12
|
], NewProductSet.prototype, "name", void 0);
|
|
21
|
-
__decorate([
|
|
13
|
+
tslib_1.__decorate([
|
|
22
14
|
(0, type_graphql_1.Field)({ nullable: true }),
|
|
23
|
-
__metadata("design:type", String)
|
|
15
|
+
tslib_1.__metadata("design:type", String)
|
|
24
16
|
], NewProductSet.prototype, "description", void 0);
|
|
25
|
-
__decorate([
|
|
17
|
+
tslib_1.__decorate([
|
|
26
18
|
(0, type_graphql_1.Field)({ nullable: true }),
|
|
27
|
-
__metadata("design:type", String)
|
|
19
|
+
tslib_1.__metadata("design:type", String)
|
|
28
20
|
], NewProductSet.prototype, "status", void 0);
|
|
29
|
-
__decorate([
|
|
21
|
+
tslib_1.__decorate([
|
|
30
22
|
(0, type_graphql_1.Field)({ nullable: true }),
|
|
31
|
-
__metadata("design:type", String)
|
|
23
|
+
tslib_1.__metadata("design:type", String)
|
|
32
24
|
], NewProductSet.prototype, "type", void 0);
|
|
33
|
-
NewProductSet = __decorate([
|
|
25
|
+
NewProductSet = tslib_1.__decorate([
|
|
34
26
|
(0, type_graphql_1.InputType)()
|
|
35
27
|
], NewProductSet);
|
|
36
28
|
exports.NewProductSet = NewProductSet;
|
|
37
29
|
let ProductSetList = class ProductSetList {
|
|
38
30
|
};
|
|
39
|
-
__decorate([
|
|
31
|
+
tslib_1.__decorate([
|
|
40
32
|
(0, type_graphql_1.Field)(type => [product_set_1.ProductSet], { nullable: true }),
|
|
41
|
-
__metadata("design:type", Array)
|
|
33
|
+
tslib_1.__metadata("design:type", Array)
|
|
42
34
|
], ProductSetList.prototype, "items", void 0);
|
|
43
|
-
__decorate([
|
|
35
|
+
tslib_1.__decorate([
|
|
44
36
|
(0, type_graphql_1.Field)(type => type_graphql_1.Int, { nullable: true }),
|
|
45
|
-
__metadata("design:type", Number)
|
|
37
|
+
tslib_1.__metadata("design:type", Number)
|
|
46
38
|
], ProductSetList.prototype, "total", void 0);
|
|
47
|
-
ProductSetList = __decorate([
|
|
39
|
+
ProductSetList = tslib_1.__decorate([
|
|
48
40
|
(0, type_graphql_1.ObjectType)()
|
|
49
41
|
], ProductSetList);
|
|
50
42
|
exports.ProductSetList = ProductSetList;
|
|
51
43
|
let ProductSetPatch = class ProductSetPatch {
|
|
52
44
|
};
|
|
53
|
-
__decorate([
|
|
45
|
+
tslib_1.__decorate([
|
|
54
46
|
(0, type_graphql_1.Field)(type => type_graphql_1.ID, { nullable: true }),
|
|
55
|
-
__metadata("design:type", String)
|
|
47
|
+
tslib_1.__metadata("design:type", String)
|
|
56
48
|
], ProductSetPatch.prototype, "id", void 0);
|
|
57
|
-
__decorate([
|
|
49
|
+
tslib_1.__decorate([
|
|
58
50
|
(0, type_graphql_1.Field)({ nullable: true }),
|
|
59
|
-
__metadata("design:type", String)
|
|
51
|
+
tslib_1.__metadata("design:type", String)
|
|
60
52
|
], ProductSetPatch.prototype, "name", void 0);
|
|
61
|
-
__decorate([
|
|
53
|
+
tslib_1.__decorate([
|
|
62
54
|
(0, type_graphql_1.Field)({ nullable: true }),
|
|
63
|
-
__metadata("design:type", String)
|
|
55
|
+
tslib_1.__metadata("design:type", String)
|
|
64
56
|
], ProductSetPatch.prototype, "description", void 0);
|
|
65
|
-
__decorate([
|
|
57
|
+
tslib_1.__decorate([
|
|
66
58
|
(0, type_graphql_1.Field)({ nullable: true }),
|
|
67
|
-
__metadata("design:type", String)
|
|
59
|
+
tslib_1.__metadata("design:type", String)
|
|
68
60
|
], ProductSetPatch.prototype, "type", void 0);
|
|
69
|
-
__decorate([
|
|
61
|
+
tslib_1.__decorate([
|
|
70
62
|
(0, type_graphql_1.Field)({ nullable: true }),
|
|
71
|
-
__metadata("design:type", String)
|
|
63
|
+
tslib_1.__metadata("design:type", String)
|
|
72
64
|
], ProductSetPatch.prototype, "cuFlag", void 0);
|
|
73
|
-
ProductSetPatch = __decorate([
|
|
65
|
+
ProductSetPatch = tslib_1.__decorate([
|
|
74
66
|
(0, type_graphql_1.InputType)()
|
|
75
67
|
], ProductSetPatch);
|
|
76
68
|
exports.ProductSetPatch = ProductSetPatch;
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"product-set-types.js","sourceRoot":"","sources":["../../../server/service/product-set/product-set-types.ts"],"names":[],"mappings":"
|
|
1
|
+
{"version":3,"file":"product-set-types.js","sourceRoot":"","sources":["../../../server/service/product-set/product-set-types.ts"],"names":[],"mappings":";;;;AAAA,+CAAoE;AAEpE,+CAA0C;AAG1C,IAAa,aAAa,GAA1B,MAAa,aAAa;CAYzB,CAAA;AAVC;IADC,IAAA,oBAAK,GAAE;;2CACI;AAGZ;IADC,IAAA,oBAAK,EAAC,EAAE,QAAQ,EAAE,IAAI,EAAE,CAAC;;kDACN;AAGpB;IADC,IAAA,oBAAK,EAAC,EAAE,QAAQ,EAAE,IAAI,EAAE,CAAC;;6CACX;AAGf;IADC,IAAA,oBAAK,EAAC,EAAE,QAAQ,EAAE,IAAI,EAAE,CAAC;;2CACb;AAXF,aAAa;IADzB,IAAA,wBAAS,GAAE;GACC,aAAa,CAYzB;AAZY,sCAAa;AAe1B,IAAa,cAAc,GAA3B,MAAa,cAAc;CAM1B,CAAA;AAJC;IADC,IAAA,oBAAK,EAAC,IAAI,CAAC,EAAE,CAAC,CAAC,wBAAU,CAAC,EAAE,EAAE,QAAQ,EAAE,IAAI,EAAE,CAAC;;6CAC5B;AAGpB;IADC,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;AAS3B,IAAa,eAAe,GAA5B,MAAa,eAAe;CAe3B,CAAA;AAbC;IADC,IAAA,oBAAK,EAAC,IAAI,CAAC,EAAE,CAAC,iBAAE,EAAE,EAAE,QAAQ,EAAE,IAAI,EAAE,CAAC;;2CAC3B;AAGX;IADC,IAAA,oBAAK,EAAC,EAAE,QAAQ,EAAE,IAAI,EAAE,CAAC;;6CACb;AAGb;IADC,IAAA,oBAAK,EAAC,EAAE,QAAQ,EAAE,IAAI,EAAE,CAAC;;oDACN;AAGpB;IADC,IAAA,oBAAK,EAAC,EAAE,QAAQ,EAAE,IAAI,EAAE,CAAC;;6CACb;AAGb;IADC,IAAA,oBAAK,EAAC,EAAE,QAAQ,EAAE,IAAI,EAAE,CAAC;;+CACX;AAdJ,eAAe;IAD3B,IAAA,wBAAS,GAAE;GACC,eAAe,CAe3B;AAfY,0CAAe","sourcesContent":["import { Field, ID, InputType, Int, ObjectType } from 'type-graphql'\n\nimport { ProductSet } from './product-set'\n\n@InputType()\nexport class NewProductSet {\n @Field()\n name: string\n\n @Field({ nullable: true })\n description?: string\n\n @Field({ nullable: true })\n status?: string\n\n @Field({ nullable: true })\n type?: string\n}\n\n@ObjectType()\nexport class ProductSetList {\n @Field(type => [ProductSet], { nullable: true })\n items?: ProductSet[]\n\n @Field(type => Int, { nullable: true })\n total?: number\n}\n\n@InputType()\nexport class ProductSetPatch {\n @Field(type => ID, { nullable: true })\n id?: string\n\n @Field({ nullable: true })\n name?: string\n\n @Field({ nullable: true })\n description?: string\n\n @Field({ nullable: true })\n type?: 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.ProductSet = void 0;
|
|
5
|
+
const tslib_1 = require("tslib");
|
|
14
6
|
const auth_base_1 = require("@things-factory/auth-base");
|
|
15
7
|
const biz_base_1 = require("@things-factory/biz-base");
|
|
16
8
|
const shell_1 = require("@things-factory/shell");
|
|
@@ -19,97 +11,97 @@ const typeorm_1 = require("typeorm");
|
|
|
19
11
|
const product_1 = require("../product/product");
|
|
20
12
|
let ProductSet = class ProductSet {
|
|
21
13
|
};
|
|
22
|
-
__decorate([
|
|
14
|
+
tslib_1.__decorate([
|
|
23
15
|
(0, typeorm_1.PrimaryGeneratedColumn)('uuid'),
|
|
24
16
|
(0, type_graphql_1.Field)(type => type_graphql_1.ID),
|
|
25
|
-
__metadata("design:type", String)
|
|
17
|
+
tslib_1.__metadata("design:type", String)
|
|
26
18
|
], ProductSet.prototype, "id", void 0);
|
|
27
|
-
__decorate([
|
|
19
|
+
tslib_1.__decorate([
|
|
28
20
|
(0, typeorm_1.ManyToOne)(type => shell_1.Domain),
|
|
29
21
|
(0, type_graphql_1.Field)(),
|
|
30
|
-
__metadata("design:type", typeof (_a = typeof shell_1.Domain !== "undefined" && shell_1.Domain) === "function" ? _a : Object)
|
|
22
|
+
tslib_1.__metadata("design:type", typeof (_a = typeof shell_1.Domain !== "undefined" && shell_1.Domain) === "function" ? _a : Object)
|
|
31
23
|
], ProductSet.prototype, "domain", void 0);
|
|
32
|
-
__decorate([
|
|
24
|
+
tslib_1.__decorate([
|
|
33
25
|
(0, typeorm_1.RelationId)((productSet) => productSet.domain),
|
|
34
|
-
__metadata("design:type", String)
|
|
26
|
+
tslib_1.__metadata("design:type", String)
|
|
35
27
|
], ProductSet.prototype, "domainId", void 0);
|
|
36
|
-
__decorate([
|
|
28
|
+
tslib_1.__decorate([
|
|
37
29
|
(0, typeorm_1.ManyToOne)(type => biz_base_1.Bizplace, {
|
|
38
30
|
nullable: false
|
|
39
31
|
}),
|
|
40
32
|
(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)
|
|
33
|
+
tslib_1.__metadata("design:type", typeof (_b = typeof biz_base_1.Bizplace !== "undefined" && biz_base_1.Bizplace) === "function" ? _b : Object)
|
|
42
34
|
], ProductSet.prototype, "bizplace", void 0);
|
|
43
|
-
__decorate([
|
|
35
|
+
tslib_1.__decorate([
|
|
44
36
|
(0, typeorm_1.Column)({ nullable: true }),
|
|
45
37
|
(0, type_graphql_1.Field)({ nullable: true }),
|
|
46
|
-
__metadata("design:type", String)
|
|
38
|
+
tslib_1.__metadata("design:type", String)
|
|
47
39
|
], ProductSet.prototype, "code", void 0);
|
|
48
|
-
__decorate([
|
|
40
|
+
tslib_1.__decorate([
|
|
49
41
|
(0, typeorm_1.Column)(),
|
|
50
42
|
(0, type_graphql_1.Field)(),
|
|
51
|
-
__metadata("design:type", String)
|
|
43
|
+
tslib_1.__metadata("design:type", String)
|
|
52
44
|
], ProductSet.prototype, "name", void 0);
|
|
53
|
-
__decorate([
|
|
45
|
+
tslib_1.__decorate([
|
|
54
46
|
(0, typeorm_1.Column)({
|
|
55
47
|
nullable: true
|
|
56
48
|
}),
|
|
57
49
|
(0, type_graphql_1.Field)({ nullable: true }),
|
|
58
|
-
__metadata("design:type", String)
|
|
50
|
+
tslib_1.__metadata("design:type", String)
|
|
59
51
|
], ProductSet.prototype, "description", void 0);
|
|
60
|
-
__decorate([
|
|
52
|
+
tslib_1.__decorate([
|
|
61
53
|
(0, typeorm_1.OneToMany)(type => product_1.Product, product => product.productSet, {
|
|
62
54
|
nullable: true
|
|
63
55
|
}),
|
|
64
56
|
(0, type_graphql_1.Field)(type => [product_1.Product], { nullable: true }),
|
|
65
|
-
__metadata("design:type", Array)
|
|
57
|
+
tslib_1.__metadata("design:type", Array)
|
|
66
58
|
], ProductSet.prototype, "product", void 0);
|
|
67
|
-
__decorate([
|
|
59
|
+
tslib_1.__decorate([
|
|
68
60
|
(0, typeorm_1.Column)({
|
|
69
61
|
nullable: true,
|
|
70
62
|
default: 'ACTIVE'
|
|
71
63
|
}),
|
|
72
64
|
(0, type_graphql_1.Field)({ nullable: true }),
|
|
73
|
-
__metadata("design:type", String)
|
|
65
|
+
tslib_1.__metadata("design:type", String)
|
|
74
66
|
], ProductSet.prototype, "status", void 0);
|
|
75
|
-
__decorate([
|
|
67
|
+
tslib_1.__decorate([
|
|
76
68
|
(0, typeorm_1.Column)(),
|
|
77
69
|
(0, type_graphql_1.Field)(),
|
|
78
|
-
__metadata("design:type", String)
|
|
70
|
+
tslib_1.__metadata("design:type", String)
|
|
79
71
|
], ProductSet.prototype, "type", void 0);
|
|
80
|
-
__decorate([
|
|
72
|
+
tslib_1.__decorate([
|
|
81
73
|
(0, typeorm_1.CreateDateColumn)(),
|
|
82
74
|
(0, type_graphql_1.Field)({ nullable: true }),
|
|
83
|
-
__metadata("design:type", Date)
|
|
75
|
+
tslib_1.__metadata("design:type", Date)
|
|
84
76
|
], ProductSet.prototype, "createdAt", void 0);
|
|
85
|
-
__decorate([
|
|
77
|
+
tslib_1.__decorate([
|
|
86
78
|
(0, typeorm_1.UpdateDateColumn)(),
|
|
87
79
|
(0, type_graphql_1.Field)({ nullable: true }),
|
|
88
|
-
__metadata("design:type", Date)
|
|
80
|
+
tslib_1.__metadata("design:type", Date)
|
|
89
81
|
], ProductSet.prototype, "updatedAt", void 0);
|
|
90
|
-
__decorate([
|
|
82
|
+
tslib_1.__decorate([
|
|
91
83
|
(0, typeorm_1.ManyToOne)(type => auth_base_1.User, {
|
|
92
84
|
nullable: true
|
|
93
85
|
}),
|
|
94
86
|
(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)
|
|
87
|
+
tslib_1.__metadata("design:type", typeof (_c = typeof auth_base_1.User !== "undefined" && auth_base_1.User) === "function" ? _c : Object)
|
|
96
88
|
], ProductSet.prototype, "creator", void 0);
|
|
97
|
-
__decorate([
|
|
89
|
+
tslib_1.__decorate([
|
|
98
90
|
(0, typeorm_1.RelationId)((productSet) => productSet.creator),
|
|
99
|
-
__metadata("design:type", String)
|
|
91
|
+
tslib_1.__metadata("design:type", String)
|
|
100
92
|
], ProductSet.prototype, "creatorId", void 0);
|
|
101
|
-
__decorate([
|
|
93
|
+
tslib_1.__decorate([
|
|
102
94
|
(0, typeorm_1.ManyToOne)(type => auth_base_1.User, {
|
|
103
95
|
nullable: true
|
|
104
96
|
}),
|
|
105
97
|
(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)
|
|
98
|
+
tslib_1.__metadata("design:type", typeof (_d = typeof auth_base_1.User !== "undefined" && auth_base_1.User) === "function" ? _d : Object)
|
|
107
99
|
], ProductSet.prototype, "updater", void 0);
|
|
108
|
-
__decorate([
|
|
100
|
+
tslib_1.__decorate([
|
|
109
101
|
(0, typeorm_1.RelationId)((productSet) => productSet.updater),
|
|
110
|
-
__metadata("design:type", String)
|
|
102
|
+
tslib_1.__metadata("design:type", String)
|
|
111
103
|
], ProductSet.prototype, "updaterId", void 0);
|
|
112
|
-
ProductSet = __decorate([
|
|
104
|
+
ProductSet = tslib_1.__decorate([
|
|
113
105
|
(0, typeorm_1.Entity)(),
|
|
114
106
|
(0, typeorm_1.Index)('ix_product_set_0', (productSet) => [productSet.bizplace, productSet.name], { unique: true }),
|
|
115
107
|
(0, type_graphql_1.ObjectType)()
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"product-set.js","sourceRoot":"","sources":["../../../server/service/product-set/product-set.ts"],"names":[],"mappings":"
|
|
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;AAK5C,IAAa,UAAU,GAAvB,MAAa,UAAU;CA0EtB,CAAA;AAvEC;IAFC,IAAA,gCAAsB,EAAC,MAAM,CAAC;IAC9B,IAAA,oBAAK,EAAC,IAAI,CAAC,EAAE,CAAC,iBAAE,CAAC;;sCACC;AAInB;IAFC,IAAA,mBAAS,EAAC,IAAI,CAAC,EAAE,CAAC,cAAM,CAAC;IACzB,IAAA,oBAAK,GAAE;0DACA,cAAM,oBAAN,cAAM;0CAAA;AAGd;IADC,IAAA,oBAAU,EAAC,CAAC,UAAsB,EAAE,EAAE,CAAC,UAAU,CAAC,MAAM,CAAC;;4CAC1C;AAMhB;IAJC,IAAA,mBAAS,EAAC,IAAI,CAAC,EAAE,CAAC,mBAAQ,EAAE;QAC3B,QAAQ,EAAE,KAAK;KAChB,CAAC;IACD,IAAA,oBAAK,EAAC,EAAE,QAAQ,EAAE,IAAI,EAAE,CAAC;0DAChB,mBAAQ,oBAAR,mBAAQ;4CAAA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C;0DACjB,gBAAI,oBAAJ,gBAAI;2CAAA;AAGb;IADC,IAAA,oBAAU,EAAC,CAAC,UAAsB,EAAE,EAAE,CAAC,UAAU,CAAC,OAAO,CAAC;;6CAC1C;AAMjB;IAJC,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;0DACjB,gBAAI,oBAAJ,gBAAI;2CAAA;AAGb;IADC,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","sourcesContent":["import { User } from '@things-factory/auth-base'\nimport { Bizplace } from '@things-factory/biz-base'\nimport { Domain } from '@things-factory/shell'\nimport { 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'\nimport { Product } from '../product/product'\n\n@Entity()\n@Index('ix_product_set_0', (productSet: ProductSet) => [productSet.bizplace, productSet.name], { unique: true })\n@ObjectType()\nexport class ProductSet {\n @PrimaryGeneratedColumn('uuid')\n @Field(type => ID)\n readonly id: string\n\n @ManyToOne(type => Domain)\n @Field()\n domain: Domain\n\n @RelationId((productSet: ProductSet) => productSet.domain)\n domainId: string\n\n @ManyToOne(type => Bizplace, {\n nullable: false\n })\n @Field({ nullable: true })\n bizplace: Bizplace\n\n @Column({ nullable: true })\n @Field({ nullable: true })\n code: string\n\n @Column()\n @Field()\n name: string\n\n @Column({\n nullable: true\n })\n @Field({ nullable: true })\n description: string\n\n @OneToMany(type => Product, product => product.productSet, {\n nullable: true\n })\n @Field(type => [Product], { nullable: true })\n product: Product[]\n\n @Column({\n nullable: true,\n default: 'ACTIVE'\n })\n @Field({ nullable: true })\n status: string\n\n @Column()\n @Field()\n type: string\n\n @CreateDateColumn()\n @Field({ nullable: true })\n createdAt: Date\n\n @UpdateDateColumn()\n @Field({ nullable: true })\n updatedAt: Date\n\n @ManyToOne(type => User, {\n nullable: true\n })\n @Field({ nullable: true })\n creator: User\n\n @RelationId((productSet: ProductSet) => productSet.creator)\n creatorId: string\n\n @ManyToOne(type => User, {\n nullable: true\n })\n @Field({ nullable: true })\n updater: User\n\n @RelationId((productSet: ProductSet) => productSet.updater)\n updaterId: string\n}\n"]}
|