1
- import { Entity as Entity_ , Column as Column_ , PrimaryColumn as PrimaryColumn_ , Index as Index_ , OneToMany as OneToMany_ , ManyToOne as ManyToOne_ } from "typeorm"
1
+ import { Entity as Entity_ , Column as Column_ , PrimaryColumn as PrimaryColumn_ , StringColumn as StringColumn_ , BigIntColumn as BigIntColumn_ , Index as Index_ , BooleanColumn as BooleanColumn_ , DateTimeColumn as DateTimeColumn_ , IntColumn as IntColumn_ , OneToMany as OneToMany_ , ManyToOne as ManyToOne_ , FloatColumn as FloatColumn_ } from "@subsquid/ typeorm-store "
2
2
import * as marshal from "./marshal"
3
3
import { Attribute } from "./_attribute"
4
4
import { CollectionEvent } from "./collectionEvent.model"
@@ -16,93 +16,96 @@ export class CollectionEntity {
16
16
@Column_ ( "jsonb" , { transformer : { to : obj => obj == null ? undefined : obj . map ( ( val : any ) => val . toJSON ( ) ) , from : obj => obj == null ? undefined : marshal . fromList ( obj , val => new Attribute ( undefined , marshal . nonNull ( val ) ) ) } , nullable : true } )
17
17
attributes ! : ( Attribute ) [ ] | undefined | null
18
18
19
+ @StringColumn_ ( { nullable : true } )
20
+ baseUri ! : string | undefined | null
21
+
19
22
@Index_ ( )
20
- @Column_ ( "numeric" , { transformer : marshal . bigintTransformer , nullable : true } )
23
+ @BigIntColumn_ ( { nullable : true } )
21
24
blockNumber ! : bigint | undefined | null
22
25
23
- @Column_ ( "bool" , { nullable : false } )
26
+ @BooleanColumn_ ( { nullable : false } )
24
27
burned ! : boolean
25
28
26
29
@Index_ ( )
27
- @Column_ ( "timestamp with time zone" , { nullable : false } )
30
+ @DateTimeColumn_ ( { nullable : false } )
28
31
createdAt ! : Date
29
32
30
- @Column_ ( "text" , { nullable : false } )
33
+ @StringColumn_ ( { nullable : false } )
31
34
currentOwner ! : string
32
35
33
- @Column_ ( "int4" , { nullable : false } )
36
+ @IntColumn_ ( { nullable : false } )
34
37
distribution ! : number
35
38
36
39
@OneToMany_ ( ( ) => CollectionEvent , e => e . collection )
37
40
events ! : CollectionEvent [ ]
38
41
39
42
@Index_ ( )
40
- @Column_ ( "numeric" , { transformer : marshal . bigintTransformer , nullable : false } )
43
+ @BigIntColumn_ ( { nullable : false } )
41
44
floor ! : bigint
42
45
43
46
@Index_ ( { unique : true } )
44
- @Column_ ( "text" , { nullable : false } )
47
+ @StringColumn_ ( { nullable : false } )
45
48
hash ! : string
46
49
47
50
@Index_ ( )
48
- @Column_ ( "numeric" , { transformer : marshal . bigintTransformer , nullable : false } )
51
+ @BigIntColumn_ ( { nullable : false } )
49
52
highestSale ! : bigint
50
53
51
54
@PrimaryColumn_ ( )
52
55
id ! : string
53
56
54
- @Column_ ( "text" , { nullable : true } )
57
+ @StringColumn_ ( { nullable : true } )
55
58
image ! : string | undefined | null
56
59
57
- @Column_ ( "text" , { nullable : false } )
60
+ @StringColumn_ ( { nullable : false } )
58
61
issuer ! : string
59
62
60
- @Column_ ( "int4" , { nullable : true } )
63
+ @IntColumn_ ( { nullable : true } )
61
64
max ! : number | undefined | null
62
65
63
- @Column_ ( "text" , { nullable : true } )
66
+ @StringColumn_ ( { nullable : true } )
64
67
media ! : string | undefined | null
65
68
66
69
@Index_ ( )
67
70
@ManyToOne_ ( ( ) => MetadataEntity , { nullable : true } )
68
71
meta ! : MetadataEntity | undefined | null
69
72
70
- @Column_ ( "text" , { nullable : true } )
73
+ @StringColumn_ ( { nullable : true } )
71
74
metadata ! : string | undefined | null
72
75
73
76
@Index_ ( )
74
- @Column_ ( "text" , { nullable : true } )
77
+ @StringColumn_ ( { nullable : true } )
75
78
name ! : string | undefined | null
76
79
77
80
@Index_ ( )
78
- @Column_ ( "int4" , { nullable : false } )
81
+ @IntColumn_ ( { nullable : false } )
79
82
nftCount ! : number
80
83
81
84
@OneToMany_ ( ( ) => NFTEntity , e => e . collection )
82
85
nfts ! : NFTEntity [ ]
83
86
84
- @Column_ ( "int4" , { nullable : false } )
87
+ @IntColumn_ ( { nullable : false } )
85
88
ownerCount ! : number
86
89
87
- @Column_ ( "text" , { nullable : true } )
90
+ @StringColumn_ ( { nullable : true } )
88
91
recipient ! : string | undefined | null
89
92
90
- @Column_ ( "numeric" , { transformer : marshal . floatTransformer , nullable : true } )
93
+ @FloatColumn_ ( { nullable : true } )
91
94
royalty ! : number | undefined | null
92
95
93
96
@Index_ ( )
94
- @Column_ ( "int4" , { nullable : false } )
97
+ @IntColumn_ ( { nullable : false } )
95
98
supply ! : number
96
99
97
100
@Index_ ( )
98
- @Column_ ( "timestamp with time zone" , { nullable : false } )
101
+ @DateTimeColumn_ ( { nullable : false } )
99
102
updatedAt ! : Date
100
103
101
- @Column_ ( "int4" , { nullable : false } )
104
+ @IntColumn_ ( { nullable : false } )
102
105
version ! : number
103
106
104
107
@Index_ ( )
105
- @Column_ ( "numeric" , { transformer : marshal . bigintTransformer , nullable : false } )
108
+ @BigIntColumn_ ( { nullable : false } )
106
109
volume ! : bigint
107
110
108
111
@Column_ ( "varchar" , { length : 8 , nullable : true } )
0 commit comments