Files
bl/modules/config/model/boss_pet.go
昔念 026689f3ed ```
feat(cache): 添加复合键缓存操作支持

添加了基于 uint32+string 组合键的缓存操作方法,包括
GetByCompoundKey、SetByCompoundKey、DelByCompoundKey 和
ContainsByCompoundKey 方法,用于处理用户ID和会话ID的组合缓存场景

fix(vscode): 添加 cSpell 配置支持 struc 词汇

refactor(session): 移除过时的会话管理方法

移除了基于单一字符串键的会话管理方法,因为已迁移到使用
复合键的缓存操作方式
```
2026-01-19 18:51:56 +08:00

43 lines
1.3 KiB
Go
Raw Blame History

This file contains ambiguous Unicode characters

This file contains Unicode characters that might be confused with other characters. If you think that this is intentional, you can safely ignore this warning. Use the Escape button to reveal them.

package model
import (
"blazing/cool"
)
const (
TableNameBossConfig = "config_boss" // BOSS配置表全量包含基础/奖励/护盾/捕捉/特效/世界野怪/地图费用/战斗通用逻辑)
)
// BossConfig BOSS配置模型覆盖所有补充的配置项GBTL/非VIP费用/首场景/战斗通用逻辑)
type BossConfig struct {
*cool.Model // 嵌入通用Model包含ID/创建时间/更新时间等通用字段)
PetBaseConfig
Script string `gorm:"size:1024;default:'';comment:'BOSS脚本'" json:"script"` //boss出招逻辑做成js脚本
// ISboss uint32 `gorm:"not null;default:0;comment:'是否是Boss'" json:"is_boss"`
// ISgift uint32 `gorm:"not null;default:0;comment:'是否是礼物'" json:"is_gif"`
}
// TableName 指定BossConfig对应的数据库表名
func (*BossConfig) TableName() string {
return TableNameBossConfig
}
// GroupName 指定表所属的分组(保持和怪物刷新表一致)
func (*BossConfig) GroupName() string {
return "default"
}
// NewBossConfig 创建一个新的BossConfig实例初始化通用Model字段+所有默认值)
func NewBossConfig() *BossConfig {
return &BossConfig{
Model: cool.NewModel(),
}
}
// init 程序启动时自动创建/同步boss_config表结构
func init() {
cool.CreateTable(&BossConfig{})
}