package confdemo import ( "apigame/configs/confbase" "apigame/service-common/svconst" "fmt" ) // DemoConfig 房间排行活动配置 分析后数据 type DemoConfig struct { Raw *DemoConfigRaw `json:"-"` Id int64 // ID OpenLevel int // 开启等级 } func (c *DemoConfig) ConfInfo(suffix string) *confbase.ConfInfo { tableName := "s_demo" return &confbase.ConfInfo{ DbMysql: svconst.DbConfig, TableName: tableName + suffix, KeyName: "id", CacheKey: fmt.Sprintf("%s:%s:%s", svconst.REDIS_CACHEP_REFIX, tableName, suffix), CacheTime: 300, } } // DemoConfigRaw 房间排行活动配置 原始数据 type DemoConfigRaw struct { Id int64 `gorm:"column:id;primaryKey"` // ID OpenLevel int // 开启等级 PreviewTime int64 // 预告时间 StartTime int64 // 开始时间 EndTime int64 // 结束时间 Robot string // 机器人配置 Room string // 房间配置 Ver string // 版本号 Status int // 状态 0=关闭 1=开启 UpdateTime int64 // 修改时间戳 }