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

This commit is contained in:
昔念
2026-02-20 22:39:04 +08:00
parent 922f7c3622
commit f6b583575a
5 changed files with 30 additions and 30 deletions

View File

@@ -11,17 +11,15 @@ const (
// MapConfig 地图核心配置模型(包含地图基础属性、刷怪配置、天气配置、掉落物配置)
type MapConfig struct {
*BaseConfig
*cool.Model // 保留通用ModelID/创建时间/更新时间等)
// 核心字段
MapID uint32 `gorm:"not null;primaryKey;comment:'地图唯一ID主键'" json:"map_id" description:"地图ID"`
IsSpawnMonster int32 `gorm:"not null;default:0;comment:'是否开启刷怪1:开启0:关闭)'" json:"is_spawn_monster" description:"是否开启刷怪"`
//`gorm:"type:int[];comment:'副宠物IDs1,2,3'" json:"sub_pet_ids"`
WeatherType []uint32 `gorm:"type:int[];comment:'天气类型( 1-雨天2-雪天)'" json:"weather_type"`
// 掉落物配置
DropItemIds []uint32 `gorm:"type:int[];comment:'掉落物IDs" json:"drop_item_ids"`
Remark string `gorm:"type:varchar(255);default:'';comment:'性别配置备注(如:默认性别规则)'" json:"remark"` // 调整注释
}
// -------------------------- 核心配套方法(遵循项目规范)--------------------------
@@ -35,7 +33,7 @@ func (*MapConfig) GroupName() string {
func NewMapConfig() *MapConfig {
return &MapConfig{
BaseConfig: NewBaseConfig(),
Model: cool.NewModel(),
}
}