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