Files
assetx/webapp-back/models/known_borrower.go
default 2ee4553b71 init: 初始化 AssetX 项目仓库
包含 webapp(Next.js 用户端)、webapp-back(Go 后端)、
antdesign(管理后台)、landingpage(营销落地页)、
数据库 SQL 和配置文件。
2026-03-27 11:26:43 +00:00

18 lines
790 B
Go

package models
import "time"
// KnownBorrower stores every address that has ever interacted with the lending contract.
// The liquidation bot checks ALL known borrowers for isLiquidatable on every tick,
// so accounts whose health factor drops due to oracle price changes are still caught
// even if they haven't had a recent on-chain transaction.
type KnownBorrower struct {
ID uint `gorm:"primaryKey;autoIncrement" json:"id"`
ChainID int `gorm:"uniqueIndex:idx_known_borrower" json:"chain_id"`
Address string `gorm:"size:42;uniqueIndex:idx_known_borrower" json:"address"`
FirstSeenAt time.Time `json:"first_seen_at"`
LastSeenAt time.Time `json:"last_seen_at"`
}
func (KnownBorrower) TableName() string { return "known_borrowers" }