@things-factory/document-template-base 6.1.94 → 6.1.96
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/service/doc-template/doc-template-mutation.js +112 -0
- package/dist-server/service/doc-template/doc-template-mutation.js.map +1 -0
- package/dist-server/service/doc-template/doc-template-query.js +80 -0
- package/dist-server/service/doc-template/doc-template-query.js.map +1 -0
- package/dist-server/service/doc-template/doc-template-type.js +113 -0
- package/dist-server/service/doc-template/doc-template-type.js.map +1 -0
- package/dist-server/service/doc-template/doc-template.js +105 -0
- package/dist-server/service/doc-template/doc-template.js.map +1 -0
- package/dist-server/service/doc-template/index.js +9 -0
- package/dist-server/service/doc-template/index.js.map +1 -0
- package/dist-server/service/index.js +4 -0
- package/dist-server/service/index.js.map +1 -1
- package/dist-server/tsconfig.tsbuildinfo +1 -1
- package/package.json +4 -4
- package/server/service/doc-template/doc-template-mutation.ts +120 -0
- package/server/service/doc-template/doc-template-query.ts +49 -0
- package/server/service/doc-template/doc-template-type.ts +80 -0
- package/server/service/doc-template/doc-template.ts +90 -0
- package/server/service/doc-template/index.ts +7 -0
- package/server/service/index.ts +4 -0
|
@@ -0,0 +1,112 @@
|
|
|
1
|
+
"use strict";
|
|
2
|
+
Object.defineProperty(exports, "__esModule", { value: true });
|
|
3
|
+
exports.DocTemplateMutation = void 0;
|
|
4
|
+
const tslib_1 = require("tslib");
|
|
5
|
+
const type_graphql_1 = require("type-graphql");
|
|
6
|
+
const doc_template_1 = require("./doc-template");
|
|
7
|
+
const doc_template_type_1 = require("./doc-template-type");
|
|
8
|
+
let DocTemplateMutation = class DocTemplateMutation {
|
|
9
|
+
async createDocTemplate(docTemplate, context) {
|
|
10
|
+
const { domain, user, tx } = context.state;
|
|
11
|
+
return await tx.getRepository(doc_template_1.DocTemplate).save(Object.assign(Object.assign({}, docTemplate), { domain, creator: user, updater: user }));
|
|
12
|
+
}
|
|
13
|
+
async updateDocTemplate(id, patch, context) {
|
|
14
|
+
const { domain, user, tx } = context.state;
|
|
15
|
+
const repository = tx.getRepository(doc_template_1.DocTemplate);
|
|
16
|
+
const docTemplate = await repository.findOne({
|
|
17
|
+
where: { domain: { id: domain.id }, id },
|
|
18
|
+
relations: ['domain', 'updater', 'creator']
|
|
19
|
+
});
|
|
20
|
+
return await repository.save(Object.assign(Object.assign(Object.assign({}, docTemplate), patch), { updater: user }));
|
|
21
|
+
}
|
|
22
|
+
async updateMultipleDocTemplate(patches, context) {
|
|
23
|
+
const { domain, user, tx } = context.state;
|
|
24
|
+
let results = [];
|
|
25
|
+
const _createRecords = patches.filter((patch) => patch.cuFlag.toUpperCase() === '+');
|
|
26
|
+
const _updateRecords = patches.filter((patch) => patch.cuFlag.toUpperCase() === 'M');
|
|
27
|
+
const docTemplateRepo = tx.getRepository(doc_template_1.DocTemplate);
|
|
28
|
+
if (_createRecords.length > 0) {
|
|
29
|
+
for (let i = 0; i < _createRecords.length; i++) {
|
|
30
|
+
const newRecord = _createRecords[i];
|
|
31
|
+
const result = await docTemplateRepo.save(Object.assign(Object.assign({}, newRecord), { domain, creator: user, updater: user }));
|
|
32
|
+
results.push(Object.assign(Object.assign({}, result), { cuFlag: '+' }));
|
|
33
|
+
}
|
|
34
|
+
}
|
|
35
|
+
if (_updateRecords.length > 0) {
|
|
36
|
+
for (let i = 0; i < _updateRecords.length; i++) {
|
|
37
|
+
const updRecord = _updateRecords[i];
|
|
38
|
+
const docTemplate = await docTemplateRepo.findOne({
|
|
39
|
+
where: { domain: { id: domain.id }, id: updRecord.id },
|
|
40
|
+
relations: ['domain', 'updater', 'creator']
|
|
41
|
+
});
|
|
42
|
+
const result = await docTemplateRepo.save(Object.assign(Object.assign(Object.assign({}, docTemplate), updRecord), { updater: user }));
|
|
43
|
+
results.push(Object.assign(Object.assign({}, result), { cuFlag: 'M' }));
|
|
44
|
+
}
|
|
45
|
+
}
|
|
46
|
+
return results;
|
|
47
|
+
}
|
|
48
|
+
async deleteDocTemplate(id, context) {
|
|
49
|
+
const { domain, tx, user } = context.state;
|
|
50
|
+
await tx.getRepository(doc_template_1.DocTemplate).remove({ domain, id, updater: user });
|
|
51
|
+
return true;
|
|
52
|
+
}
|
|
53
|
+
async deleteDocTemplates(ids, context) {
|
|
54
|
+
const { domain, tx, user } = context.state;
|
|
55
|
+
let delEntitis = ids.map(id => {
|
|
56
|
+
return { domain, id, updater: user };
|
|
57
|
+
});
|
|
58
|
+
await tx.getRepository(doc_template_1.DocTemplate).remove(delEntitis);
|
|
59
|
+
return true;
|
|
60
|
+
}
|
|
61
|
+
};
|
|
62
|
+
tslib_1.__decorate([
|
|
63
|
+
(0, type_graphql_1.Directive)('@transaction'),
|
|
64
|
+
(0, type_graphql_1.Mutation)(returns => doc_template_1.DocTemplate, { description: 'To create new DocTemplate' }),
|
|
65
|
+
tslib_1.__param(0, (0, type_graphql_1.Arg)('docTemplate')),
|
|
66
|
+
tslib_1.__param(1, (0, type_graphql_1.Ctx)()),
|
|
67
|
+
tslib_1.__metadata("design:type", Function),
|
|
68
|
+
tslib_1.__metadata("design:paramtypes", [doc_template_type_1.NewDocTemplate, Object]),
|
|
69
|
+
tslib_1.__metadata("design:returntype", Promise)
|
|
70
|
+
], DocTemplateMutation.prototype, "createDocTemplate", null);
|
|
71
|
+
tslib_1.__decorate([
|
|
72
|
+
(0, type_graphql_1.Directive)('@transaction'),
|
|
73
|
+
(0, type_graphql_1.Mutation)(returns => doc_template_1.DocTemplate, { description: 'To modify DocTemplate information' }),
|
|
74
|
+
tslib_1.__param(0, (0, type_graphql_1.Arg)('id')),
|
|
75
|
+
tslib_1.__param(1, (0, type_graphql_1.Arg)('patch')),
|
|
76
|
+
tslib_1.__param(2, (0, type_graphql_1.Ctx)()),
|
|
77
|
+
tslib_1.__metadata("design:type", Function),
|
|
78
|
+
tslib_1.__metadata("design:paramtypes", [String, doc_template_type_1.DocTemplatePatch, Object]),
|
|
79
|
+
tslib_1.__metadata("design:returntype", Promise)
|
|
80
|
+
], DocTemplateMutation.prototype, "updateDocTemplate", null);
|
|
81
|
+
tslib_1.__decorate([
|
|
82
|
+
(0, type_graphql_1.Directive)('@transaction'),
|
|
83
|
+
(0, type_graphql_1.Mutation)(returns => [doc_template_1.DocTemplate], { description: "To modify multiple DocTemplates' information" }),
|
|
84
|
+
tslib_1.__param(0, (0, type_graphql_1.Arg)('patches', type => [doc_template_type_1.DocTemplatePatch])),
|
|
85
|
+
tslib_1.__param(1, (0, type_graphql_1.Ctx)()),
|
|
86
|
+
tslib_1.__metadata("design:type", Function),
|
|
87
|
+
tslib_1.__metadata("design:paramtypes", [Array, Object]),
|
|
88
|
+
tslib_1.__metadata("design:returntype", Promise)
|
|
89
|
+
], DocTemplateMutation.prototype, "updateMultipleDocTemplate", null);
|
|
90
|
+
tslib_1.__decorate([
|
|
91
|
+
(0, type_graphql_1.Directive)('@transaction'),
|
|
92
|
+
(0, type_graphql_1.Mutation)(returns => Boolean, { description: 'To delete DocTemplate' }),
|
|
93
|
+
tslib_1.__param(0, (0, type_graphql_1.Arg)('id')),
|
|
94
|
+
tslib_1.__param(1, (0, type_graphql_1.Ctx)()),
|
|
95
|
+
tslib_1.__metadata("design:type", Function),
|
|
96
|
+
tslib_1.__metadata("design:paramtypes", [String, Object]),
|
|
97
|
+
tslib_1.__metadata("design:returntype", Promise)
|
|
98
|
+
], DocTemplateMutation.prototype, "deleteDocTemplate", null);
|
|
99
|
+
tslib_1.__decorate([
|
|
100
|
+
(0, type_graphql_1.Directive)('@transaction'),
|
|
101
|
+
(0, type_graphql_1.Mutation)(returns => Boolean, { description: 'To delete multiple docTemplates' }),
|
|
102
|
+
tslib_1.__param(0, (0, type_graphql_1.Arg)('ids', type => [String])),
|
|
103
|
+
tslib_1.__param(1, (0, type_graphql_1.Ctx)()),
|
|
104
|
+
tslib_1.__metadata("design:type", Function),
|
|
105
|
+
tslib_1.__metadata("design:paramtypes", [Array, Object]),
|
|
106
|
+
tslib_1.__metadata("design:returntype", Promise)
|
|
107
|
+
], DocTemplateMutation.prototype, "deleteDocTemplates", null);
|
|
108
|
+
DocTemplateMutation = tslib_1.__decorate([
|
|
109
|
+
(0, type_graphql_1.Resolver)(doc_template_1.DocTemplate)
|
|
110
|
+
], DocTemplateMutation);
|
|
111
|
+
exports.DocTemplateMutation = DocTemplateMutation;
|
|
112
|
+
//# sourceMappingURL=doc-template-mutation.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"doc-template-mutation.js","sourceRoot":"","sources":["../../../server/service/doc-template/doc-template-mutation.ts"],"names":[],"mappings":";;;;AACA,+CAAsE;AAEtE,iDAA4C;AAC5C,2DAAsE;AAK/D,IAAM,mBAAmB,GAAzB,MAAM,mBAAmB;IAGxB,AAAN,KAAK,CAAC,iBAAiB,CAAqB,WAA2B,EAAS,OAAY;QAC1F,MAAM,EAAE,MAAM,EAAE,IAAI,EAAE,EAAE,EAAE,GAAG,OAAO,CAAC,KAAK,CAAA;QAE1C,OAAO,MAAM,EAAE,CAAC,aAAa,CAAC,0BAAW,CAAC,CAAC,IAAI,iCAC1C,WAAW,KACd,MAAM,EACN,OAAO,EAAE,IAAI,EACb,OAAO,EAAE,IAAI,IACb,CAAA;IACJ,CAAC;IAIK,AAAN,KAAK,CAAC,iBAAiB,CACV,EAAU,EACP,KAAuB,EAC9B,OAAY;QAEnB,MAAM,EAAE,MAAM,EAAE,IAAI,EAAE,EAAE,EAAE,GAAG,OAAO,CAAC,KAAK,CAAA;QAE1C,MAAM,UAAU,GAAG,EAAE,CAAC,aAAa,CAAC,0BAAW,CAAC,CAAA;QAChD,MAAM,WAAW,GAAG,MAAM,UAAU,CAAC,OAAO,CAC1C;YACE,KAAK,EAAE,EAAE,MAAM,EAAE,EAAE,EAAE,EAAE,MAAM,CAAC,EAAE,EAAE,EAAE,EAAE,EAAE;YACxC,SAAS,EAAE,CAAC,QAAQ,EAAC,SAAS,EAAC,SAAS,CAAC;SAC1C,CACF,CAAA;QAED,OAAO,MAAM,UAAU,CAAC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EAAE,WAAW,EAAE,iCAAiC,EAAE,CAAC;IAE9E,mBAAA,IAAA,kBAAG,EAAC,KAAK,EAAE,IAAI,CAAC,EAAE,CAAC,CAAC,MAAM,CAAC,CAAC,CAAA;IAC5B,mBAAA,IAAA,kBAAG,GAAE,CAAA;;;;6DAUP;AA7GU,mBAAmB;IAD/B,IAAA,uBAAQ,EAAC,0BAAW,CAAC;GACT,mBAAmB,CA8G/B;AA9GY,kDAAmB","sourcesContent":["\nimport { Resolver, Mutation, Arg, Ctx, Directive } from 'type-graphql'\nimport { In } from 'typeorm'\nimport { DocTemplate } from './doc-template'\nimport { NewDocTemplate, DocTemplatePatch } from './doc-template-type'\nimport { Domain, getRepository } from '@things-factory/shell'\nimport { User } from '@things-factory/auth-base'\n\n@Resolver(DocTemplate)\nexport class DocTemplateMutation {\n @Directive('@transaction')\n @Mutation(returns => DocTemplate, { description: 'To create new DocTemplate' })\n async createDocTemplate(@Arg('docTemplate') docTemplate: NewDocTemplate, @Ctx() context: any): Promise<DocTemplate> {\n const { domain, user, tx } = context.state\n\n return await tx.getRepository(DocTemplate).save({\n ...docTemplate,\n domain,\n creator: user,\n updater: user\n })\n }\n\n @Directive('@transaction')\n @Mutation(returns => DocTemplate, { description: 'To modify DocTemplate information' })\n async updateDocTemplate(\n @Arg('id') id: string,\n @Arg('patch') patch: DocTemplatePatch,\n @Ctx() context: any\n ): Promise<DocTemplate> {\n const { domain, user, tx } = context.state\n\n const repository = tx.getRepository(DocTemplate)\n const docTemplate = await repository.findOne(\n {\n where: { domain: { id: domain.id }, id },\n relations: ['domain','updater','creator']\n }\n )\n\n return await repository.save({\n ...docTemplate,\n ...patch,\n updater: user\n })\n }\n\n @Directive('@transaction')\n @Mutation(returns => [DocTemplate], { description: \"To modify multiple DocTemplates' information\" })\n async updateMultipleDocTemplate(\n @Arg('patches', type => [DocTemplatePatch]) patches: DocTemplatePatch[],\n @Ctx() context: any\n ): Promise<DocTemplate[]> {\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 docTemplateRepo = tx.getRepository(DocTemplate)\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 docTemplateRepo.save({\n ...newRecord,\n domain,\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 updRecord = _updateRecords[i]\n const docTemplate = await docTemplateRepo.findOne({\n where: { domain: { id: domain.id }, id:updRecord.id },\n relations: ['domain','updater','creator']\n })\n \n const result = await docTemplateRepo.save({\n ...docTemplate,\n ...updRecord,\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 DocTemplate' })\n async deleteDocTemplate(@Arg('id') id: string, @Ctx() context: any): Promise<boolean> {\n const { domain, tx, user } = context.state\n await tx.getRepository(DocTemplate).remove({ domain, id, updater:user })\n return true\n }\n\n @Directive('@transaction')\n @Mutation(returns => Boolean, { description: 'To delete multiple docTemplates' })\n async deleteDocTemplates(\n @Arg('ids', type => [String]) ids: string[],\n @Ctx() context: any\n ): Promise<boolean> {\n const { domain, tx, user } = context.state\n\n let delEntitis = ids.map(id => {\n return {domain,id,updater:user}\n })\n\n await tx.getRepository(DocTemplate).remove(delEntitis)\n return true\n }\n}\n"]}
|
|
@@ -0,0 +1,80 @@
|
|
|
1
|
+
"use strict";
|
|
2
|
+
Object.defineProperty(exports, "__esModule", { value: true });
|
|
3
|
+
exports.DocTemplateQuery = void 0;
|
|
4
|
+
const tslib_1 = require("tslib");
|
|
5
|
+
const type_graphql_1 = require("type-graphql");
|
|
6
|
+
const shell_1 = require("@things-factory/shell");
|
|
7
|
+
const doc_template_1 = require("./doc-template");
|
|
8
|
+
const doc_template_type_1 = require("./doc-template-type");
|
|
9
|
+
const auth_base_1 = require("@things-factory/auth-base");
|
|
10
|
+
const shell_2 = require("@things-factory/shell");
|
|
11
|
+
let DocTemplateQuery = class DocTemplateQuery {
|
|
12
|
+
async docTemplate(id, context) {
|
|
13
|
+
const { domain } = context.state;
|
|
14
|
+
return await (0, shell_1.getRepository)(doc_template_1.DocTemplate).findOne({
|
|
15
|
+
where: { domain: { id: domain.id }, id }
|
|
16
|
+
});
|
|
17
|
+
}
|
|
18
|
+
async docTemplates(params, context) {
|
|
19
|
+
const { domain } = context.state;
|
|
20
|
+
const queryBuilder = (0, shell_1.getQueryBuilderFromListParams)({
|
|
21
|
+
domain,
|
|
22
|
+
params,
|
|
23
|
+
repository: await (0, shell_1.getRepository)(doc_template_1.DocTemplate),
|
|
24
|
+
searchables: ['name', 'description']
|
|
25
|
+
});
|
|
26
|
+
const [items, total] = await queryBuilder.getManyAndCount();
|
|
27
|
+
return { items, total };
|
|
28
|
+
}
|
|
29
|
+
async domain(docTemplate) {
|
|
30
|
+
return await (0, shell_1.getRepository)(shell_2.Domain).findOneBy({ id: docTemplate.domainId });
|
|
31
|
+
}
|
|
32
|
+
async creator(docTemplate) {
|
|
33
|
+
return await (0, shell_1.getRepository)(auth_base_1.User).findOneBy({ id: docTemplate.creatorId });
|
|
34
|
+
}
|
|
35
|
+
async updater(docTemplate) {
|
|
36
|
+
return await (0, shell_1.getRepository)(auth_base_1.User).findOneBy({ id: docTemplate.updaterId });
|
|
37
|
+
}
|
|
38
|
+
};
|
|
39
|
+
tslib_1.__decorate([
|
|
40
|
+
(0, type_graphql_1.Query)(returns => doc_template_1.DocTemplate, { description: 'To fetch a DocTemplate' }),
|
|
41
|
+
tslib_1.__param(0, (0, type_graphql_1.Arg)('id')),
|
|
42
|
+
tslib_1.__param(1, (0, type_graphql_1.Ctx)()),
|
|
43
|
+
tslib_1.__metadata("design:type", Function),
|
|
44
|
+
tslib_1.__metadata("design:paramtypes", [String, Object]),
|
|
45
|
+
tslib_1.__metadata("design:returntype", Promise)
|
|
46
|
+
], DocTemplateQuery.prototype, "docTemplate", null);
|
|
47
|
+
tslib_1.__decorate([
|
|
48
|
+
(0, type_graphql_1.Query)(returns => doc_template_type_1.DocTemplateList, { description: 'To fetch multiple DocTemplates' }),
|
|
49
|
+
tslib_1.__param(0, (0, type_graphql_1.Args)()),
|
|
50
|
+
tslib_1.__param(1, (0, type_graphql_1.Ctx)()),
|
|
51
|
+
tslib_1.__metadata("design:type", Function),
|
|
52
|
+
tslib_1.__metadata("design:paramtypes", [shell_1.ListParam, Object]),
|
|
53
|
+
tslib_1.__metadata("design:returntype", Promise)
|
|
54
|
+
], DocTemplateQuery.prototype, "docTemplates", null);
|
|
55
|
+
tslib_1.__decorate([
|
|
56
|
+
(0, type_graphql_1.FieldResolver)(type => shell_2.Domain),
|
|
57
|
+
tslib_1.__param(0, (0, type_graphql_1.Root)()),
|
|
58
|
+
tslib_1.__metadata("design:type", Function),
|
|
59
|
+
tslib_1.__metadata("design:paramtypes", [doc_template_1.DocTemplate]),
|
|
60
|
+
tslib_1.__metadata("design:returntype", Promise)
|
|
61
|
+
], DocTemplateQuery.prototype, "domain", null);
|
|
62
|
+
tslib_1.__decorate([
|
|
63
|
+
(0, type_graphql_1.FieldResolver)(type => auth_base_1.User),
|
|
64
|
+
tslib_1.__param(0, (0, type_graphql_1.Root)()),
|
|
65
|
+
tslib_1.__metadata("design:type", Function),
|
|
66
|
+
tslib_1.__metadata("design:paramtypes", [doc_template_1.DocTemplate]),
|
|
67
|
+
tslib_1.__metadata("design:returntype", Promise)
|
|
68
|
+
], DocTemplateQuery.prototype, "creator", null);
|
|
69
|
+
tslib_1.__decorate([
|
|
70
|
+
(0, type_graphql_1.FieldResolver)(type => auth_base_1.User),
|
|
71
|
+
tslib_1.__param(0, (0, type_graphql_1.Root)()),
|
|
72
|
+
tslib_1.__metadata("design:type", Function),
|
|
73
|
+
tslib_1.__metadata("design:paramtypes", [doc_template_1.DocTemplate]),
|
|
74
|
+
tslib_1.__metadata("design:returntype", Promise)
|
|
75
|
+
], DocTemplateQuery.prototype, "updater", null);
|
|
76
|
+
DocTemplateQuery = tslib_1.__decorate([
|
|
77
|
+
(0, type_graphql_1.Resolver)(doc_template_1.DocTemplate)
|
|
78
|
+
], DocTemplateQuery);
|
|
79
|
+
exports.DocTemplateQuery = DocTemplateQuery;
|
|
80
|
+
//# sourceMappingURL=doc-template-query.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"doc-template-query.js","sourceRoot":"","sources":["../../../server/service/doc-template/doc-template-query.ts"],"names":[],"mappings":";;;;AACA,+CAA8F;AAC9F,iDAAkH;AAClH,iDAA4C;AAC5C,2DAAqD;AAErD,yDAAgD;AAChD,iDAA8C;AAGvC,IAAM,gBAAgB,GAAtB,MAAM,gBAAgB;IAErB,AAAN,KAAK,CAAC,WAAW,CAAY,EAAU,EAAS,OAAY;QAC1D,MAAM,EAAE,MAAM,EAAE,GAAG,OAAO,CAAC,KAAK,CAAA;QAChC,OAAO,MAAM,IAAA,qBAAa,EAAC,0BAAW,CAAC,CAAC,OAAO,CAAC;YAC9C,KAAK,EAAE,EAAE,MAAM,EAAE,EAAE,EAAE,EAAE,MAAM,CAAC,EAAE,EAAE,EAAE,EAAE,EAAE;SACzC,CAAC,CAAA;IACJ,CAAC;IAGK,AAAN,KAAK,CAAC,YAAY,CAAS,MAAiB,EAAS,OAAY;QAC/D,MAAM,EAAE,MAAM,EAAE,GAAG,OAAO,CAAC,KAAK,CAAA;QAEhC,MAAM,YAAY,GAAG,IAAA,qCAA6B,EAAC;YACjD,MAAM;YACN,MAAM;YACN,UAAU,EAAE,MAAM,IAAA,qBAAa,EAAC,0BAAW,CAAC;YAC5C,WAAW,EAAE,CAAC,MAAM,EAAE,aAAa,CAAC;SACrC,CAAC,CAAA;QAEF,MAAM,CAAC,KAAK,EAAE,KAAK,CAAC,GAAG,MAAM,YAAY,CAAC,eA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I,CAAC;IACb,mBAAA,IAAA,mBAAI,GAAE,CAAA;;6CAAe,0BAAW;;+CAE9C;AAGK;IADL,IAAA,4BAAa,EAAC,IAAI,CAAC,EAAE,CAAC,gBAAI,CAAC;IACb,mBAAA,IAAA,mBAAI,GAAE,CAAA;;6CAAe,0BAAW;;+CAE9C;AArCU,gBAAgB;IAD5B,IAAA,uBAAQ,EAAC,0BAAW,CAAC;GACT,gBAAgB,CAsC5B;AAtCY,4CAAgB","sourcesContent":["\nimport { Resolver, Query, FieldResolver, Root, Args, Arg, Ctx, Directive } from 'type-graphql'\nimport { ListParam, convertListParams, getRepository, getQueryBuilderFromListParams } from '@things-factory/shell'\nimport { DocTemplate } from './doc-template'\nimport { DocTemplateList } from './doc-template-type'\n\nimport { User } from '@things-factory/auth-base'\nimport { Domain } from '@things-factory/shell'\n\n@Resolver(DocTemplate)\nexport class DocTemplateQuery {\n @Query(returns => DocTemplate, { description: 'To fetch a DocTemplate' })\n async docTemplate(@Arg('id') id: string, @Ctx() context: any): Promise<DocTemplate> {\n const { domain } = context.state\n return await getRepository(DocTemplate).findOne({\n where: { domain: { id: domain.id }, id }\n })\n }\n\n @Query(returns => DocTemplateList, { description: 'To fetch multiple DocTemplates' })\n async docTemplates(@Args() params: ListParam, @Ctx() context: any): Promise<DocTemplateList> {\n const { domain } = context.state\n\n const queryBuilder = getQueryBuilderFromListParams({\n domain,\n params,\n repository: await getRepository(DocTemplate),\n searchables: ['name', 'description']\n })\n\n const [items, total] = await queryBuilder.getManyAndCount()\n return { items, total }\n }\n\n @FieldResolver(type => Domain)\n async domain(@Root() docTemplate: DocTemplate): Promise<Domain> {\n return await getRepository(Domain).findOneBy({id:docTemplate.domainId})\n }\n\n @FieldResolver(type => User)\n async creator(@Root() docTemplate: DocTemplate): Promise<User> {\n return await getRepository(User).findOneBy({id:docTemplate.creatorId})\n }\n\n @FieldResolver(type => User)\n async updater(@Root() docTemplate: DocTemplate): Promise<User> {\n return await getRepository(User).findOneBy({id:docTemplate.updaterId})\n }\n}\n"]}
|
|
@@ -0,0 +1,113 @@
|
|
|
1
|
+
"use strict";
|
|
2
|
+
Object.defineProperty(exports, "__esModule", { value: true });
|
|
3
|
+
exports.DocTemplateList = exports.DocTemplatePatch = exports.NewDocTemplate = void 0;
|
|
4
|
+
const tslib_1 = require("tslib");
|
|
5
|
+
const type_graphql_1 = require("type-graphql");
|
|
6
|
+
const doc_template_1 = require("./doc-template");
|
|
7
|
+
let NewDocTemplate = class NewDocTemplate {
|
|
8
|
+
};
|
|
9
|
+
tslib_1.__decorate([
|
|
10
|
+
(0, type_graphql_1.Field)({ nullable: false }),
|
|
11
|
+
tslib_1.__metadata("design:type", String)
|
|
12
|
+
], NewDocTemplate.prototype, "name", void 0);
|
|
13
|
+
tslib_1.__decorate([
|
|
14
|
+
(0, type_graphql_1.Field)({ nullable: false }),
|
|
15
|
+
tslib_1.__metadata("design:type", String)
|
|
16
|
+
], NewDocTemplate.prototype, "description", void 0);
|
|
17
|
+
tslib_1.__decorate([
|
|
18
|
+
(0, type_graphql_1.Field)({ nullable: true }),
|
|
19
|
+
tslib_1.__metadata("design:type", String)
|
|
20
|
+
], NewDocTemplate.prototype, "jobType", void 0);
|
|
21
|
+
tslib_1.__decorate([
|
|
22
|
+
(0, type_graphql_1.Field)({ nullable: true }),
|
|
23
|
+
tslib_1.__metadata("design:type", String)
|
|
24
|
+
], NewDocTemplate.prototype, "jobClass", void 0);
|
|
25
|
+
tslib_1.__decorate([
|
|
26
|
+
(0, type_graphql_1.Field)({ nullable: true }),
|
|
27
|
+
tslib_1.__metadata("design:type", String)
|
|
28
|
+
], NewDocTemplate.prototype, "jobCategory", void 0);
|
|
29
|
+
tslib_1.__decorate([
|
|
30
|
+
(0, type_graphql_1.Field)({ nullable: true }),
|
|
31
|
+
tslib_1.__metadata("design:type", String)
|
|
32
|
+
], NewDocTemplate.prototype, "template", void 0);
|
|
33
|
+
tslib_1.__decorate([
|
|
34
|
+
(0, type_graphql_1.Field)({ nullable: true }),
|
|
35
|
+
tslib_1.__metadata("design:type", String)
|
|
36
|
+
], NewDocTemplate.prototype, "logic", void 0);
|
|
37
|
+
tslib_1.__decorate([
|
|
38
|
+
(0, type_graphql_1.Field)({ nullable: true }),
|
|
39
|
+
tslib_1.__metadata("design:type", Boolean)
|
|
40
|
+
], NewDocTemplate.prototype, "activeFlag", void 0);
|
|
41
|
+
tslib_1.__decorate([
|
|
42
|
+
(0, type_graphql_1.Field)({ nullable: true }),
|
|
43
|
+
tslib_1.__metadata("design:type", String)
|
|
44
|
+
], NewDocTemplate.prototype, "note", void 0);
|
|
45
|
+
NewDocTemplate = tslib_1.__decorate([
|
|
46
|
+
(0, type_graphql_1.InputType)()
|
|
47
|
+
], NewDocTemplate);
|
|
48
|
+
exports.NewDocTemplate = NewDocTemplate;
|
|
49
|
+
let DocTemplatePatch = class DocTemplatePatch {
|
|
50
|
+
};
|
|
51
|
+
tslib_1.__decorate([
|
|
52
|
+
(0, type_graphql_1.Field)(type => type_graphql_1.ID, { nullable: true }),
|
|
53
|
+
tslib_1.__metadata("design:type", String)
|
|
54
|
+
], DocTemplatePatch.prototype, "id", void 0);
|
|
55
|
+
tslib_1.__decorate([
|
|
56
|
+
(0, type_graphql_1.Field)({ nullable: true }),
|
|
57
|
+
tslib_1.__metadata("design:type", String)
|
|
58
|
+
], DocTemplatePatch.prototype, "name", void 0);
|
|
59
|
+
tslib_1.__decorate([
|
|
60
|
+
(0, type_graphql_1.Field)({ nullable: true }),
|
|
61
|
+
tslib_1.__metadata("design:type", String)
|
|
62
|
+
], DocTemplatePatch.prototype, "description", void 0);
|
|
63
|
+
tslib_1.__decorate([
|
|
64
|
+
(0, type_graphql_1.Field)({ nullable: true }),
|
|
65
|
+
tslib_1.__metadata("design:type", String)
|
|
66
|
+
], DocTemplatePatch.prototype, "jobType", void 0);
|
|
67
|
+
tslib_1.__decorate([
|
|
68
|
+
(0, type_graphql_1.Field)({ nullable: true }),
|
|
69
|
+
tslib_1.__metadata("design:type", String)
|
|
70
|
+
], DocTemplatePatch.prototype, "jobClass", void 0);
|
|
71
|
+
tslib_1.__decorate([
|
|
72
|
+
(0, type_graphql_1.Field)({ nullable: true }),
|
|
73
|
+
tslib_1.__metadata("design:type", String)
|
|
74
|
+
], DocTemplatePatch.prototype, "jobCategory", void 0);
|
|
75
|
+
tslib_1.__decorate([
|
|
76
|
+
(0, type_graphql_1.Field)({ nullable: true }),
|
|
77
|
+
tslib_1.__metadata("design:type", String)
|
|
78
|
+
], DocTemplatePatch.prototype, "template", void 0);
|
|
79
|
+
tslib_1.__decorate([
|
|
80
|
+
(0, type_graphql_1.Field)({ nullable: true }),
|
|
81
|
+
tslib_1.__metadata("design:type", String)
|
|
82
|
+
], DocTemplatePatch.prototype, "logic", void 0);
|
|
83
|
+
tslib_1.__decorate([
|
|
84
|
+
(0, type_graphql_1.Field)({ nullable: true }),
|
|
85
|
+
tslib_1.__metadata("design:type", Boolean)
|
|
86
|
+
], DocTemplatePatch.prototype, "activeFlag", void 0);
|
|
87
|
+
tslib_1.__decorate([
|
|
88
|
+
(0, type_graphql_1.Field)({ nullable: true }),
|
|
89
|
+
tslib_1.__metadata("design:type", String)
|
|
90
|
+
], DocTemplatePatch.prototype, "note", void 0);
|
|
91
|
+
tslib_1.__decorate([
|
|
92
|
+
(0, type_graphql_1.Field)(),
|
|
93
|
+
tslib_1.__metadata("design:type", String)
|
|
94
|
+
], DocTemplatePatch.prototype, "cuFlag", void 0);
|
|
95
|
+
DocTemplatePatch = tslib_1.__decorate([
|
|
96
|
+
(0, type_graphql_1.InputType)()
|
|
97
|
+
], DocTemplatePatch);
|
|
98
|
+
exports.DocTemplatePatch = DocTemplatePatch;
|
|
99
|
+
let DocTemplateList = class DocTemplateList {
|
|
100
|
+
};
|
|
101
|
+
tslib_1.__decorate([
|
|
102
|
+
(0, type_graphql_1.Field)(type => [doc_template_1.DocTemplate]),
|
|
103
|
+
tslib_1.__metadata("design:type", Array)
|
|
104
|
+
], DocTemplateList.prototype, "items", void 0);
|
|
105
|
+
tslib_1.__decorate([
|
|
106
|
+
(0, type_graphql_1.Field)(type => type_graphql_1.Int),
|
|
107
|
+
tslib_1.__metadata("design:type", Number)
|
|
108
|
+
], DocTemplateList.prototype, "total", void 0);
|
|
109
|
+
DocTemplateList = tslib_1.__decorate([
|
|
110
|
+
(0, type_graphql_1.ObjectType)()
|
|
111
|
+
], DocTemplateList);
|
|
112
|
+
exports.DocTemplateList = DocTemplateList;
|
|
113
|
+
//# sourceMappingURL=doc-template-type.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"doc-template-type.js","sourceRoot":"","sources":["../../../server/service/doc-template/doc-template-type.ts"],"names":[],"mappings":";;;;AACA,+CAA6F;AAE7F,iDAA4C;AAGrC,IAAM,cAAc,GAApB,MAAM,cAAc;CA4B1B,CAAA;AA1BC;IAAC,IAAA,oBAAK,EAAE,EAAE,QAAQ,EAAE,KAAK,EAAE,CAAC;;4CAChB;AAEZ;IAAC,IAAA,oBAAK,EAAE,EAAE,QAAQ,EAAE,KAAK,EAAE,CAAC;;mDACT;AAEnB;IAAC,IAAA,oBAAK,EAAE,EAAE,QAAQ,EAAE,IAAI,EAAE,CAAC;;+CACX;AAEhB;IAAC,IAAA,oBAAK,EAAE,EAAE,QAAQ,EAAE,IAAI,EAAE,CAAC;;gDACV;AAEjB;IAAC,IAAA,oBAAK,EAAE,EAAE,QAAQ,EAAE,IAAI,EAAE,CAAC;;mDACP;AAEpB;IAAC,IAAA,oBAAK,EAAE,EAAE,QAAQ,EAAE,IAAI,EAAE,CAAC;;gDACV;AAEjB;IAAC,IAAA,oBAAK,EAAE,EAAE,QAAQ,EAAE,IAAI,EAAE,CAAC;;6CACb;AAEd;IAAC,IAAA,oBAAK,EAAE,EAAE,QAAQ,EAAE,IAAI,EAAE,CAAC;;kDACP;AAEpB;IAAC,IAAA,oBAAK,EAAE,EAAE,QAAQ,EAAE,IAAI,EAAE,CAAC;;4CACd;AA3BF,cAAc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,CAAC,kBAAG,CAAC;;8CACN;AALF,eAAe;IAD3B,IAAA,yBAAU,GAAE;GACA,eAAe,CAM3B;AANY,0CAAe","sourcesContent":["\nimport { ObjectType, Field, InputType, Int, ID, Float, registerEnumType } from 'type-graphql'\nimport { ObjectRef } from '@things-factory/shell'\nimport { DocTemplate } from './doc-template'\n\n@InputType()\nexport class NewDocTemplate {\n\n @Field( { nullable: false })\n name: string\n\n @Field( { nullable: false })\n description: string\n\n @Field( { nullable: true })\n jobType?: string\n\n @Field( { nullable: true })\n jobClass?: string\n\n @Field( { nullable: true })\n jobCategory?: string\n\n @Field( { nullable: true })\n template?: string\n\n @Field( { nullable: true })\n logic?: string\n\n @Field( { nullable: true })\n activeFlag?: boolean\n\n @Field( { nullable: true })\n note?: string\n}\n\n@InputType()\nexport class DocTemplatePatch {\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 jobType?: string\n\n @Field( { nullable: true })\n jobClass?: string\n\n @Field( { nullable: true })\n jobCategory?: string\n\n @Field( { nullable: true })\n template?: string\n\n @Field( { nullable: true })\n logic?: string\n\n @Field( { nullable: true })\n activeFlag?: boolean\n\n @Field( { nullable: true })\n note?: string\n\n @Field()\n cuFlag: string\n}\n\n@ObjectType()\nexport class DocTemplateList {\n @Field(type => [DocTemplate])\n items: DocTemplate[]\n\n @Field(type => Int)\n total: number\n}\n"]}
|
|
@@ -0,0 +1,105 @@
|
|
|
1
|
+
"use strict";
|
|
2
|
+
Object.defineProperty(exports, "__esModule", { value: true });
|
|
3
|
+
exports.DocTemplate = void 0;
|
|
4
|
+
const tslib_1 = require("tslib");
|
|
5
|
+
const typeorm_1 = require("typeorm");
|
|
6
|
+
const type_graphql_1 = require("type-graphql");
|
|
7
|
+
const auth_base_1 = require("@things-factory/auth-base");
|
|
8
|
+
const shell_1 = require("@things-factory/shell");
|
|
9
|
+
let DocTemplate = class DocTemplate {
|
|
10
|
+
};
|
|
11
|
+
tslib_1.__decorate([
|
|
12
|
+
(0, typeorm_1.PrimaryGeneratedColumn)('uuid'),
|
|
13
|
+
(0, type_graphql_1.Field)(type => type_graphql_1.ID),
|
|
14
|
+
tslib_1.__metadata("design:type", String)
|
|
15
|
+
], DocTemplate.prototype, "id", void 0);
|
|
16
|
+
tslib_1.__decorate([
|
|
17
|
+
(0, typeorm_1.Column)({ name: 'name', nullable: false }),
|
|
18
|
+
(0, type_graphql_1.Field)({ nullable: false }),
|
|
19
|
+
tslib_1.__metadata("design:type", String)
|
|
20
|
+
], DocTemplate.prototype, "name", void 0);
|
|
21
|
+
tslib_1.__decorate([
|
|
22
|
+
(0, typeorm_1.Column)({ name: 'description', nullable: false }),
|
|
23
|
+
(0, type_graphql_1.Field)({ nullable: false }),
|
|
24
|
+
tslib_1.__metadata("design:type", String)
|
|
25
|
+
], DocTemplate.prototype, "description", void 0);
|
|
26
|
+
tslib_1.__decorate([
|
|
27
|
+
(0, typeorm_1.Column)({ name: 'job_type', nullable: true }),
|
|
28
|
+
(0, type_graphql_1.Field)({ nullable: true }),
|
|
29
|
+
tslib_1.__metadata("design:type", String)
|
|
30
|
+
], DocTemplate.prototype, "jobType", void 0);
|
|
31
|
+
tslib_1.__decorate([
|
|
32
|
+
(0, typeorm_1.Column)({ name: 'job_class', nullable: true }),
|
|
33
|
+
(0, type_graphql_1.Field)({ nullable: true }),
|
|
34
|
+
tslib_1.__metadata("design:type", String)
|
|
35
|
+
], DocTemplate.prototype, "jobClass", void 0);
|
|
36
|
+
tslib_1.__decorate([
|
|
37
|
+
(0, typeorm_1.Column)({ name: 'job_category', nullable: true }),
|
|
38
|
+
(0, type_graphql_1.Field)({ nullable: true }),
|
|
39
|
+
tslib_1.__metadata("design:type", String)
|
|
40
|
+
], DocTemplate.prototype, "jobCategory", void 0);
|
|
41
|
+
tslib_1.__decorate([
|
|
42
|
+
(0, typeorm_1.Column)({ name: 'template', type: 'text', nullable: true }),
|
|
43
|
+
(0, type_graphql_1.Field)({ nullable: true }),
|
|
44
|
+
tslib_1.__metadata("design:type", String)
|
|
45
|
+
], DocTemplate.prototype, "template", void 0);
|
|
46
|
+
tslib_1.__decorate([
|
|
47
|
+
(0, typeorm_1.Column)({ name: 'logic', type: 'text', nullable: true }),
|
|
48
|
+
(0, type_graphql_1.Field)({ nullable: true }),
|
|
49
|
+
tslib_1.__metadata("design:type", String)
|
|
50
|
+
], DocTemplate.prototype, "logic", void 0);
|
|
51
|
+
tslib_1.__decorate([
|
|
52
|
+
(0, typeorm_1.Column)({ name: 'active_flag', type: 'boolean', nullable: true }),
|
|
53
|
+
(0, type_graphql_1.Field)({ nullable: true }),
|
|
54
|
+
tslib_1.__metadata("design:type", Boolean)
|
|
55
|
+
], DocTemplate.prototype, "activeFlag", void 0);
|
|
56
|
+
tslib_1.__decorate([
|
|
57
|
+
(0, typeorm_1.Column)({ name: 'note', nullable: true }),
|
|
58
|
+
(0, type_graphql_1.Field)({ nullable: true }),
|
|
59
|
+
tslib_1.__metadata("design:type", String)
|
|
60
|
+
], DocTemplate.prototype, "note", void 0);
|
|
61
|
+
tslib_1.__decorate([
|
|
62
|
+
(0, typeorm_1.ManyToOne)(type => shell_1.Domain, { createForeignKeyConstraints: false, nullable: false }),
|
|
63
|
+
(0, type_graphql_1.Field)({ nullable: false }),
|
|
64
|
+
tslib_1.__metadata("design:type", shell_1.Domain)
|
|
65
|
+
], DocTemplate.prototype, "domain", void 0);
|
|
66
|
+
tslib_1.__decorate([
|
|
67
|
+
(0, typeorm_1.RelationId)((docTemplate) => docTemplate.domain),
|
|
68
|
+
tslib_1.__metadata("design:type", String)
|
|
69
|
+
], DocTemplate.prototype, "domainId", void 0);
|
|
70
|
+
tslib_1.__decorate([
|
|
71
|
+
(0, typeorm_1.ManyToOne)(type => auth_base_1.User, { createForeignKeyConstraints: false, nullable: true }),
|
|
72
|
+
(0, type_graphql_1.Field)({ nullable: true }),
|
|
73
|
+
tslib_1.__metadata("design:type", auth_base_1.User)
|
|
74
|
+
], DocTemplate.prototype, "creator", void 0);
|
|
75
|
+
tslib_1.__decorate([
|
|
76
|
+
(0, typeorm_1.RelationId)((docTemplate) => docTemplate.creator),
|
|
77
|
+
tslib_1.__metadata("design:type", String)
|
|
78
|
+
], DocTemplate.prototype, "creatorId", void 0);
|
|
79
|
+
tslib_1.__decorate([
|
|
80
|
+
(0, typeorm_1.ManyToOne)(type => auth_base_1.User, { createForeignKeyConstraints: false, nullable: true }),
|
|
81
|
+
(0, type_graphql_1.Field)({ nullable: true }),
|
|
82
|
+
tslib_1.__metadata("design:type", auth_base_1.User)
|
|
83
|
+
], DocTemplate.prototype, "updater", void 0);
|
|
84
|
+
tslib_1.__decorate([
|
|
85
|
+
(0, typeorm_1.RelationId)((docTemplate) => docTemplate.updater),
|
|
86
|
+
tslib_1.__metadata("design:type", String)
|
|
87
|
+
], DocTemplate.prototype, "updaterId", void 0);
|
|
88
|
+
tslib_1.__decorate([
|
|
89
|
+
(0, typeorm_1.CreateDateColumn)(),
|
|
90
|
+
(0, type_graphql_1.Field)({ nullable: true }),
|
|
91
|
+
tslib_1.__metadata("design:type", Date)
|
|
92
|
+
], DocTemplate.prototype, "createdAt", void 0);
|
|
93
|
+
tslib_1.__decorate([
|
|
94
|
+
(0, typeorm_1.UpdateDateColumn)(),
|
|
95
|
+
(0, type_graphql_1.Field)({ nullable: true }),
|
|
96
|
+
tslib_1.__metadata("design:type", Date)
|
|
97
|
+
], DocTemplate.prototype, "updatedAt", void 0);
|
|
98
|
+
DocTemplate = tslib_1.__decorate([
|
|
99
|
+
(0, typeorm_1.Entity)('doc_templates'),
|
|
100
|
+
(0, typeorm_1.Index)('ix_doc_template_0', (docTemplate) => [docTemplate.domain, docTemplate.name], { unique: true }),
|
|
101
|
+
(0, typeorm_1.Index)('ix_doc_template_1', (docTemplate) => [docTemplate.domain, docTemplate.activeFlag]),
|
|
102
|
+
(0, type_graphql_1.ObjectType)({ description: 'Entity for DocTemplate' })
|
|
103
|
+
], DocTemplate);
|
|
104
|
+
exports.DocTemplate = DocTemplate;
|
|
105
|
+
//# sourceMappingURL=doc-template.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"doc-template.js","sourceRoot":"","sources":["../../../server/service/doc-template/doc-template.ts"],"names":[],"mappings":";;;;AACA,qCASgB;AAChB,+CAAkF;AAElF,yDAAgD;AAChD,iDAA8C;AAMvC,IAAM,WAAW,GAAjB,MAAM,WAAW;CAqEvB,CAAA;AApEC;IAAC,IAAA,gCAAsB,EAAC,MAAM,CAAC;IAC9B,IAAA,oBAAK,EAAC,IAAI,CAAC,EAAE,CAAC,iBAAE,CAAC;;uCACC;AAEnB;IAAC,IAAA,gBAAM,EAAC,EAAE,IAAI,EAAC,MAAM,EAAE,QAAQ,EAAC,KAAK,EAAE,CAAC;IACvC,IAAA,oBAAK,EAAC,EAAE,QAAQ,EAAC,KAAK,EAAE,CAAC;;yCACd;AAEZ;IAAC,IAAA,gBAAM,EAAC,EAAE,IAAI,EAAC,aAAa,EAAE,QAAQ,EAAC,KAAK,EAAE,CAAC;IAC9C,IAAA,oBAAK,EAAC,EAAE,QAAQ,EAAC,KAAK,EAAE,CAAC;;gDACP;AAEnB;IAAC,IAAA,gBAAM,EAAC,EAAE,IAAI,EAAC,UAAU,EAAE,QAAQ,EAAC,IAAI,EAAE,CAAC;IAC1C,IAAA,oBAAK,EAAC,EAAE,QAAQ,EAAC,IAAI,EAAE,CAAC;;4CACT;AAEhB;IAAC,IAAA,gBAAM,EAAC,EAAE,IAAI,EAAC,WAAW,EAAE,QAAQ,EAAC,IAAI,EAAE,CAAC;IAC3C,IAAA,oBAAK,EAAC,EAAE,QAAQ,EAAC,IAAI,EAAE,CAAC;;6CACR;AAEjB;IAAC,IAAA,gBAAM,EAAC,EAAE,IAAI,EAAC,cAAc,EAAE,QAAQ,EAAC,IAAI,EAAE,CAAC;IAC9C,IAAA,oBAAK,EAAC,EAAE,QAAQ,EAAC,IAAI,EAAE,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orm'\nimport { ObjectType, Field, Int, ID, Float, registerEnumType } from 'type-graphql'\n\nimport { User } from '@things-factory/auth-base'\nimport { Domain } from '@things-factory/shell'\n\n@Entity('doc_templates')\n@Index('ix_doc_template_0', (docTemplate: DocTemplate) => [docTemplate.domain,docTemplate.name], { unique: true })\n@Index('ix_doc_template_1', (docTemplate: DocTemplate) => [docTemplate.domain,docTemplate.activeFlag])\n@ObjectType({ description: 'Entity for DocTemplate' })\nexport class DocTemplate {\n @PrimaryGeneratedColumn('uuid')\n @Field(type => ID)\n readonly id: string\n\n @Column({ name:'name', nullable:false })\n @Field({ nullable:false })\n name: string\n\n @Column({ name:'description', nullable:false })\n @Field({ nullable:false })\n description: string\n\n @Column({ name:'job_type', nullable:true })\n @Field({ nullable:true })\n jobType?: string\n\n @Column({ name:'job_class', nullable:true })\n @Field({ nullable:true })\n jobClass?: string\n\n @Column({ name:'job_category', nullable:true })\n @Field({ nullable:true })\n jobCategory?: string\n\n @Column({ name:'template', type:'text', nullable:true })\n @Field({ nullable:true })\n template?: string\n\n @Column({ name:'logic', type:'text', nullable:true })\n @Field({ nullable:true })\n logic?: string\n\n @Column({ name:'active_flag', type:'boolean', nullable:true })\n @Field({ nullable:true })\n activeFlag?: boolean\n\n @Column({ name:'note', nullable:true })\n @Field({ nullable:true })\n note?: string\n \n @ManyToOne(type => Domain, {createForeignKeyConstraints: false, nullable: false})\n @Field({ nullable: false })\n domain: Domain\n\n @RelationId((docTemplate: DocTemplate) => docTemplate.domain)\n domainId: string\n\n @ManyToOne(type => User, {createForeignKeyConstraints: false, nullable: true})\n @Field({ nullable: true })\n creator?: User\n\n @RelationId((docTemplate: DocTemplate) => docTemplate.creator)\n creatorId?: string\n\n @ManyToOne(type => User, {createForeignKeyConstraints: false, nullable: true})\n @Field({ nullable: true })\n updater?: User\n\n @RelationId((docTemplate: DocTemplate) => docTemplate.updater)\n updaterId?: string\n\n @CreateDateColumn()\n @Field({ nullable: true })\n createdAt?: Date\n\n @UpdateDateColumn()\n @Field({ nullable: true })\n updatedAt?: Date\n}\n"]}
|
|
@@ -0,0 +1,9 @@
|
|
|
1
|
+
"use strict";
|
|
2
|
+
Object.defineProperty(exports, "__esModule", { value: true });
|
|
3
|
+
exports.resolvers = exports.entities = void 0;
|
|
4
|
+
const doc_template_1 = require("./doc-template");
|
|
5
|
+
const doc_template_query_1 = require("./doc-template-query");
|
|
6
|
+
const doc_template_mutation_1 = require("./doc-template-mutation");
|
|
7
|
+
exports.entities = [doc_template_1.DocTemplate];
|
|
8
|
+
exports.resolvers = [doc_template_query_1.DocTemplateQuery, doc_template_mutation_1.DocTemplateMutation];
|
|
9
|
+
//# sourceMappingURL=index.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"index.js","sourceRoot":"","sources":["../../../server/service/doc-template/index.ts"],"names":[],"mappings":";;;AACA,iDAA4C;AAC5C,6DAAuD;AACvD,mEAA6D;AAEhD,QAAA,QAAQ,GAAG,CAAC,0BAAW,CAAC,CAAA;AACxB,QAAA,SAAS,GAAG,CAAC,qCAAgB,EAAE,2CAAmB,CAAC,CAAA","sourcesContent":["\nimport { DocTemplate } from './doc-template'\nimport { DocTemplateQuery } from './doc-template-query'\nimport { DocTemplateMutation } from './doc-template-mutation'\n\nexport const entities = [DocTemplate]\nexport const resolvers = [DocTemplateQuery, DocTemplateMutation]\n"]}
|
|
@@ -3,16 +3,20 @@ Object.defineProperty(exports, "__esModule", { value: true });
|
|
|
3
3
|
exports.subscribers = exports.schema = exports.entities = void 0;
|
|
4
4
|
const tslib_1 = require("tslib");
|
|
5
5
|
/* EXPORT ENTITY TYPES */
|
|
6
|
+
tslib_1.__exportStar(require("./doc-template/doc-template"), exports);
|
|
6
7
|
tslib_1.__exportStar(require("./template-file/template-file"), exports);
|
|
7
8
|
/* IMPORT ENTITIES AND RESOLVERS */
|
|
9
|
+
const doc_template_1 = require("./doc-template");
|
|
8
10
|
const template_file_1 = require("./template-file");
|
|
9
11
|
exports.entities = [
|
|
10
12
|
/* ENTITIES */
|
|
13
|
+
...doc_template_1.entities,
|
|
11
14
|
...template_file_1.entities
|
|
12
15
|
];
|
|
13
16
|
exports.schema = {
|
|
14
17
|
resolverClasses: [
|
|
15
18
|
/* RESOLVER CLASSES */
|
|
19
|
+
...doc_template_1.resolvers,
|
|
16
20
|
...template_file_1.resolvers
|
|
17
21
|
]
|
|
18
22
|
};
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"index.js","sourceRoot":"","sources":["../../server/service/index.ts"],"names":[],"mappings":";;;;AAAA,yBAAyB;AACzB,wEAA6C;AAE7C,mCAAmC;AACnC,mDAAsG;AAEzF,QAAA,QAAQ,GAAG;IACtB,cAAc;
|
|
1
|
+
{"version":3,"file":"index.js","sourceRoot":"","sources":["../../server/service/index.ts"],"names":[],"mappings":";;;;AAAA,yBAAyB;AACzB,sEAA2C;AAC3C,wEAA6C;AAE7C,mCAAmC;AACnC,iDAAmG;AACnG,mDAAsG;AAEzF,QAAA,QAAQ,GAAG;IACtB,cAAc;IACd,GAAG,uBAAmB;IACvB,GAAG,wBAAoB;CACvB,CAAA;AAEY,QAAA,MAAM,GAAG;IACpB,eAAe,EAAE;QACf,sBAAsB;QACtB,GAAG,wBAAoB;QACzB,GAAG,yBAAqB;KACvB;CACF,CAAA;AAEY,QAAA,WAAW,GAAG;AACzB,iBAAiB;CAClB,CAAA","sourcesContent":["/* EXPORT ENTITY TYPES */\nexport * from './doc-template/doc-template'\nexport * from './template-file/template-file'\n\n/* IMPORT ENTITIES AND RESOLVERS */\nimport { entities as DocTemplateEntities, resolvers as DocTemplateResolvers } from './doc-template'\nimport { entities as TemplateFileEntities, resolvers as TemplateFileResolvers } from './template-file'\n\nexport const entities = [\n /* ENTITIES */\n ...DocTemplateEntities,\n\t...TemplateFileEntities\n]\n\nexport const schema = {\n resolverClasses: [\n /* RESOLVER CLASSES */\n ...DocTemplateResolvers,\n\t\t...TemplateFileResolvers\n ]\n}\n\nexport const subscribers = [\n /* SUBSCRIBERS */\n]\n"]}
|