init: 初始化 AssetX 项目仓库
包含 webapp(Next.js 用户端)、webapp-back(Go 后端)、 antdesign(管理后台)、landingpage(营销落地页)、 数据库 SQL 和配置文件。
This commit is contained in:
22
webapp-back/models/liquidation.go
Normal file
22
webapp-back/models/liquidation.go
Normal file
@@ -0,0 +1,22 @@
|
||||
package models
|
||||
|
||||
import "time"
|
||||
|
||||
// LiquidationRecord stores each batch liquidation execution
|
||||
type LiquidationRecord struct {
|
||||
ID uint `gorm:"primaryKey;autoIncrement" json:"id"`
|
||||
ChainID int `gorm:"index" json:"chain_id"`
|
||||
TxHash string `gorm:"size:66;uniqueIndex" json:"tx_hash"`
|
||||
LiquidatorAddr string `gorm:"size:42" json:"liquidator_addr"`
|
||||
AccountCount int `json:"account_count"`
|
||||
Accounts string `gorm:"type:text" json:"accounts"` // JSON array of addresses
|
||||
GasUsed uint64 `json:"gas_used"`
|
||||
BlockNumber uint64 `json:"block_number"`
|
||||
Status string `gorm:"size:20;default:'success'" json:"status"` // success / failed
|
||||
ErrorMessage string `gorm:"type:text" json:"error_message,omitempty"`
|
||||
CreatedAt time.Time `json:"created_at"`
|
||||
}
|
||||
|
||||
func (LiquidationRecord) TableName() string {
|
||||
return "liquidation_records"
|
||||
}
|
||||
Reference in New Issue
Block a user