package model import ( "time" ) type TopCode struct { Id uint `gorm:"column:id;primary_key" json:"id"` Code string `gorm:"column:code" json:"code"` CreatedTime time.Time `gorm:"column:created_time" json:"createdTime"` EndTime time.Time `gorm:"column:end_time" json:"endTime"` UserId uint `gorm:"column:user_id" json:"userId"` } func (r *TopCode) TableName() string { return "recook_user_top_code" }