```
All checks were successful
ci/woodpecker/push/my-first-workflow Pipeline was successful

refactor(config): 移除怪物刷新相关代码并优化地图坑位配置

移除 modules/config/controller/admin/monster_refresh.go 中的
TaskInfoController 及其相关路由注册逻辑

移除 modules/config/model/map_monster.go 中的 MonsterRefresh
模型定义及相关常量、方法

重构 modules/config/model/map_pit.go 中的 MapPit 结
This commit is contained in:
昔念
2026-02-24 14:11:01 +08:00
parent 41714fca0b
commit 0a2ec3af08
4 changed files with 84 additions and 165 deletions

View File

@@ -21,13 +21,13 @@ type Event struct {
// MapPit 地图坑位核心配置模型参照MonsterRefresh实现风格
type MapPit struct {
*cool.Model // 保留通用ModelID/创建时间/更新时间等)
Remark string `gorm:"type:varchar(255);default:'';comment:'性别配置备注(如:默认性别规则)'" json:"remark"` // 调整注释 // 复用通用基础配置ID/创建时间/更新时间等)
MapID []int32 `gorm:"type:int[];comment:'绑定地图地图ID'" json:"map_id"`
*BaseConfig
*Event
// 复用通用基础配置ID/创建时间/更新时间等)
MapID []int32 `gorm:"type:int[];comment:'绑定地图地图ID'" json:"map_id"`
RefreshID []int `gorm:"type:int[];comment:'精灵ID列表'" json:"refresh_id"`
Pos []int `gorm:"type:int[];comment:'坑位位置'" json:"pos"`
//最小等级
MinLevel int `gorm:"type:int;default:0;comment:'最小等级'" json:"min_level"`
//最大等级
@@ -49,8 +49,8 @@ func (*MapPit) GroupName() string {
// NewMapPit 创建一个新的MapPit实例初始化通用BaseConfig
func NewMapPit() *MapPit {
return &MapPit{
Model: cool.NewModel(),
Event: &Event{},
BaseConfig: NewBaseConfig(),
Event: &Event{},
}
}