diff --git a/models/base.go b/models/base.go index d1d0e27..f012503 100644 --- a/models/base.go +++ b/models/base.go @@ -61,6 +61,7 @@ func init() { new(SignHistory), new(SignUp), new(TugOfWar), + new(TugOfWarTest), new(UpperWall), new(User), new(UserWalletHistory), diff --git a/models/tug_of_war.go b/models/tug_of_war.go index 2096e11..52ae18b 100644 --- a/models/tug_of_war.go +++ b/models/tug_of_war.go @@ -8,11 +8,11 @@ import ( ) type TugOfWar struct { - Id int64 `json:"id" description:"主键"` - Model string `json:"model" description:"拔河模式.随机分配模式|H5挑选模式|大屏幕二维码模式"` - Status string `json:"status" description:"拔河活动状态[未开始,准备中,进行中,已结束]"` - Number int `json:"number" description:"预测人数"` - ActivityId int64 `json:"activity_id" description:"主活动id"` + Id int64 `json:"id" xorm:"not null pk autoincr INT(11)"` + Model string `json:"model" xorm:"not null default '随机分配模式' comment('拔河模式.随机分配模式|H5挑选模式|大屏幕二维码模式') VARCHAR(128)"` + Status string `json:"status" xorm:"not null default '未开始' comment('拔河活动状态[未开始,准备中,进行中,已结束]') VARCHAR(128)"` + Number int `json:"number" xorm:"not null default 0 comment('预测人数') INT(11)"` + ActivityId int64 `json:"activity_id" xorm:"not null default 0 comment('主活动id') INT(11)"` IsDelete bool `json:"is_delete" xorm:"default(0)" description:"是否删除"` CreatedAt time.Time `json:"created_at" xorm:"created" description:"创建时间"` UpdatedAt time.Time `json:"updated_at" xorm:"updated" description:"更新时间"`