@things-factory/i18n-base 5.0.7 → 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/apis/index.js +2 -15
- package/dist-server/apis/index.js.map +1 -1
- package/dist-server/apis/t.js.map +1 -1
- package/dist-server/index.js +5 -18
- package/dist-server/index.js.map +1 -1
- package/dist-server/middlewares/index.js +4 -8
- package/dist-server/middlewares/index.js.map +1 -1
- package/dist-server/middlewares/koa-i18next/detect.js +0 -1
- package/dist-server/middlewares/koa-i18next/detect.js.map +1 -1
- package/dist-server/middlewares/koa-i18next/index.js +2 -6
- package/dist-server/middlewares/koa-i18next/index.js.map +1 -1
- package/dist-server/middlewares/translations.js +5 -9
- package/dist-server/middlewares/translations.js.map +1 -1
- package/dist-server/migrations/index.js.map +1 -1
- package/dist-server/routes.js +2 -7
- 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/terminology/index.js.map +1 -1
- package/dist-server/service/terminology/terminology-mutation.js +39 -50
- package/dist-server/service/terminology/terminology-mutation.js.map +1 -1
- package/dist-server/service/terminology/terminology-query.js +19 -30
- package/dist-server/service/terminology/terminology-query.js.map +1 -1
- package/dist-server/service/terminology/terminology-type.js +32 -40
- package/dist-server/service/terminology/terminology-type.js.map +1 -1
- package/dist-server/service/terminology/terminology.js +22 -30
- package/dist-server/service/terminology/terminology.js.map +1 -1
- package/dist-server/tsconfig.tsbuildinfo +1 -0
- package/package.json +3 -3
- package/server/middlewares/index.ts +2 -4
- package/server/middlewares/koa-i18next/detect.ts +0 -2
- package/server/middlewares/koa-i18next/index.ts +0 -4
- package/server/middlewares/translations.ts +1 -4
- package/server/routes.ts +0 -5
|
@@ -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.TerminologyList = exports.TerminologyPatch = exports.NewTerminology = void 0;
|
|
4
|
+
const tslib_1 = require("tslib");
|
|
13
5
|
const type_graphql_1 = require("type-graphql");
|
|
14
6
|
const terminology_1 = require("./terminology");
|
|
15
7
|
let NewTerminology = class NewTerminology {
|
|
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
|
], NewTerminology.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
|
], NewTerminology.prototype, "description", void 0);
|
|
25
|
-
__decorate([
|
|
17
|
+
tslib_1.__decorate([
|
|
26
18
|
(0, type_graphql_1.Field)(),
|
|
27
|
-
__metadata("design:type", String)
|
|
19
|
+
tslib_1.__metadata("design:type", String)
|
|
28
20
|
], NewTerminology.prototype, "locale", 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
|
], NewTerminology.prototype, "category", void 0);
|
|
33
|
-
__decorate([
|
|
25
|
+
tslib_1.__decorate([
|
|
34
26
|
(0, type_graphql_1.Field)(),
|
|
35
|
-
__metadata("design:type", String)
|
|
27
|
+
tslib_1.__metadata("design:type", String)
|
|
36
28
|
], NewTerminology.prototype, "display", void 0);
|
|
37
|
-
NewTerminology = __decorate([
|
|
29
|
+
NewTerminology = tslib_1.__decorate([
|
|
38
30
|
(0, type_graphql_1.InputType)()
|
|
39
31
|
], NewTerminology);
|
|
40
32
|
exports.NewTerminology = NewTerminology;
|
|
41
33
|
let TerminologyPatch = class TerminologyPatch {
|
|
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
|
], TerminologyPatch.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
|
], TerminologyPatch.prototype, "name", void 0);
|
|
51
|
-
__decorate([
|
|
43
|
+
tslib_1.__decorate([
|
|
52
44
|
(0, type_graphql_1.Field)({ nullable: true }),
|
|
53
|
-
__metadata("design:type", String)
|
|
45
|
+
tslib_1.__metadata("design:type", String)
|
|
54
46
|
], TerminologyPatch.prototype, "description", void 0);
|
|
55
|
-
__decorate([
|
|
47
|
+
tslib_1.__decorate([
|
|
56
48
|
(0, type_graphql_1.Field)(),
|
|
57
|
-
__metadata("design:type", String)
|
|
49
|
+
tslib_1.__metadata("design:type", String)
|
|
58
50
|
], TerminologyPatch.prototype, "locale", void 0);
|
|
59
|
-
__decorate([
|
|
51
|
+
tslib_1.__decorate([
|
|
60
52
|
(0, type_graphql_1.Field)(),
|
|
61
|
-
__metadata("design:type", String)
|
|
53
|
+
tslib_1.__metadata("design:type", String)
|
|
62
54
|
], TerminologyPatch.prototype, "category", void 0);
|
|
63
|
-
__decorate([
|
|
55
|
+
tslib_1.__decorate([
|
|
64
56
|
(0, type_graphql_1.Field)(),
|
|
65
|
-
__metadata("design:type", String)
|
|
57
|
+
tslib_1.__metadata("design:type", String)
|
|
66
58
|
], TerminologyPatch.prototype, "display", 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
|
], TerminologyPatch.prototype, "cuFlag", void 0);
|
|
71
|
-
TerminologyPatch = __decorate([
|
|
63
|
+
TerminologyPatch = tslib_1.__decorate([
|
|
72
64
|
(0, type_graphql_1.InputType)()
|
|
73
65
|
], TerminologyPatch);
|
|
74
66
|
exports.TerminologyPatch = TerminologyPatch;
|
|
75
67
|
let TerminologyList = class TerminologyList {
|
|
76
68
|
};
|
|
77
|
-
__decorate([
|
|
69
|
+
tslib_1.__decorate([
|
|
78
70
|
(0, type_graphql_1.Field)(type => [terminology_1.Terminology]),
|
|
79
|
-
__metadata("design:type", Array)
|
|
71
|
+
tslib_1.__metadata("design:type", Array)
|
|
80
72
|
], TerminologyList.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
|
], TerminologyList.prototype, "total", void 0);
|
|
85
|
-
TerminologyList = __decorate([
|
|
77
|
+
TerminologyList = tslib_1.__decorate([
|
|
86
78
|
(0, type_graphql_1.ObjectType)()
|
|
87
79
|
], TerminologyList);
|
|
88
80
|
exports.TerminologyList = TerminologyList;
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"terminology-type.js","sourceRoot":"","sources":["../../../server/service/terminology/terminology-type.ts"],"names":[],"mappings":"
|
|
1
|
+
{"version":3,"file":"terminology-type.js","sourceRoot":"","sources":["../../../server/service/terminology/terminology-type.ts"],"names":[],"mappings":";;;;AAAA,+CAAoE;AAEpE,+CAA2C;AAG3C,IAAa,cAAc,GAA3B,MAAa,cAAc;CAe1B,CAAA;AAbC;IADC,IAAA,oBAAK,GAAE;;4CACI;AAGZ;IADC,IAAA,oBAAK,EAAC,EAAE,QAAQ,EAAE,IAAI,EAAE,CAAC;;mDACN;AAGpB;IADC,IAAA,oBAAK,GAAE;;8CACM;AAGd;IADC,IAAA,oBAAK,GAAE;;gDACQ;AAGhB;IADC,IAAA,oBAAK,GAAE;;+CACO;AAdJ,cAAc;IAD1B,IAAA,wBAAS,GAAE;GACC,cAAc,CAe1B;AAfY,wCAAc;AAkB3B,IAAa,gBAAgB,GAA7B,MAAa,gBAAgB;CAqB5B,CAAA;AAnBC;IADC,IAAA,oBAAK,EAAC,IAAI,CAAC,EAAE,CAAC,iBAAE,EAAE,EAAE,QAAQ,EAAE,IAAI,EAAE,CAAC;;4CAC3B;AAGX;IADC,IAAA,oBAAK,EAAC,EAAE,QAAQ,EAAE,IAAI,EAAE,CAAC;;8CACb;AAGb;IADC,IAAA,oBAAK,EAAC,EAAE,QAAQ,EAAE,IAAI,EAAE,CAAC;;qDACN;AAGpB;IADC,IAAA,oBAAK,GAAE;;gDACM;AAGd;IADC,IAAA,oBAAK,GAAE;;kDACQ;AAGhB;IADC,IAAA,oBAAK,GAAE;;iDACO;AAGf;IADC,IAAA,oBAAK,EAAC,EAAE,QAAQ,EAAE,IAAI,EAAE,CAAC;;gDACX;AApBJ,gBAAgB;IAD5B,IAAA,wBAAS,GAAE;GACC,gBAAgB,CAqB5B;AArBY,4CAAgB;AAwB7B,IAAa,eAAe,GAA5B,MAAa,eAAe;CAM3B,CAAA;AAJC;IADC,IAAA,oBAAK,EAAC,IAAI,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 { Terminology } from './terminology'\n\n@InputType()\nexport class NewTerminology {\n @Field()\n name: string\n\n @Field({ nullable: true })\n description?: string\n\n @Field()\n locale: string\n\n @Field()\n category: string\n\n @Field()\n display: string\n}\n\n@InputType()\nexport class TerminologyPatch {\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()\n locale: string\n\n @Field()\n category: string\n\n @Field()\n display: string\n\n @Field({ nullable: true })\n cuFlag?: string\n}\n\n@ObjectType()\nexport class TerminologyList {\n @Field(type => [Terminology])\n items: Terminology[]\n\n @Field(type => Int)\n total: number\n}\n"]}
|
|
@@ -1,73 +1,65 @@
|
|
|
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;
|
|
12
3
|
Object.defineProperty(exports, "__esModule", { value: true });
|
|
13
4
|
exports.Terminology = void 0;
|
|
5
|
+
const tslib_1 = require("tslib");
|
|
14
6
|
const type_graphql_1 = require("type-graphql");
|
|
15
7
|
const typeorm_1 = require("typeorm");
|
|
16
8
|
const shell_1 = require("@things-factory/shell");
|
|
17
9
|
let Terminology = class Terminology {
|
|
18
10
|
};
|
|
19
|
-
__decorate([
|
|
11
|
+
tslib_1.__decorate([
|
|
20
12
|
(0, typeorm_1.PrimaryGeneratedColumn)('uuid'),
|
|
21
13
|
(0, type_graphql_1.Field)(type => type_graphql_1.ID),
|
|
22
|
-
__metadata("design:type", String)
|
|
14
|
+
tslib_1.__metadata("design:type", String)
|
|
23
15
|
], Terminology.prototype, "id", void 0);
|
|
24
|
-
__decorate([
|
|
16
|
+
tslib_1.__decorate([
|
|
25
17
|
(0, typeorm_1.ManyToOne)(type => shell_1.Domain),
|
|
26
18
|
(0, type_graphql_1.Field)({ nullable: true }),
|
|
27
|
-
__metadata("design:type", typeof (_a = typeof shell_1.Domain !== "undefined" && shell_1.Domain) === "function" ? _a : Object)
|
|
19
|
+
tslib_1.__metadata("design:type", typeof (_a = typeof shell_1.Domain !== "undefined" && shell_1.Domain) === "function" ? _a : Object)
|
|
28
20
|
], Terminology.prototype, "domain", void 0);
|
|
29
|
-
__decorate([
|
|
21
|
+
tslib_1.__decorate([
|
|
30
22
|
(0, typeorm_1.RelationId)((terminology) => terminology.domain),
|
|
31
|
-
__metadata("design:type", String)
|
|
23
|
+
tslib_1.__metadata("design:type", String)
|
|
32
24
|
], Terminology.prototype, "domainId", void 0);
|
|
33
|
-
__decorate([
|
|
25
|
+
tslib_1.__decorate([
|
|
34
26
|
(0, typeorm_1.Column)(),
|
|
35
27
|
(0, type_graphql_1.Field)(),
|
|
36
|
-
__metadata("design:type", String)
|
|
28
|
+
tslib_1.__metadata("design:type", String)
|
|
37
29
|
], Terminology.prototype, "name", void 0);
|
|
38
|
-
__decorate([
|
|
30
|
+
tslib_1.__decorate([
|
|
39
31
|
(0, typeorm_1.Column)({
|
|
40
32
|
nullable: true
|
|
41
33
|
}),
|
|
42
34
|
(0, type_graphql_1.Field)({ nullable: true }),
|
|
43
|
-
__metadata("design:type", String)
|
|
35
|
+
tslib_1.__metadata("design:type", String)
|
|
44
36
|
], Terminology.prototype, "description", void 0);
|
|
45
|
-
__decorate([
|
|
37
|
+
tslib_1.__decorate([
|
|
46
38
|
(0, type_graphql_1.Field)(),
|
|
47
39
|
(0, typeorm_1.Column)(),
|
|
48
|
-
__metadata("design:type", String)
|
|
40
|
+
tslib_1.__metadata("design:type", String)
|
|
49
41
|
], Terminology.prototype, "locale", void 0);
|
|
50
|
-
__decorate([
|
|
42
|
+
tslib_1.__decorate([
|
|
51
43
|
(0, type_graphql_1.Field)(),
|
|
52
44
|
(0, typeorm_1.Column)(),
|
|
53
|
-
__metadata("design:type", String)
|
|
45
|
+
tslib_1.__metadata("design:type", String)
|
|
54
46
|
], Terminology.prototype, "category", void 0);
|
|
55
|
-
__decorate([
|
|
47
|
+
tslib_1.__decorate([
|
|
56
48
|
(0, type_graphql_1.Field)(),
|
|
57
49
|
(0, typeorm_1.Column)(),
|
|
58
|
-
__metadata("design:type", String)
|
|
50
|
+
tslib_1.__metadata("design:type", String)
|
|
59
51
|
], Terminology.prototype, "display", void 0);
|
|
60
|
-
__decorate([
|
|
52
|
+
tslib_1.__decorate([
|
|
61
53
|
(0, typeorm_1.CreateDateColumn)(),
|
|
62
54
|
(0, type_graphql_1.Field)({ nullable: true }),
|
|
63
|
-
__metadata("design:type", Date)
|
|
55
|
+
tslib_1.__metadata("design:type", Date)
|
|
64
56
|
], Terminology.prototype, "createdAt", void 0);
|
|
65
|
-
__decorate([
|
|
57
|
+
tslib_1.__decorate([
|
|
66
58
|
(0, typeorm_1.UpdateDateColumn)(),
|
|
67
59
|
(0, type_graphql_1.Field)({ nullable: true }),
|
|
68
|
-
__metadata("design:type", Date)
|
|
60
|
+
tslib_1.__metadata("design:type", Date)
|
|
69
61
|
], Terminology.prototype, "updatedAt", void 0);
|
|
70
|
-
Terminology = __decorate([
|
|
62
|
+
Terminology = tslib_1.__decorate([
|
|
71
63
|
(0, typeorm_1.Entity)(),
|
|
72
64
|
(0, type_graphql_1.ObjectType)({ description: 'Entity for Terminology' }),
|
|
73
65
|
(0, typeorm_1.Index)('ix_term_0', (term) => [term.domain, term.locale, term.category, term.name], { unique: true }),
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"terminology.js","sourceRoot":"","sources":["../../../server/service/terminology/terminology.ts"],"names":[],"mappings":"
|
|
1
|
+
{"version":3,"file":"terminology.js","sourceRoot":"","sources":["../../../server/service/terminology/terminology.ts"],"names":[],"mappings":";;;;;AAAA,+CAAoD;AACpD,qCASgB;AAEhB,iDAA8C;AAQ9C,IAAa,WAAW,GAAxB,MAAa,WAAW;CAyCvB,CAAA;AAtCC;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;0DACjB,cAAM,oBAAN,cAAM;2CAAA;AAGf;IADC,IAAA,oBAAU,EAAC,CAAC,WAAwB,EAAE,EAAE,CAAC,WAAW,CAAC,MAAM,CAAC;;6CAC5C;AAIjB;IAFC,IAAA,gBAAM,GAAE;IACR,IAAA,oBAAK,GAAE;;yCACI;AAMZ;IAJC,IAAA,gBAAM,EAAC;QACN,QAAQ,EAAE,IAAI;KACf,CAAC;IACD,IAAA,oBAAK,EAAC,EAAE,QAAQ,EAAE,IAAI,EAAE,CAAC;;gDACN;AAIpB;IAFC,IAAA,oBAAK,GAAE;IACP,IAAA,gBAAM,GAAE;;2CACK;AAId;IAFC,IAAA,oBAAK,GAAE;IACP,IAAA,gBAAM,GAAE;;6CACO;AAIhB;IAFC,IAAA,oBAAK,GAAE;IACP,IAAA,gBAAM,GAAE;;4CACM;AAIf;IAFC,IAAA,0BAAgB,GAAE;IAClB,IAAA,oBAAK,EAAC,EAAE,QAAQ,EAAE,IAAI,EAAE,CAAC;sCACd,IAAI;8CAAA;AAIhB;IAFC,IAAA,0BAAgB,GAAE;IAClB,IAAA,oBAAK,EAAC,EAAE,QAAQ,EAAE,IAAI,EAAE,CAAC;sCACd,IAAI;8CAAA;AAxCL,WAAW;IANvB,IAAA,gBAAM,GAAE;IACR,IAAA,yBAAU,EAAC,EAAE,WAAW,EAAE,wBAAwB,EAAE,CAAC;IACrD,IAAA,eAAK,EAAC,WAAW,EAAE,CAAC,IAAiB,EAAE,EAAE,CAAC,CAAC,IAAI,CAAC,MAAM,EAAE,IAAI,CAAC,MAAM,EAAE,IAAI,CAAC,QAAQ,EAAE,IAAI,CAAC,IAAI,CAAC,EAAE,EAAE,MAAM,EAAE,IAAI,EAAE,CAAC;IACjH,IAAA,eAAK,EAAC,WAAW,EAAE,CAAC,IAAiB,EAAE,EAAE,CAAC,CAAC,IAAI,CAAC,MAAM,CAAC,CAAC;IACxD,IAAA,eAAK,EAAC,WAAW,EAAE,CAAC,IAAiB,EAAE,EAAE,CAAC,CAAC,IAAI,CAAC,MAAM,EAAE,IAAI,CAAC,MAAM,CAAC,CAAC;IACrE,IAAA,eAAK,EAAC,WAAW,EAAE,CAAC,IAAiB,EAAE,EAAE,CAAC,CAAC,IAAI,CAAC,MAAM,EAAE,IAAI,CAAC,MAAM,EAAE,IAAI,CAAC,IAAI,CAAC,CAAC;GACpE,WAAW,CAyCvB;AAzCY,kCAAW","sourcesContent":["import { Field, ID, ObjectType } 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 { Domain } from '@things-factory/shell'\n\n@Entity()\n@ObjectType({ description: 'Entity for Terminology' })\n@Index('ix_term_0', (term: Terminology) => [term.domain, term.locale, term.category, term.name], { unique: true })\n@Index('ix_term_1', (term: Terminology) => [term.domain])\n@Index('ix_term_2', (term: Terminology) => [term.domain, term.locale])\n@Index('ix_term_3', (term: Terminology) => [term.domain, term.locale, term.name])\nexport class Terminology {\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((terminology: Terminology) => terminology.domain)\n domainId?: 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 @Field()\n @Column()\n locale: string\n\n @Field()\n @Column()\n category: string\n\n @Field()\n @Column()\n display: string\n\n @CreateDateColumn()\n @Field({ nullable: true })\n createdAt?: Date\n\n @UpdateDateColumn()\n @Field({ nullable: true })\n updatedAt?: Date\n}\n"]}
|