init: 初始化 AssetX 项目仓库
包含 webapp(Next.js 用户端)、webapp-back(Go 后端)、 antdesign(管理后台)、landingpage(营销落地页)、 数据库 SQL 和配置文件。
This commit is contained in:
17
webapp-back/models/known_borrower.go
Normal file
17
webapp-back/models/known_borrower.go
Normal file
@@ -0,0 +1,17 @@
|
||||
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" }
|
||||
Reference in New Issue
Block a user