@things-factory/integration-sellercraft 5.0.7 → 6.0.0-alpha.0
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/dist-server/constants/index.js +3 -16
- package/dist-server/constants/index.js.map +1 -1
- package/dist-server/constants/order-status-mapping.js.map +1 -1
- package/dist-server/constants/platform.js.map +1 -1
- package/dist-server/controllers/index.js +4 -17
- package/dist-server/controllers/index.js.map +1 -1
- package/dist-server/controllers/sellercraft/apis/add-inbound-order.js.map +1 -1
- package/dist-server/controllers/sellercraft/apis/echo.js.map +1 -1
- package/dist-server/controllers/sellercraft/apis/fetch-order-document.js.map +1 -1
- package/dist-server/controllers/sellercraft/apis/index.js +9 -22
- package/dist-server/controllers/sellercraft/apis/index.js.map +1 -1
- package/dist-server/controllers/sellercraft/apis/initiate-order-document.js.map +1 -1
- package/dist-server/controllers/sellercraft/apis/initiate-order-shipment.js.map +1 -1
- package/dist-server/controllers/sellercraft/apis/pack-marketplace-order.js.map +1 -1
- package/dist-server/controllers/sellercraft/apis/update-marketplace-order.js.map +1 -1
- package/dist-server/controllers/sellercraft/apis/update-product.js.map +1 -1
- package/dist-server/controllers/sellercraft/index.js +3 -28
- package/dist-server/controllers/sellercraft/index.js.map +1 -1
- package/dist-server/controllers/sellercraft/platform-action.js.map +1 -1
- package/dist-server/controllers/sellercraft/sellercraft.js +8 -10
- package/dist-server/controllers/sellercraft/sellercraft.js.map +1 -1
- package/dist-server/controllers/sellercraft-api/decorators.js +14 -10
- package/dist-server/controllers/sellercraft-api/decorators.js.map +1 -1
- package/dist-server/controllers/sellercraft-api/index.js +35 -43
- package/dist-server/controllers/sellercraft-api/index.js.map +1 -1
- package/dist-server/controllers/sellercraft-api/types.js.map +1 -1
- package/dist-server/controllers/sellercraft-channel-integration/apis/echo.js.map +1 -1
- package/dist-server/controllers/sellercraft-channel-integration/apis/index.js +7 -20
- package/dist-server/controllers/sellercraft-channel-integration/apis/index.js.map +1 -1
- package/dist-server/controllers/sellercraft-channel-integration/apis/ingest-channel-categories.js.map +1 -1
- package/dist-server/controllers/sellercraft-channel-integration/apis/ingest-channel-category-attributes.js.map +1 -1
- package/dist-server/controllers/sellercraft-channel-integration/apis/ingest-channel-order-package.js.map +1 -1
- package/dist-server/controllers/sellercraft-channel-integration/apis/ingest-channel-order.js +5 -3
- package/dist-server/controllers/sellercraft-channel-integration/apis/ingest-channel-order.js.map +1 -1
- package/dist-server/controllers/sellercraft-channel-integration/apis/ingest-channel-product.js.map +1 -1
- package/dist-server/controllers/sellercraft-channel-integration/index.js +3 -28
- package/dist-server/controllers/sellercraft-channel-integration/index.js.map +1 -1
- package/dist-server/controllers/sellercraft-channel-integration/platform-action.js.map +1 -1
- package/dist-server/controllers/sellercraft-channel-integration/sellercraft-channel-integration.js +2 -4
- package/dist-server/controllers/sellercraft-channel-integration/sellercraft-channel-integration.js.map +1 -1
- package/dist-server/controllers/sellercraft-channel-integration-api/decorators.js +2 -4
- package/dist-server/controllers/sellercraft-channel-integration-api/decorators.js.map +1 -1
- package/dist-server/controllers/sellercraft-channel-integration-api/index.js +27 -35
- package/dist-server/controllers/sellercraft-channel-integration-api/index.js.map +1 -1
- package/dist-server/controllers/sellercraft-channel-integration-api/types.js.map +1 -1
- package/dist-server/index.js +6 -19
- package/dist-server/index.js.map +1 -1
- package/dist-server/middlewares/index.js.map +1 -1
- package/dist-server/migrations/index.js.map +1 -1
- package/dist-server/routers/sellercraft-router.js +31 -7
- package/dist-server/routers/sellercraft-router.js.map +1 -1
- package/dist-server/routes.js.map +1 -1
- package/dist-server/service/index.js +2 -15
- package/dist-server/service/index.js.map +1 -1
- package/dist-server/service/marketplace-channel/index.js.map +1 -1
- package/dist-server/service/marketplace-channel/marketplace-channel-order-mutation.js +304 -279
- package/dist-server/service/marketplace-channel/marketplace-channel-order-mutation.js.map +1 -1
- package/dist-server/service/marketplace-channel/marketplace-channel-product-mutation.js +67 -35
- package/dist-server/service/marketplace-channel/marketplace-channel-product-mutation.js.map +1 -1
- package/dist-server/service/marketplace-channel/marketplace-channel.js +33 -37
- package/dist-server/service/marketplace-channel/marketplace-channel.js.map +1 -1
- package/dist-server/service/sellercraft/index.js.map +1 -1
- package/dist-server/service/sellercraft/sellercraft-mutation.js +39 -48
- package/dist-server/service/sellercraft/sellercraft-mutation.js.map +1 -1
- package/dist-server/service/sellercraft/sellercraft-query.js +34 -47
- package/dist-server/service/sellercraft/sellercraft-query.js.map +1 -1
- package/dist-server/service/sellercraft/sellercraft-type.js +32 -40
- package/dist-server/service/sellercraft/sellercraft-type.js.map +1 -1
- package/dist-server/service/sellercraft/sellercraft.js +35 -39
- package/dist-server/service/sellercraft/sellercraft.js.map +1 -1
- package/dist-server/tsconfig.tsbuildinfo +1 -0
- package/dist-server/utils/tokencraft-util.js.map +1 -1
- package/package.json +16 -16
- package/server/controllers/sellercraft/sellercraft.ts +6 -6
- package/server/controllers/sellercraft-api/decorators.ts +11 -6
- package/server/controllers/sellercraft-api/index.ts +1 -1
- package/server/controllers/sellercraft-channel-integration/apis/ingest-channel-order.ts +5 -3
- package/server/controllers/sellercraft-channel-integration-api/index.ts +1 -1
- package/server/routers/sellercraft-router.ts +45 -4
- package/server/service/marketplace-channel/marketplace-channel-order-mutation.ts +348 -310
- package/server/service/marketplace-channel/marketplace-channel-product-mutation.ts +78 -17
- package/server/service/marketplace-channel/marketplace-channel.ts +4 -0
- package/server/service/sellercraft/sellercraft-mutation.ts +17 -9
- package/server/service/sellercraft/sellercraft-query.ts +7 -8
- package/server/service/sellercraft/sellercraft.ts +5 -1
@@ -1 +1 @@
|
|
1
|
-
{"version":3,"file":"sellercraft-mutation.js","sourceRoot":"","sources":["../../../server/service/sellercraft/sellercraft-mutation.ts"],"names":[],"mappings":"
|
1
|
+
{"version":3,"file":"sellercraft-mutation.js","sourceRoot":"","sources":["../../../server/service/sellercraft/sellercraft-mutation.ts"],"names":[],"mappings":";;;;AAAA,+CAAsE;AACtE,qCAA4B;AAC5B,+BAAm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, Ctx, Directive, Mutation, Resolver } from 'type-graphql'\nimport { In } from 'typeorm'\nimport { v4 as uuidv4 } from 'uuid'\n\nimport { Sellercraft, SellercraftPlatform, SellercraftStatus } from './sellercraft'\nimport { NewSellercraft, SellercraftPatch } from './sellercraft-type'\n\n@Resolver(Sellercraft)\nexport class SellercraftMutation {\n @Directive('@transaction')\n @Mutation(returns => Sellercraft, { description: 'To create new Sellercraft' })\n async createSellercraft(\n @Arg('sellercraft') sellercraft: NewSellercraft,\n @Ctx() context: ResolverContext\n ): Promise<Sellercraft> {\n const { domain, user, tx } = context.state\n\n return await tx.getRepository(Sellercraft).save({\n ...sellercraft,\n name: uuidv4(),\n domain,\n creator: user,\n updater: user\n })\n }\n\n @Directive('@transaction')\n @Mutation(returns => Sellercraft, { description: 'To modify Sellercraft information' })\n async updateSellercraft(\n @Arg('id') id: string,\n @Arg('patch') patch: SellercraftPatch,\n @Ctx() context: ResolverContext\n ): Promise<Sellercraft> {\n const { user, tx } = context.state\n\n const repository = tx.getRepository(Sellercraft)\n const sellercraft = await repository.findOneBy({ id })\n\n return await repository.save({\n ...sellercraft,\n ...patch,\n updater: user\n })\n }\n\n @Directive('@transaction')\n @Mutation(returns => [Sellercraft], { description: \"To modify multiple Sellercrafts' information\" })\n async updateMultipleSellercraft(\n @Arg('patches', type => [SellercraftPatch]) patches: SellercraftPatch[],\n @Ctx() context: ResolverContext\n ): Promise<Sellercraft[]> {\n const { domain, user, tx } = context.state\n\n let results = []\n const _createRecords = patches.filter((patch: any) => patch.cuFlag.toUpperCase() === '+')\n const _updateRecords = patches.filter((patch: any) => patch.cuFlag.toUpperCase() === 'M')\n const sellercraftRepo = tx.getRepository(Sellercraft)\n\n if (_createRecords.length > 0) {\n for (let i = 0; i < _createRecords.length; i++) {\n const newRecord = _createRecords[i]\n\n const result = await sellercraftRepo.save({\n ...newRecord,\n domain,\n name: uuidv4(),\n status: SellercraftStatus.ACTIVE,\n platform: SellercraftPlatform.SELLERCRAFT,\n creator: user,\n updater: user\n })\n\n results.push({ ...result, cuFlag: '+' })\n }\n }\n\n if (_updateRecords.length > 0) {\n for (let i = 0; i < _updateRecords.length; i++) {\n const newRecord = _updateRecords[i]\n const sellercraft = await sellercraftRepo.findOneBy({ id: newRecord.id })\n\n const result = await sellercraftRepo.save({\n ...sellercraft,\n ...newRecord,\n updater: user\n })\n\n results.push({ ...result, cuFlag: 'M' })\n }\n }\n\n return results\n }\n\n @Directive('@transaction')\n @Mutation(returns => Boolean, { description: 'To delete Sellercraft' })\n async deleteSellercraft(@Arg('id') id: string, @Ctx() context: ResolverContext): Promise<boolean> {\n const { domain, tx } = context.state\n\n await tx.getRepository(Sellercraft).delete({ domain: { id: domain.id }, id })\n return true\n }\n\n @Directive('@transaction')\n @Mutation(returns => Boolean, { description: 'To delete multiple sellercrafts' })\n async deleteSellercrafts(\n @Arg('ids', type => [String]) ids: string[],\n @Ctx() context: ResolverContext\n ): Promise<boolean> {\n const { domain, tx, user } = context.state\n let sellercrafts: Sellercraft[] = await tx\n .getRepository(Sellercraft)\n .find({ where: { domain: { id: domain.id }, id: In(ids) } })\n\n sellercrafts = sellercrafts.map((sellercraft: Sellercraft) => {\n return {\n ...sellercraft,\n status: SellercraftStatus.TERMINATED,\n updater: user\n }\n })\n\n await tx.getRepository(Sellercraft).save(sellercrafts)\n return true\n }\n}\n"]}
|
@@ -1,83 +1,70 @@
|
|
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
|
-
var _a;
|
15
2
|
Object.defineProperty(exports, "__esModule", { value: true });
|
16
3
|
exports.SellercraftQuery = void 0;
|
4
|
+
const tslib_1 = require("tslib");
|
17
5
|
const type_graphql_1 = require("type-graphql");
|
18
|
-
const typeorm_1 = require("typeorm");
|
19
6
|
const auth_base_1 = require("@things-factory/auth-base");
|
20
7
|
const shell_1 = require("@things-factory/shell");
|
21
8
|
const sellercraft_1 = require("./sellercraft");
|
22
9
|
const sellercraft_type_1 = require("./sellercraft-type");
|
23
10
|
let SellercraftQuery = class SellercraftQuery {
|
24
11
|
async sellercraft(id, context) {
|
25
|
-
return await (0,
|
12
|
+
return await (0, shell_1.getRepository)(sellercraft_1.Sellercraft).findOneBy({ id });
|
26
13
|
}
|
27
14
|
async sellercrafts(params, context) {
|
28
15
|
const { domain } = context.state;
|
29
16
|
const convertedParams = (0, shell_1.convertListParams)(params, { domain });
|
30
|
-
const [items, total] = await (0,
|
17
|
+
const [items, total] = await (0, shell_1.getRepository)(sellercraft_1.Sellercraft).findAndCount(convertedParams);
|
31
18
|
return { items, total };
|
32
19
|
}
|
33
20
|
async domain(sellercraft) {
|
34
|
-
return await (0,
|
21
|
+
return await (0, shell_1.getRepository)(shell_1.Domain).findOneBy({ id: sellercraft.domainId });
|
35
22
|
}
|
36
23
|
async updater(sellercraft) {
|
37
|
-
return await (0,
|
24
|
+
return await (0, shell_1.getRepository)(auth_base_1.User).findOneBy({ id: sellercraft.updaterId });
|
38
25
|
}
|
39
26
|
async creator(sellercraft) {
|
40
|
-
return await (0,
|
27
|
+
return await (0, shell_1.getRepository)(auth_base_1.User).findOneBy({ id: sellercraft.creatorId });
|
41
28
|
}
|
42
29
|
};
|
43
|
-
__decorate([
|
30
|
+
tslib_1.__decorate([
|
44
31
|
(0, type_graphql_1.Query)(returns => sellercraft_1.Sellercraft, { description: 'To fetch a Sellercraft' }),
|
45
|
-
__param(0, (0, type_graphql_1.Arg)('id')),
|
46
|
-
__param(1, (0, type_graphql_1.Ctx)()),
|
47
|
-
__metadata("design:type", Function),
|
48
|
-
__metadata("design:paramtypes", [String, Object]),
|
49
|
-
__metadata("design:returntype", Promise)
|
32
|
+
tslib_1.__param(0, (0, type_graphql_1.Arg)('id')),
|
33
|
+
tslib_1.__param(1, (0, type_graphql_1.Ctx)()),
|
34
|
+
tslib_1.__metadata("design:type", Function),
|
35
|
+
tslib_1.__metadata("design:paramtypes", [String, Object]),
|
36
|
+
tslib_1.__metadata("design:returntype", Promise)
|
50
37
|
], SellercraftQuery.prototype, "sellercraft", null);
|
51
|
-
__decorate([
|
38
|
+
tslib_1.__decorate([
|
52
39
|
(0, type_graphql_1.Query)(returns => sellercraft_type_1.SellercraftList, { description: 'To fetch multiple Sellercrafts' }),
|
53
|
-
__param(0, (0, type_graphql_1.Args)()),
|
54
|
-
__param(1, (0, type_graphql_1.Ctx)()),
|
55
|
-
__metadata("design:type", Function),
|
56
|
-
__metadata("design:paramtypes", [
|
57
|
-
__metadata("design:returntype", Promise)
|
40
|
+
tslib_1.__param(0, (0, type_graphql_1.Args)()),
|
41
|
+
tslib_1.__param(1, (0, type_graphql_1.Ctx)()),
|
42
|
+
tslib_1.__metadata("design:type", Function),
|
43
|
+
tslib_1.__metadata("design:paramtypes", [shell_1.ListParam, Object]),
|
44
|
+
tslib_1.__metadata("design:returntype", Promise)
|
58
45
|
], SellercraftQuery.prototype, "sellercrafts", null);
|
59
|
-
__decorate([
|
46
|
+
tslib_1.__decorate([
|
60
47
|
(0, type_graphql_1.FieldResolver)(type => shell_1.Domain),
|
61
|
-
__param(0, (0, type_graphql_1.Root)()),
|
62
|
-
__metadata("design:type", Function),
|
63
|
-
__metadata("design:paramtypes", [sellercraft_1.Sellercraft]),
|
64
|
-
__metadata("design:returntype", Promise)
|
48
|
+
tslib_1.__param(0, (0, type_graphql_1.Root)()),
|
49
|
+
tslib_1.__metadata("design:type", Function),
|
50
|
+
tslib_1.__metadata("design:paramtypes", [sellercraft_1.Sellercraft]),
|
51
|
+
tslib_1.__metadata("design:returntype", Promise)
|
65
52
|
], SellercraftQuery.prototype, "domain", null);
|
66
|
-
__decorate([
|
53
|
+
tslib_1.__decorate([
|
67
54
|
(0, type_graphql_1.FieldResolver)(type => auth_base_1.User),
|
68
|
-
__param(0, (0, type_graphql_1.Root)()),
|
69
|
-
__metadata("design:type", Function),
|
70
|
-
__metadata("design:paramtypes", [sellercraft_1.Sellercraft]),
|
71
|
-
__metadata("design:returntype", Promise)
|
55
|
+
tslib_1.__param(0, (0, type_graphql_1.Root)()),
|
56
|
+
tslib_1.__metadata("design:type", Function),
|
57
|
+
tslib_1.__metadata("design:paramtypes", [sellercraft_1.Sellercraft]),
|
58
|
+
tslib_1.__metadata("design:returntype", Promise)
|
72
59
|
], SellercraftQuery.prototype, "updater", null);
|
73
|
-
__decorate([
|
60
|
+
tslib_1.__decorate([
|
74
61
|
(0, type_graphql_1.FieldResolver)(type => auth_base_1.User),
|
75
|
-
__param(0, (0, type_graphql_1.Root)()),
|
76
|
-
__metadata("design:type", Function),
|
77
|
-
__metadata("design:paramtypes", [sellercraft_1.Sellercraft]),
|
78
|
-
__metadata("design:returntype", Promise)
|
62
|
+
tslib_1.__param(0, (0, type_graphql_1.Root)()),
|
63
|
+
tslib_1.__metadata("design:type", Function),
|
64
|
+
tslib_1.__metadata("design:paramtypes", [sellercraft_1.Sellercraft]),
|
65
|
+
tslib_1.__metadata("design:returntype", Promise)
|
79
66
|
], SellercraftQuery.prototype, "creator", null);
|
80
|
-
SellercraftQuery = __decorate([
|
67
|
+
SellercraftQuery = tslib_1.__decorate([
|
81
68
|
(0, type_graphql_1.Resolver)(sellercraft_1.Sellercraft)
|
82
69
|
], SellercraftQuery);
|
83
70
|
exports.SellercraftQuery = SellercraftQuery;
|
@@ -1 +1 @@
|
|
1
|
-
{"version":3,"file":"sellercraft-query.js","sourceRoot":"","sources":["../../../server/service/sellercraft/sellercraft-query.ts"],"names":[],"mappings":"
|
1
|
+
{"version":3,"file":"sellercraft-query.js","sourceRoot":"","sources":["../../../server/service/sellercraft/sellercraft-query.ts"],"names":[],"mappings":";;;;AAAA,+CAAmF;AAEnF,yDAAgD;AAChD,iDAA2F;AAE3F,+CAA2C;AAC3C,yDAAoD;AAGpD,IAAa,gBAAgB,GAA7B,MAAa,gBAAgB;IAE3B,KAAK,CAAC,WAAW,CAAY,EAAU,EAAS,OAAwB;QACtE,OAAO,MAAM,IAAA,qBAAa,EAAC,yBAAW,CAAC,CAAC,SAAS,CAAC,EAAE,EAAE,EAAE,CAAC,CAAA;IAC3D,CAAC;IAGD,KAAK,CAAC,YAAY,CAAS,MAAiB,EAAS,OAAwB;QAC3E,MAAM,EAAE,MAAM,EAAE,GAAG,OAAO,CAAC,KAAK,CAAA;QAEhC,MAAM,eAAe,GAAG,IAAA,yBAAiB,EAAC,MAAM,EAAE,EAAE,MAAM,EAAE,CAAC,CAAA;QAC7D,MAAM,CAAC,KAAK,EAAE,KAAK,CAAC,GAAG,MAAM,IAAA,qBAAa,EAAC,yBAAW,CAAC,CAAC,YAAY,CAAC,eAAe,CAAC,CAAA;QAErF,OAAO,EAAE,KAAK,EAAE,KAAK,EAAE,CAAA;IACzB,CAAC;IAGD,KAAK,CAAC,MAAM,CAAS,WAAwB;QAC3C,OAAO,MAAM,IAAA,qBAAa,EAAC,cAAM,CAAC,CAAC,SAAS,CAAC,EAAE,EAAE,EAAE,WAAW,CAAC,QAAQ,EAAE,CAAC,CAAA;IAC5E,CAAC;IAGD,KAAK,CAAC,OAAO,CAAS,WAAwB;QAC5C,OAAO,MAAM,IAAA,qBAAa,EAAC,gBAAI,CAAC,CAAC,SAAS,CAAC,EAAE,EAAE,EAAE,WAAW,CAAC,SAAS,EAAE,CAAC,CAAA;IAC3E,CAAC;IAGD,KAAK,CAAC,OAAO,CAAS,WAAwB;QAC5C,OAAO,MAAM,IAAA,qBAAa,EAAC,gBAAI,CAAC,CAAC,SAAS,CAAC,EAAE,EAAE,EAAE,WAAW,CAAC,SAAS,EAAE,CAAC,CAAA;IAC3E,CAAC;CACF,CAAA;AA5BC;IADC,IAAA,oBAAK,EAAC,OAAO,CAAC,EAAE,CAAC,yBAAW,EAAE,EAAE,WAAW,EAAE,wBAAwB,EAAE,CAAC;IACtD,mBAAA,IAAA,kBAAG,EAAC,IAAI,CAAC,CAAA;IAAc,mBAAA,IAAA,kBAAG,GAAE,CAAA;;;;mDAE9C;AAGD;IADC,IAAA,oBAAK,EAAC,OAAO,CAAC,EAAE,CAAC,kCAAe,EAAE,EAAE,WAAW,EAAE,gCAAgC,EAAE,CAAC;IACjE,mBAAA,IAAA,mBAAI,GAAE,CAAA;IAAqB,mBAAA,IAAA,kBAAG,GAAE,CAAA;;6CAAjB,iBAAS;;oDAO3C;AAGD;IADC,IAAA,4BAAa,EAAC,IAAI,CAAC,EAAE,CAAC,cAAM,CAAC;IAChB,mBAAA,IAAA,mBAAI,GAAE,CAAA;;6CAAc,yBAAW;;8CAE5C;AAGD;IADC,IAAA,4BAAa,EAAC,IAAI,CAAC,EAAE,CAAC,gBAAI,CAAC;IACb,mBAAA,IAAA,mBAAI,GAAE,CAAA;;6CAAc,yBAAW;;+CAE7C;AAGD;IADC,IAAA,4BAAa,EAAC,IAAI,CAAC,EAAE,CAAC,gBAAI,CAAC;IACb,mBAAA,IAAA,mBAAI,GAAE,CAAA;;6CAAc,yBAAW;;+CAE7C;AA7BU,gBAAgB;IAD5B,IAAA,uBAAQ,EAAC,yBAAW,CAAC;GACT,gBAAgB,CA8B5B;AA9BY,4CAAgB","sourcesContent":["import { Arg, Args, Ctx, FieldResolver, Query, Resolver, Root } from 'type-graphql'\n\nimport { User } from '@things-factory/auth-base'\nimport { convertListParams, Domain, getRepository, ListParam } from '@things-factory/shell'\n\nimport { Sellercraft } from './sellercraft'\nimport { SellercraftList } from './sellercraft-type'\n\n@Resolver(Sellercraft)\nexport class SellercraftQuery {\n @Query(returns => Sellercraft, { description: 'To fetch a Sellercraft' })\n async sellercraft(@Arg('id') id: string, @Ctx() context: ResolverContext): Promise<Sellercraft> {\n return await getRepository(Sellercraft).findOneBy({ id })\n }\n\n @Query(returns => SellercraftList, { description: 'To fetch multiple Sellercrafts' })\n async sellercrafts(@Args() params: ListParam, @Ctx() context: ResolverContext): Promise<SellercraftList> {\n const { domain } = context.state\n\n const convertedParams = convertListParams(params, { domain })\n const [items, total] = await getRepository(Sellercraft).findAndCount(convertedParams)\n\n return { items, total }\n }\n\n @FieldResolver(type => Domain)\n async domain(@Root() sellercraft: Sellercraft): Promise<Domain> {\n return await getRepository(Domain).findOneBy({ id: sellercraft.domainId })\n }\n\n @FieldResolver(type => User)\n async updater(@Root() sellercraft: Sellercraft): Promise<User> {\n return await getRepository(User).findOneBy({ id: sellercraft.updaterId })\n }\n\n @FieldResolver(type => User)\n async creator(@Root() sellercraft: Sellercraft): Promise<User> {\n return await getRepository(User).findOneBy({ id: sellercraft.creatorId })\n }\n}\n"]}
|
@@ -1,88 +1,80 @@
|
|
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.SellercraftList = exports.SellercraftPatch = exports.NewSellercraft = void 0;
|
4
|
+
const tslib_1 = require("tslib");
|
13
5
|
const type_graphql_1 = require("type-graphql");
|
14
6
|
const sellercraft_1 = require("./sellercraft");
|
15
7
|
let NewSellercraft = class NewSellercraft {
|
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
|
], NewSellercraft.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
|
], NewSellercraft.prototype, "description", void 0);
|
25
|
-
__decorate([
|
17
|
+
tslib_1.__decorate([
|
26
18
|
(0, type_graphql_1.Field)(type => sellercraft_1.SellercraftPlatform, { nullable: true }),
|
27
|
-
__metadata("design:type", String)
|
19
|
+
tslib_1.__metadata("design:type", String)
|
28
20
|
], NewSellercraft.prototype, "platform", void 0);
|
29
|
-
__decorate([
|
21
|
+
tslib_1.__decorate([
|
30
22
|
(0, type_graphql_1.Field)(),
|
31
|
-
__metadata("design:type", String)
|
23
|
+
tslib_1.__metadata("design:type", String)
|
32
24
|
], NewSellercraft.prototype, "accountId", void 0);
|
33
|
-
__decorate([
|
25
|
+
tslib_1.__decorate([
|
34
26
|
(0, type_graphql_1.Field)(type => sellercraft_1.SellercraftStatus, { nullable: true }),
|
35
|
-
__metadata("design:type", String)
|
27
|
+
tslib_1.__metadata("design:type", String)
|
36
28
|
], NewSellercraft.prototype, "status", void 0);
|
37
|
-
NewSellercraft = __decorate([
|
29
|
+
NewSellercraft = tslib_1.__decorate([
|
38
30
|
(0, type_graphql_1.InputType)()
|
39
31
|
], NewSellercraft);
|
40
32
|
exports.NewSellercraft = NewSellercraft;
|
41
33
|
let SellercraftPatch = class SellercraftPatch {
|
42
34
|
};
|
43
|
-
__decorate([
|
35
|
+
tslib_1.__decorate([
|
44
36
|
(0, type_graphql_1.Field)(type => type_graphql_1.ID, { nullable: true }),
|
45
|
-
__metadata("design:type", String)
|
37
|
+
tslib_1.__metadata("design:type", String)
|
46
38
|
], SellercraftPatch.prototype, "id", void 0);
|
47
|
-
__decorate([
|
39
|
+
tslib_1.__decorate([
|
48
40
|
(0, type_graphql_1.Field)({ nullable: true }),
|
49
|
-
__metadata("design:type", String)
|
41
|
+
tslib_1.__metadata("design:type", String)
|
50
42
|
], SellercraftPatch.prototype, "name", void 0);
|
51
|
-
__decorate([
|
43
|
+
tslib_1.__decorate([
|
52
44
|
(0, type_graphql_1.Field)(type => sellercraft_1.SellercraftPlatform, { nullable: true }),
|
53
|
-
__metadata("design:type", String)
|
45
|
+
tslib_1.__metadata("design:type", String)
|
54
46
|
], SellercraftPatch.prototype, "platform", void 0);
|
55
|
-
__decorate([
|
47
|
+
tslib_1.__decorate([
|
56
48
|
(0, type_graphql_1.Field)({ nullable: true }),
|
57
|
-
__metadata("design:type", String)
|
49
|
+
tslib_1.__metadata("design:type", String)
|
58
50
|
], SellercraftPatch.prototype, "accountId", void 0);
|
59
|
-
__decorate([
|
51
|
+
tslib_1.__decorate([
|
60
52
|
(0, type_graphql_1.Field)({ nullable: true }),
|
61
|
-
__metadata("design:type", String)
|
53
|
+
tslib_1.__metadata("design:type", String)
|
62
54
|
], SellercraftPatch.prototype, "description", void 0);
|
63
|
-
__decorate([
|
55
|
+
tslib_1.__decorate([
|
64
56
|
(0, type_graphql_1.Field)(type => sellercraft_1.SellercraftStatus, { nullable: true }),
|
65
|
-
__metadata("design:type", String)
|
57
|
+
tslib_1.__metadata("design:type", String)
|
66
58
|
], SellercraftPatch.prototype, "status", void 0);
|
67
|
-
__decorate([
|
59
|
+
tslib_1.__decorate([
|
68
60
|
(0, type_graphql_1.Field)({ nullable: true }),
|
69
|
-
__metadata("design:type", String)
|
61
|
+
tslib_1.__metadata("design:type", String)
|
70
62
|
], SellercraftPatch.prototype, "cuFlag", void 0);
|
71
|
-
SellercraftPatch = __decorate([
|
63
|
+
SellercraftPatch = tslib_1.__decorate([
|
72
64
|
(0, type_graphql_1.InputType)()
|
73
65
|
], SellercraftPatch);
|
74
66
|
exports.SellercraftPatch = SellercraftPatch;
|
75
67
|
let SellercraftList = class SellercraftList {
|
76
68
|
};
|
77
|
-
__decorate([
|
69
|
+
tslib_1.__decorate([
|
78
70
|
(0, type_graphql_1.Field)(type => [sellercraft_1.Sellercraft]),
|
79
|
-
__metadata("design:type", Array)
|
71
|
+
tslib_1.__metadata("design:type", Array)
|
80
72
|
], SellercraftList.prototype, "items", void 0);
|
81
|
-
__decorate([
|
73
|
+
tslib_1.__decorate([
|
82
74
|
(0, type_graphql_1.Field)(type => type_graphql_1.Int),
|
83
|
-
__metadata("design:type", Number)
|
75
|
+
tslib_1.__metadata("design:type", Number)
|
84
76
|
], SellercraftList.prototype, "total", void 0);
|
85
|
-
SellercraftList = __decorate([
|
77
|
+
SellercraftList = tslib_1.__decorate([
|
86
78
|
(0, type_graphql_1.ObjectType)()
|
87
79
|
], SellercraftList);
|
88
80
|
exports.SellercraftList = SellercraftList;
|
@@ -1 +1 @@
|
|
1
|
-
{"version":3,"file":"sellercraft-type.js","sourceRoot":"","sources":["../../../server/service/sellercraft/sellercraft-type.ts"],"names":[],"mappings":"
|
1
|
+
{"version":3,"file":"sellercraft-type.js","sourceRoot":"","sources":["../../../server/service/sellercraft/sellercraft-type.ts"],"names":[],"mappings":";;;;AAAA,+CAAoE;AAEpE,+CAAmF;AAGnF,IAAa,cAAc,GAA3B,MAAa,cAAc;CAe1B,CAAA;AAbC;IADC,IAAA,oBAAK,GAAE;;4CACI;AAGZ;IADC,IAAA,oBAAK,EAAC,EAAE,QAAQ,EAAE,IAAI,EA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,CAAC,EAAE,CAAC,CAAC,yBAAW,CAAC,CAAC;;8CACT;AAGpB;IADC,IAAA,oBAAK,EAAC,IAAI,CAAC,EAAE,CAAC,kBAAG,CAAC;;8CACN;AALF,eAAe;IAD3B,IAAA,yBAAU,GAAE;GACA,eAAe,CAM3B;AANY,0CAAe","sourcesContent":["import { Field, ID, InputType, Int, ObjectType } from 'type-graphql'\n\nimport { Sellercraft, SellercraftPlatform, SellercraftStatus } from './sellercraft'\n\n@InputType()\nexport class NewSellercraft {\n @Field()\n name: string\n\n @Field({ nullable: true })\n description?: string\n\n @Field(type => SellercraftPlatform, { nullable: true })\n platform: SellercraftPlatform\n\n @Field()\n accountId: string\n\n @Field(type => SellercraftStatus, { nullable: true })\n status?: SellercraftStatus\n}\n\n@InputType()\nexport class SellercraftPatch {\n @Field(type => ID, { nullable: true })\n id?: string\n\n @Field({ nullable: true })\n name?: string\n\n @Field(type => SellercraftPlatform, { nullable: true })\n platform?: SellercraftPlatform\n\n @Field({ nullable: true })\n accountId?: string\n\n @Field({ nullable: true })\n description?: string\n\n @Field(type => SellercraftStatus, { nullable: true })\n status?: SellercraftStatus\n\n @Field({ nullable: true })\n cuFlag?: string\n}\n\n@ObjectType()\nexport class SellercraftList {\n @Field(type => [Sellercraft])\n items: Sellercraft[]\n\n @Field(type => Int)\n total: number\n}\n"]}
|
@@ -1,16 +1,7 @@
|
|
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 _a, _b, _c;
|
12
2
|
Object.defineProperty(exports, "__esModule", { value: true });
|
13
3
|
exports.Sellercraft = exports.SellercraftPlatform = exports.SellercraftStatus = void 0;
|
4
|
+
const tslib_1 = require("tslib");
|
14
5
|
const type_graphql_1 = require("type-graphql");
|
15
6
|
const typeorm_1 = require("typeorm");
|
16
7
|
const auth_base_1 = require("@things-factory/auth-base");
|
@@ -35,74 +26,79 @@ var SellercraftPlatform;
|
|
35
26
|
});
|
36
27
|
let Sellercraft = class Sellercraft {
|
37
28
|
};
|
38
|
-
__decorate([
|
29
|
+
tslib_1.__decorate([
|
39
30
|
(0, typeorm_1.PrimaryGeneratedColumn)('uuid'),
|
40
31
|
(0, type_graphql_1.Field)(type => type_graphql_1.ID),
|
41
|
-
__metadata("design:type", String)
|
32
|
+
tslib_1.__metadata("design:type", String)
|
42
33
|
], Sellercraft.prototype, "id", void 0);
|
43
|
-
__decorate([
|
34
|
+
tslib_1.__decorate([
|
44
35
|
(0, typeorm_1.ManyToOne)(type => shell_1.Domain),
|
45
36
|
(0, type_graphql_1.Field)({ nullable: true }),
|
46
|
-
__metadata("design:type",
|
37
|
+
tslib_1.__metadata("design:type", shell_1.Domain)
|
47
38
|
], Sellercraft.prototype, "domain", void 0);
|
48
|
-
__decorate([
|
39
|
+
tslib_1.__decorate([
|
49
40
|
(0, typeorm_1.RelationId)((sellercraft) => sellercraft.domain),
|
50
|
-
__metadata("design:type", String)
|
41
|
+
tslib_1.__metadata("design:type", String)
|
51
42
|
], Sellercraft.prototype, "domainId", void 0);
|
52
|
-
__decorate([
|
43
|
+
tslib_1.__decorate([
|
53
44
|
(0, typeorm_1.Column)(),
|
54
45
|
(0, type_graphql_1.Field)(),
|
55
|
-
__metadata("design:type", String)
|
46
|
+
tslib_1.__metadata("design:type", String)
|
56
47
|
], Sellercraft.prototype, "name", void 0);
|
57
|
-
__decorate([
|
48
|
+
tslib_1.__decorate([
|
58
49
|
(0, typeorm_1.Column)({ nullable: true }),
|
59
50
|
(0, type_graphql_1.Field)({ nullable: true }),
|
60
|
-
__metadata("design:type", String)
|
51
|
+
tslib_1.__metadata("design:type", String)
|
61
52
|
], Sellercraft.prototype, "description", void 0);
|
62
|
-
__decorate([
|
53
|
+
tslib_1.__decorate([
|
63
54
|
(0, typeorm_1.Column)(),
|
64
55
|
(0, type_graphql_1.Field)(),
|
65
|
-
__metadata("design:type", String)
|
56
|
+
tslib_1.__metadata("design:type", String)
|
66
57
|
], Sellercraft.prototype, "accountId", void 0);
|
67
|
-
__decorate([
|
58
|
+
tslib_1.__decorate([
|
68
59
|
(0, typeorm_1.Column)(),
|
69
60
|
(0, type_graphql_1.Field)(),
|
70
|
-
__metadata("design:type", String)
|
61
|
+
tslib_1.__metadata("design:type", String)
|
71
62
|
], Sellercraft.prototype, "platform", void 0);
|
72
|
-
__decorate([
|
63
|
+
tslib_1.__decorate([
|
73
64
|
(0, typeorm_1.Column)({ nullable: true }),
|
74
65
|
(0, type_graphql_1.Field)({ nullable: true }),
|
75
|
-
__metadata("design:type", String)
|
66
|
+
tslib_1.__metadata("design:type", String)
|
76
67
|
], Sellercraft.prototype, "status", void 0);
|
77
|
-
__decorate([
|
68
|
+
tslib_1.__decorate([
|
69
|
+
(0, typeorm_1.Column)('simple-json', { nullable: true }),
|
70
|
+
(0, type_graphql_1.Field)(type => shell_1.ScalarObject, { nullable: true }),
|
71
|
+
tslib_1.__metadata("design:type", Object)
|
72
|
+
], Sellercraft.prototype, "sellercraftSetting", void 0);
|
73
|
+
tslib_1.__decorate([
|
78
74
|
(0, typeorm_1.CreateDateColumn)(),
|
79
75
|
(0, type_graphql_1.Field)({ nullable: true }),
|
80
|
-
__metadata("design:type", Date)
|
76
|
+
tslib_1.__metadata("design:type", Date)
|
81
77
|
], Sellercraft.prototype, "createdAt", void 0);
|
82
|
-
__decorate([
|
78
|
+
tslib_1.__decorate([
|
83
79
|
(0, typeorm_1.UpdateDateColumn)(),
|
84
80
|
(0, type_graphql_1.Field)({ nullable: true }),
|
85
|
-
__metadata("design:type", Date)
|
81
|
+
tslib_1.__metadata("design:type", Date)
|
86
82
|
], Sellercraft.prototype, "updatedAt", void 0);
|
87
|
-
__decorate([
|
83
|
+
tslib_1.__decorate([
|
88
84
|
(0, typeorm_1.ManyToOne)(type => auth_base_1.User, { nullable: true }),
|
89
85
|
(0, type_graphql_1.Field)({ nullable: true }),
|
90
|
-
__metadata("design:type",
|
86
|
+
tslib_1.__metadata("design:type", auth_base_1.User)
|
91
87
|
], Sellercraft.prototype, "creator", void 0);
|
92
|
-
__decorate([
|
88
|
+
tslib_1.__decorate([
|
93
89
|
(0, typeorm_1.RelationId)((sellercraft) => sellercraft.creator),
|
94
|
-
__metadata("design:type", String)
|
90
|
+
tslib_1.__metadata("design:type", String)
|
95
91
|
], Sellercraft.prototype, "creatorId", void 0);
|
96
|
-
__decorate([
|
92
|
+
tslib_1.__decorate([
|
97
93
|
(0, typeorm_1.ManyToOne)(type => auth_base_1.User, { nullable: true }),
|
98
94
|
(0, type_graphql_1.Field)({ nullable: true }),
|
99
|
-
__metadata("design:type",
|
95
|
+
tslib_1.__metadata("design:type", auth_base_1.User)
|
100
96
|
], Sellercraft.prototype, "updater", void 0);
|
101
|
-
__decorate([
|
97
|
+
tslib_1.__decorate([
|
102
98
|
(0, typeorm_1.RelationId)((sellercraft) => sellercraft.updater),
|
103
|
-
__metadata("design:type", String)
|
99
|
+
tslib_1.__metadata("design:type", String)
|
104
100
|
], Sellercraft.prototype, "updaterId", void 0);
|
105
|
-
Sellercraft = __decorate([
|
101
|
+
Sellercraft = tslib_1.__decorate([
|
106
102
|
(0, typeorm_1.Entity)(),
|
107
103
|
(0, typeorm_1.Index)('ix_sellercraft_0', (sellercraft) => [sellercraft.domain, sellercraft.name], { unique: true }),
|
108
104
|
(0, type_graphql_1.ObjectType)({ description: 'Entity for Sellercraft' })
|
@@ -1 +1 @@
|
|
1
|
-
{"version":3,"file":"sellercraft.js","sourceRoot":"","sources":["../../../server/service/sellercraft/sellercraft.ts"],"names":[],"mappings":"
|
1
|
+
{"version":3,"file":"sellercraft.js","sourceRoot":"","sources":["../../../server/service/sellercraft/sellercraft.ts"],"names":[],"mappings":";;;;AAAA,+CAAsE;AACtE,qCASgB;AAEhB,yDAAgD;AAChD,iDAA4D;AAE5D,IAAY,iBAIX;AAJD,WAAY,iBAAiB;IAC3B,sCAAiB,CAAA;IACjB,0CAAqB,CAAA;IACrB,8CAAyB,CAAA;AAC3B,CAAC,EAJW,iBAAiB,GAAjB,yBAAiB,KAAjB,yBAAiB,QAI5B;AAED,IAAA,+BAAgB,EAAC,iBAAiB,EAAE;IAClC,IAAI,EAAE,mBAAmB;IACzB,WAAW,EAAE,oCAAoC;CAClD,CAAC,CAAA;AAEF,IAAY,mBAEX;AAFD,WAAY,mBAAmB;IAC7B,kDAA2B,CAAA;AAC7B,CAAC,EAFW,mBAAmB,GAAnB,2BAAmB,KAAnB,2BAAmB,QAE9B;AAED,IAAA,+BAAgB,EAAC,mBAAmB,EAAE;IACpC,IAAI,EAAE,qBAAqB;IAC3B,WAAW,EAAE,uCAAuC;CACrD,CAAC,CAAA;AAKF,IAAa,WAAW,GAAxB,MAAa,WAAW;CAyDvB,CAAA;AAtDC;IAFC,IAAA,gCAAsB,EAAC,MAAM,CAAC;IAC9B,IAAA,oBAAK,EAAC,IAAI,CAAC,EAAE,CAAC,iBAAE,CAAC;;uCACC;AAInB;IAFC,IAAA,mBAAS,EAAC,IAAI,CAAC,EAAE,CAAC,cAAM,CAAC;IACzB,IAAA,oBAAK,EAAC,EAAE,QAAQ,EAAE,IAAI,EAAE,CAAC;sCACjB,cAAM;2CAAA;AAGf;IADC,IAAA,oBAAU,EAAC,CAAC,WAAwB,EAAE,EAAE,CAAC,WAAW,CAAC,MAAM,CAAC;;6CAC5C;AAIjB;IAF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AI,EAAE,EAAE,QAAQ,EAAE,IAAI,EAAE,CAAC;IAC3C,IAAA,oBAAK,EAAC,EAAE,QAAQ,EAAE,IAAI,EAAE,CAAC;sCAChB,gBAAI;4CAAA;AAGd;IADC,IAAA,oBAAU,EAAC,CAAC,WAAwB,EAAE,EAAE,CAAC,WAAW,CAAC,OAAO,CAAC;;8CAC5C;AAxDP,WAAW;IAHvB,IAAA,gBAAM,GAAE;IACR,IAAA,eAAK,EAAC,kBAAkB,EAAE,CAAC,WAAwB,EAAE,EAAE,CAAC,CAAC,WAAW,CAAC,MAAM,EAAE,WAAW,CAAC,IAAI,CAAC,EAAE,EAAE,MAAM,EAAE,IAAI,EAAE,CAAC;IACjH,IAAA,yBAAU,EAAC,EAAE,WAAW,EAAE,wBAAwB,EAAE,CAAC;GACzC,WAAW,CAyDvB;AAzDY,kCAAW","sourcesContent":["import { Field, ID, ObjectType, registerEnumType } from 'type-graphql'\nimport {\n Column,\n CreateDateColumn,\n Entity,\n Index,\n ManyToOne,\n PrimaryGeneratedColumn,\n RelationId,\n UpdateDateColumn\n} from 'typeorm'\n\nimport { User } from '@things-factory/auth-base'\nimport { Domain, ScalarObject } from '@things-factory/shell'\n\nexport enum SellercraftStatus {\n ACTIVE = 'ACTIVE',\n INACTIVE = 'INACTIVE',\n TERMINATED = 'TERMINATED'\n}\n\nregisterEnumType(SellercraftStatus, {\n name: 'SellercraftStatus',\n description: 'state enumeration of a sellercraft'\n})\n\nexport enum SellercraftPlatform {\n SELLERCRAFT = 'SELLERCRAFT'\n}\n\nregisterEnumType(SellercraftPlatform, {\n name: 'SellercraftPlatform',\n description: 'platform enumeration of a sellercraft'\n})\n\n@Entity()\n@Index('ix_sellercraft_0', (sellercraft: Sellercraft) => [sellercraft.domain, sellercraft.name], { unique: true })\n@ObjectType({ description: 'Entity for Sellercraft' })\nexport class Sellercraft {\n @PrimaryGeneratedColumn('uuid')\n @Field(type => ID)\n readonly id: string\n\n @ManyToOne(type => Domain)\n @Field({ nullable: true })\n domain?: Domain\n\n @RelationId((sellercraft: Sellercraft) => sellercraft.domain)\n domainId?: string\n\n @Column()\n @Field()\n name: string\n\n @Column({ nullable: true })\n @Field({ nullable: true })\n description?: string\n\n @Column()\n @Field()\n accountId: string\n\n @Column()\n @Field()\n platform: SellercraftPlatform\n\n @Column({ nullable: true })\n @Field({ nullable: true })\n status?: SellercraftStatus\n\n @Column('simple-json', { nullable: true })\n @Field(type => ScalarObject, { nullable: true })\n sellercraftSetting?: object\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, { nullable: true })\n @Field({ nullable: true })\n creator?: User\n\n @RelationId((sellercraft: Sellercraft) => sellercraft.creator)\n creatorId?: string\n\n @ManyToOne(type => User, { nullable: true })\n @Field({ nullable: true })\n updater?: User\n\n @RelationId((sellercraft: Sellercraft) => sellercraft.updater)\n updaterId?: string\n}\n"]}
|