Skip to content

Commit

Permalink
Merge pull request #26 from bradzhang717/rc_20240226_hotfix
Browse files Browse the repository at this point in the history
Rc 20240226 hotfix
  • Loading branch information
max-uxuy authored Feb 26, 2024
2 parents 06b48ff + 4bcf49b commit e062ecd
Showing 1 changed file with 18 additions and 16 deletions.
34 changes: 18 additions & 16 deletions model/transaction.go
Original file line number Diff line number Diff line change
Expand Up @@ -105,22 +105,24 @@ func (BalanceTxn) TableName() string {
}

type Transaction struct {
ID uint64 `gorm:"primaryKey" json:"id"`
ChainId int64 `json:"chain_id" gorm:"-:all"`
Protocol string `json:"protocol" gorm:"column:protocol"` // protocol name
Chain string `json:"chain" gorm:"column:chain"` // chain name
BlockHeight uint64 `json:"block_height" gorm:"column:block_height"` // block height
PositionInBlock uint64 `json:"position_in_block" gorm:"column:position_in_block"` // Position in Block
BlockTime time.Time `json:"block_time" gorm:"column:block_time"` // block time
TxHash []byte `json:"tx_hash" gorm:"column:tx_hash"` // tx hash
From string `json:"from" gorm:"column:from"` // from address
To string `json:"to" gorm:"column:to"` // to address
Op string `json:"op" gorm:"column:op"` // op code
Gas int64 `json:"gas" gorm:"column:gas"` // gas
GasPrice int64 `json:"gas_price" gorm:"column:gas_price"` // gas price
Status int8 `json:"status" gorm:"column:status"` // tx status
CreatedAt time.Time `json:"created_at" gorm:"column:created_at"`
UpdatedAt time.Time `json:"updated_at" gorm:"column:updated_at"`
ID uint64 `gorm:"primaryKey" json:"id"`
ChainId int64 `json:"chain_id" gorm:"-:all"`
Protocol string `json:"protocol" gorm:"column:protocol"` // protocol name
Chain string `json:"chain" gorm:"column:chain"` // chain name
BlockHeight uint64 `json:"block_height" gorm:"column:block_height"` // block height
PositionInBlock uint64 `json:"position_in_block" gorm:"column:position_in_block"` // Position in Block
BlockTime time.Time `json:"block_time" gorm:"column:block_time"` // block time
TxHash []byte `json:"tx_hash" gorm:"column:tx_hash"` // tx hash
From string `json:"from" gorm:"column:from"` // from address
To string `json:"to" gorm:"column:to"` // to address
Op string `json:"op" gorm:"column:op"` // op code
Tick string `json:"tick" gorm:"column:tick"` // inscription code
Amount decimal.Decimal `json:"amt" gorm:"column:amt;type:decimal(38,18)"` // balance
Gas int64 `json:"gas" gorm:"column:gas"` // gas
GasPrice int64 `json:"gas_price" gorm:"column:gas_price"` // gas price
Status int8 `json:"status" gorm:"column:status"` // tx status
CreatedAt time.Time `json:"created_at" gorm:"column:created_at"`
UpdatedAt time.Time `json:"updated_at" gorm:"column:updated_at"`
}

func (Transaction) TableName() string {
Expand Down

0 comments on commit e062ecd

Please sign in to comment.