interface.go
478 Bytes
package svconfig
import "gorm.io/gorm"
const (
MYSQL_TABLE_TEMPLATE = "all_table_template" // 表名模板
REDIS_CACHEP_REFIX = "apigame" // 缓存前缀
)
// ConfigRule 配置数据
type ConfigRule struct {
DbMysql *gorm.DB
TableNameTemplate string
TableName string
CacheKey string
CacheTime int
}
// IConfigRule 配置数据
type IConfigRule interface {
// GetRule 表名模板
GetRule(gameId string) *ConfigRule
}