@things-factory/quotation 8.0.40 → 9.0.0-9.0.0-beta.59.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.
@@ -1,97 +0,0 @@
1
- import {
2
- CreateDateColumn,
3
- UpdateDateColumn,
4
- DeleteDateColumn,
5
- Entity,
6
- Index,
7
- Column,
8
- RelationId,
9
- ManyToOne,
10
- PrimaryGeneratedColumn,
11
- VersionColumn
12
- } from 'typeorm'
13
- import { ObjectType, Field, Int, ID, registerEnumType } from 'type-graphql'
14
-
15
- import { Domain } from '@things-factory/shell'
16
- import { User } from '@things-factory/auth-base'
17
-
18
- export enum QuotationStatus {
19
- STATUS_A = 'STATUS_A',
20
- STATUS_B = 'STATUS_B'
21
- }
22
-
23
- registerEnumType(QuotationStatus, {
24
- name: 'QuotationStatus',
25
- description: 'state enumeration of a quotation'
26
- })
27
-
28
- @Entity()
29
- @Index('ix_quotation_0', (quotation: Quotation) => [quotation.domain, quotation.name, quotation.deletedAt], {
30
- unique: true
31
- })
32
- @ObjectType({ description: 'Entity for Quotation' })
33
- export class Quotation {
34
- @PrimaryGeneratedColumn('uuid')
35
- @Field(type => ID)
36
- readonly id: string
37
-
38
- @VersionColumn()
39
- @Field({ nullable: true })
40
- version?: number = 1
41
-
42
- @ManyToOne(type => Domain)
43
- @Field(type => Domain)
44
- domain?: Domain
45
-
46
- @RelationId((quotation: Quotation) => quotation.domain)
47
- domainId?: string
48
-
49
- @Column()
50
- @Field({ nullable: true })
51
- name?: string
52
-
53
- @Column({ nullable: true })
54
- @Field({ nullable: true })
55
- description?: string
56
-
57
- @Column({ nullable: true })
58
- @Field({ nullable: true })
59
- active?: boolean
60
-
61
- @Column({ nullable: true })
62
- @Field({ nullable: true })
63
- state?: QuotationStatus
64
-
65
- @Column({ nullable: true })
66
- @Field({ nullable: true })
67
- params?: string
68
-
69
- @CreateDateColumn()
70
- @Field({ nullable: true })
71
- createdAt?: Date
72
-
73
- @UpdateDateColumn()
74
- @Field({ nullable: true })
75
- updatedAt?: Date
76
-
77
- @DeleteDateColumn()
78
- @Field({ nullable: true })
79
- deletedAt?: Date
80
-
81
- @ManyToOne(type => User, { nullable: true })
82
- @Field(type => User, { nullable: true })
83
- creator?: User
84
-
85
- @RelationId((quotation: Quotation) => quotation.creator)
86
- creatorId?: string
87
-
88
- @ManyToOne(type => User, { nullable: true })
89
- @Field(type => User, { nullable: true })
90
- updater?: User
91
-
92
- @RelationId((quotation: Quotation) => quotation.updater)
93
- updaterId?: string
94
-
95
- @Field(type => String, { nullable: true })
96
- thumbnail?: string
97
- }
@@ -1,10 +0,0 @@
1
- {
2
- "extends": "../../tsconfig-base.json",
3
- "compilerOptions": {
4
- "strict": false,
5
- "module": "commonjs",
6
- "outDir": "../dist-server",
7
- "baseUrl": "./"
8
- },
9
- "include": ["./**/*"]
10
- }