Commit f1ed32e8 authored by Hamdi Allam's avatar Hamdi Allam

remove gorm tags besides `embedded`

parent f2392da0
...@@ -15,9 +15,9 @@ import ( ...@@ -15,9 +15,9 @@ import (
*/ */
type BlockHeader struct { type BlockHeader struct {
Hash common.Hash `gorm:"primaryKey"` Hash common.Hash
ParentHash common.Hash `gorm:"unique"` ParentHash common.Hash
Number pgtype.Numeric `gorm:"unique"` Number pgtype.Numeric
Timestamp uint64 Timestamp uint64
} }
...@@ -35,8 +35,8 @@ type L2BlockHeader struct { ...@@ -35,8 +35,8 @@ type L2BlockHeader struct {
} }
type LegacyStateBatch struct { type LegacyStateBatch struct {
Index uint64 `gorm:"primaryKey"` Index uint64
Root common.Hash `gorm:"unique"` Root common.Hash
Size uint64 Size uint64
PrevTotal uint64 PrevTotal uint64
L1BlockHash common.Hash L1BlockHash common.Hash
......
...@@ -25,7 +25,7 @@ type TokenPair struct { ...@@ -25,7 +25,7 @@ type TokenPair struct {
} }
type Deposit struct { type Deposit struct {
GUID string `gorm:"primaryKey"` GUID string
InitiatedL1EventGUID string InitiatedL1EventGUID string
Tx Transaction `gorm:"embedded"` Tx Transaction `gorm:"embedded"`
...@@ -38,7 +38,7 @@ type DepositWithTransactionHash struct { ...@@ -38,7 +38,7 @@ type DepositWithTransactionHash struct {
} }
type Withdrawal struct { type Withdrawal struct {
GUID string `gorm:"primaryKey"` GUID string
InitiatedL2EventGUID string InitiatedL2EventGUID string
WithdrawalHash common.Hash WithdrawalHash common.Hash
......
...@@ -10,7 +10,7 @@ import ( ...@@ -10,7 +10,7 @@ import (
*/ */
type ContractEvent struct { type ContractEvent struct {
GUID string `gorm:"primaryKey"` GUID string
BlockHash common.Hash BlockHash common.Hash
TransactionHash common.Hash TransactionHash common.Hash
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment