@things-factory/code-base 7.0.1-alpha.77 → 7.0.1-alpha.78

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/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@things-factory/code-base",
3
- "version": "7.0.1-alpha.77",
3
+ "version": "7.0.1-alpha.78",
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.77",
31
+ "@things-factory/auth-base": "^7.0.1-alpha.78",
32
32
  "@things-factory/shell": "^7.0.1-alpha.71"
33
33
  },
34
- "gitHead": "e65893063c79d82a3c67233eac2295de2bae8397"
34
+ "gitHead": "6423c664e70e7877c362b4aebb7f169e4a2ad22d"
35
35
  }
@@ -1,5 +1,15 @@
1
1
  import { Field, ID, ObjectType } from 'type-graphql'
2
- import { Column, CreateDateColumn, Entity, Index, ManyToOne, OneToMany, PrimaryGeneratedColumn, RelationId, UpdateDateColumn } from 'typeorm'
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({ nullable: true })
29
+ @Field(type => Domain)
20
30
  domain?: Domain
21
31
 
22
32
  @RelationId((commonCode: CommonCode) => commonCode.domain)
@@ -1,5 +1,14 @@
1
1
  import { Field, ID, InputType, ObjectType } from 'type-graphql'
2
- import { Column, CreateDateColumn, Entity, Index, ManyToOne, PrimaryGeneratedColumn, RelationId, UpdateDateColumn } from 'typeorm'
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('ix_common_code_detail_0', (commonCodeDetail: CommonCodeDetail) => [commonCodeDetail.commonCode, commonCodeDetail.name], { unique: true })
11
- @Index('ix_common_code_detail_1', (commonCodeDetail: CommonCodeDetail) => [commonCodeDetail.commonCode, commonCodeDetail.rank], { unique: true })
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({ nullable: true })
36
+ @Field(type => Domain)
20
37
  domain?: Domain
21
38
 
22
39
  @RelationId((commonCodeDetail: CommonCodeDetail) => commonCodeDetail.domain)