This commit is contained in:
@@ -11,17 +11,15 @@ const (
|
||||
|
||||
// MapConfig 地图核心配置模型(包含地图基础属性、刷怪配置、天气配置、掉落物配置)
|
||||
type MapConfig struct {
|
||||
*BaseConfig
|
||||
|
||||
*cool.Model // 保留通用Model(ID/创建时间/更新时间等)
|
||||
// 核心字段
|
||||
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:'副宠物IDs(如:1,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(),
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
Reference in New Issue
Block a user