package models import "time" // FootballLeague 足球联赛信息表 type FootballLeague struct { LeagueID int `gorm:"primaryKey;column:league_id;type:int;not null;comment:'联赛id'"` // 联赛id LeagueName string `gorm:"column:league_name;type:varchar(255);default:null;comment:'联赛名称'"` // 联赛名称 LeagueAllName string `gorm:"column:league_all_name;type:varchar(255);default:null;comment:'联赛全称'"` // 联赛全称 CreatedAt time.Time `gorm:"column:created_at;type:datetime;default:null;default:CURRENT_TIMESTAMP"` } // TableName 解决gorm表明映射 func (FootballLeague) TableName() string { return "football_league" }