package mysqlmodel type Horoscope struct { Model // StatDate 日期(YYYYMMDD);与 Zodiac 组成联合唯一索引,保证每日每星座仅一条运势。 StatDate int64 `gorm:"column:stat_date;uniqueIndex:uk_horoscope_date_zodiac,priority:1"` Zodiac string `gorm:"column:zodiac;uniqueIndex:uk_horoscope_date_zodiac,priority:2"` // 星座 OverallScore int8 `gorm:"column:overall_score"` // 综合运势 1-5分 LoveScore int8 `gorm:"column:love_score"` // 爱情运势 CareerScore int8 `gorm:"column:career_score"` // 工作运势 WealthScore int8 `gorm:"column:wealth_score"` // 财富运势 DailyText string `gorm:"column:daily_text"` // 今日运势详情 LuckyColor string `gorm:"column:lucky_color"` // 幸运色 LuckyNumber string `gorm:"column:lucky_number"` // 幸运数字 } func (Horoscope) TableName() string { return "horoscopes" }