@@ -81,32 +81,33 @@ model Signer {
81
81
}
82
82
83
83
model Transaction {
84
- badResult Json ? @map (" badresult " )
85
- blockHash String @map (" block " )
86
- chainId BigInt @map (" chainid " )
87
- code String ? @db.VarChar
84
+ badResult Json ? @map (" badresult " )
85
+ blockHash String @map (" block " )
86
+ chainId BigInt @map (" chainid " )
87
+ code String ? @db.VarChar
88
88
continuation Json ?
89
- creationTime DateTime @map (" creationtime " ) @db.Timestamptz (6 )
89
+ creationTime DateTime @map (" creationtime " ) @db.Timestamptz (6 )
90
90
data Json ?
91
91
gas BigInt
92
- gasLimit BigInt @map (" gaslimit " )
93
- gasPrice Float @map (" gasprice " )
94
- goodResult Json ? @map (" goodresult " )
92
+ gasLimit BigInt @map (" gaslimit " )
93
+ gasPrice Float @map (" gasprice " )
94
+ goodResult Json ? @map (" goodresult " )
95
95
height BigInt
96
- logs String ? @db.VarChar
96
+ logs String ? @db.VarChar
97
97
metadata Json ?
98
- nonce String @db.VarChar
99
- eventCount BigInt ? @map (" num_events " )
100
- pactId String ? @map (" pactid " ) @db.VarChar
101
- proof String ? @db.VarChar
102
- requestKey String @map (" requestkey " ) @db.VarChar
98
+ nonce String @db.VarChar
99
+ eventCount BigInt ? @map (" num_events " )
100
+ pactId String ? @map (" pactid " ) @db.VarChar
101
+ proof String ? @db.VarChar
102
+ requestKey String @map (" requestkey " ) @db.VarChar
103
103
rollback Boolean ?
104
- senderAccount String @map (" sender " ) @db.VarChar
104
+ senderAccount String @map (" sender " ) @db.VarChar
105
105
step BigInt ?
106
106
ttl BigInt
107
- transactionId BigInt ? @map (" txid " )
107
+ transactionId BigInt ? @map (" txid " )
108
108
events Event []
109
- block Block @relation (fields : [blockHash ] , references : [hash ] , onDelete : NoAction , onUpdate : NoAction )
109
+ block Block @relation (fields : [blockHash ] , references : [hash ] , onDelete : NoAction , onUpdate : NoAction )
110
+ transfers Transfer []
110
111
111
112
@@id ([blockHash , requestKey ] , map : " transaction_pkey " )
112
113
@@index ([height ] )
@@ -115,17 +116,18 @@ model Transaction {
115
116
}
116
117
117
118
model Transfer {
118
- amount Decimal @db.Decimal
119
- blockHash String @map (" block " ) @db.VarChar
120
- chainId BigInt @map (" chainid " )
121
- senderAccount String @map (" from_acct " ) @db.VarChar
119
+ amount Decimal @db.Decimal
120
+ blockHash String @map (" block " ) @db.VarChar
121
+ chainId BigInt @map (" chainid " )
122
+ senderAccount String @map (" from_acct " ) @db.VarChar
122
123
height BigInt
123
- orderIndex BigInt @map (" idx " )
124
- moduleHash String @map (" modulehash " ) @db.VarChar
125
- moduleName String @map (" modulename " ) @db.VarChar
126
- requestKey String @map (" requestkey " ) @db.VarChar
127
- receiverAccount String @map (" to_acct " ) @db.VarChar
128
- blocks Block @relation (fields : [blockHash ] , references : [hash ] , onDelete : NoAction , onUpdate : NoAction )
124
+ orderIndex BigInt @map (" idx " )
125
+ moduleHash String @map (" modulehash " ) @db.VarChar
126
+ moduleName String @map (" modulename " ) @db.VarChar
127
+ requestKey String @map (" requestkey " ) @db.VarChar
128
+ receiverAccount String @map (" to_acct " ) @db.VarChar
129
+ blocks Block @relation (fields : [blockHash ] , references : [hash ] , onDelete : NoAction , onUpdate : NoAction )
130
+ Transaction Transaction ? @relation (fields : [blockHash , requestKey ] , references : [blockHash , requestKey ] , onDelete : NoAction , onUpdate : NoAction )
129
131
130
132
@@id ([blockHash , chainId , orderIndex , moduleHash , requestKey ] )
131
133
@@index ([senderAccount , height (sort : Desc ) , orderIndex ] , map : " transfers_senderAccount_height_orderIndex " )
0 commit comments