@things-factory/code-base 7.0.1-alpha.9 → 7.0.1-alpha.92
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-client/tsconfig.tsbuildinfo +1 -1
- package/dist-server/service/common-code/common-code.js +1 -1
- package/dist-server/service/common-code/common-code.js.map +1 -1
- package/dist-server/service/common-code-detail/common-code-detail-query.js +1 -1
- package/dist-server/service/common-code-detail/common-code-detail-query.js.map +1 -1
- package/dist-server/service/common-code-detail/common-code-detail.js +1 -1
- package/dist-server/service/common-code-detail/common-code-detail.js.map +1 -1
- package/dist-server/tsconfig.tsbuildinfo +1 -1
- package/package.json +4 -4
- package/server/service/common-code/common-code.ts +12 -2
- package/server/service/common-code-detail/common-code-detail-query.ts +1 -1
- package/server/service/common-code-detail/common-code-detail.ts +21 -4
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@things-factory/code-base",
|
|
3
|
-
"version": "7.0.1-alpha.
|
|
3
|
+
"version": "7.0.1-alpha.92",
|
|
4
4
|
"main": "dist-server/index.js",
|
|
5
5
|
"browser": "dist-client/index.js",
|
|
6
6
|
"things-factory": true,
|
|
@@ -28,8 +28,8 @@
|
|
|
28
28
|
},
|
|
29
29
|
"dependencies": {
|
|
30
30
|
"@operato/graphql": "^2.0.0-alpha.0",
|
|
31
|
-
"@things-factory/auth-base": "^7.0.1-alpha.
|
|
32
|
-
"@things-factory/shell": "^7.0.1-alpha.
|
|
31
|
+
"@things-factory/auth-base": "^7.0.1-alpha.92",
|
|
32
|
+
"@things-factory/shell": "^7.0.1-alpha.90"
|
|
33
33
|
},
|
|
34
|
-
"gitHead": "
|
|
34
|
+
"gitHead": "9cd59ab35277b7c8ac1e3677beb4bdca89a97980"
|
|
35
35
|
}
|
|
@@ -1,5 +1,15 @@
|
|
|
1
1
|
import { Field, ID, ObjectType } from 'type-graphql'
|
|
2
|
-
import {
|
|
2
|
+
import {
|
|
3
|
+
Column,
|
|
4
|
+
CreateDateColumn,
|
|
5
|
+
Entity,
|
|
6
|
+
Index,
|
|
7
|
+
ManyToOne,
|
|
8
|
+
OneToMany,
|
|
9
|
+
PrimaryGeneratedColumn,
|
|
10
|
+
RelationId,
|
|
11
|
+
UpdateDateColumn
|
|
12
|
+
} from 'typeorm'
|
|
3
13
|
|
|
4
14
|
import { User } from '@things-factory/auth-base'
|
|
5
15
|
import { Domain } from '@things-factory/shell'
|
|
@@ -16,7 +26,7 @@ export class CommonCode {
|
|
|
16
26
|
readonly id: string
|
|
17
27
|
|
|
18
28
|
@ManyToOne(type => Domain)
|
|
19
|
-
@Field(
|
|
29
|
+
@Field(type => Domain)
|
|
20
30
|
domain?: Domain
|
|
21
31
|
|
|
22
32
|
@RelationId((commonCode: CommonCode) => commonCode.domain)
|
|
@@ -35,7 +35,7 @@ export class CommonCodeDetailQuery {
|
|
|
35
35
|
return { items, total }
|
|
36
36
|
}
|
|
37
37
|
|
|
38
|
-
@FieldResolver(type =>
|
|
38
|
+
@FieldResolver(type => String)
|
|
39
39
|
async commonCode(commonCodeDetail): Promise<CommonCode> {
|
|
40
40
|
return await getRepository(CommonCode).findOneBy({ id: commonCodeDetail.commonCodeId })
|
|
41
41
|
}
|
|
@@ -1,5 +1,14 @@
|
|
|
1
1
|
import { Field, ID, InputType, ObjectType } from 'type-graphql'
|
|
2
|
-
import {
|
|
2
|
+
import {
|
|
3
|
+
Column,
|
|
4
|
+
CreateDateColumn,
|
|
5
|
+
Entity,
|
|
6
|
+
Index,
|
|
7
|
+
ManyToOne,
|
|
8
|
+
PrimaryGeneratedColumn,
|
|
9
|
+
RelationId,
|
|
10
|
+
UpdateDateColumn
|
|
11
|
+
} from 'typeorm'
|
|
3
12
|
|
|
4
13
|
import { User } from '@things-factory/auth-base'
|
|
5
14
|
import { Domain, ScalarObject } from '@things-factory/shell'
|
|
@@ -7,8 +16,16 @@ import { Domain, ScalarObject } from '@things-factory/shell'
|
|
|
7
16
|
import { CommonCode } from '../common-code/common-code'
|
|
8
17
|
|
|
9
18
|
@Entity()
|
|
10
|
-
@Index(
|
|
11
|
-
|
|
19
|
+
@Index(
|
|
20
|
+
'ix_common_code_detail_0',
|
|
21
|
+
(commonCodeDetail: CommonCodeDetail) => [commonCodeDetail.commonCode, commonCodeDetail.name],
|
|
22
|
+
{ unique: true }
|
|
23
|
+
)
|
|
24
|
+
@Index(
|
|
25
|
+
'ix_common_code_detail_1',
|
|
26
|
+
(commonCodeDetail: CommonCodeDetail) => [commonCodeDetail.commonCode, commonCodeDetail.rank],
|
|
27
|
+
{ unique: true }
|
|
28
|
+
)
|
|
12
29
|
@ObjectType({ description: 'Entity for CommonCodeDetail' })
|
|
13
30
|
export class CommonCodeDetail {
|
|
14
31
|
@PrimaryGeneratedColumn('uuid')
|
|
@@ -16,7 +33,7 @@ export class CommonCodeDetail {
|
|
|
16
33
|
readonly id: string
|
|
17
34
|
|
|
18
35
|
@ManyToOne(type => Domain)
|
|
19
|
-
@Field(
|
|
36
|
+
@Field(type => Domain)
|
|
20
37
|
domain?: Domain
|
|
21
38
|
|
|
22
39
|
@RelationId((commonCodeDetail: CommonCodeDetail) => commonCodeDetail.domain)
|