包含 webapp(Next.js 用户端)、webapp-back(Go 后端)、 antdesign(管理后台)、landingpage(营销落地页)、 数据库 SQL 和配置文件。
21 lines
915 B
Go
21 lines
915 B
Go
package models
|
|
|
|
import "time"
|
|
|
|
// SystemContract is the central registry for all infrastructure contract addresses.
|
|
// One row per (name, chain_id) pair.
|
|
// Replaces the former alp_pools and lending_markets tables (which had only one row each).
|
|
type SystemContract struct {
|
|
ID uint `gorm:"primaryKey;autoIncrement" json:"id"`
|
|
Name string `gorm:"size:100;not null;uniqueIndex:uk_name_chain" json:"name"`
|
|
ChainID int `gorm:"not null;uniqueIndex:uk_name_chain" json:"chain_id"`
|
|
Address string `gorm:"size:42" json:"address"`
|
|
DeployBlock *uint64 `json:"deploy_block"`
|
|
Description string `gorm:"type:text" json:"description"`
|
|
IsActive bool `gorm:"default:true" json:"is_active"`
|
|
CreatedAt time.Time `json:"created_at"`
|
|
UpdatedAt time.Time `json:"updated_at"`
|
|
}
|
|
|
|
func (SystemContract) TableName() string { return "system_contracts" }
|