This commit is contained in:
@@ -11,7 +11,7 @@ const (
|
||||
|
||||
// ItemGift 物品奖励基础配置模型(与数据库表 item_gift 字段一一对应,核心存储结构)
|
||||
type ItemGift struct {
|
||||
*BaseConfig
|
||||
*cool.Model // 保留通用Model(ID/创建时间/更新时间等)
|
||||
// 核心业务字段(按需求实现:物品id、备注、是否启用、是否为扭蛋、物品数量)
|
||||
ItemID int64 `gorm:"not null;default:0;comment:'物品ID,关联物品配置表主键'" json:"item_id"`
|
||||
|
||||
@@ -20,6 +20,7 @@ type ItemGift struct {
|
||||
ItemMinCount int64 `gorm:"column:item_min_count;not null;comment:单次采集最小产出数量" json:"item_min_count"`
|
||||
// ItemMaxCount 单次采集最大产出数量
|
||||
ItemMaxCount uint32 `gorm:"column:item_max_count;not null;comment:单次采集最大产出数量" json:"item_max_count"`
|
||||
Remark string `gorm:"type:varchar(255);default:'';comment:'性别配置备注(如:默认性别规则)'" json:"remark"` // 调整注释
|
||||
}
|
||||
|
||||
// TableName 指定ItemGift对应的数据库表名(遵循现有代码规范)
|
||||
@@ -35,7 +36,7 @@ func (*ItemGift) GroupName() string {
|
||||
// NewItemGift 创建一个新的ItemGift实例(初始化通用Model字段+默认值,与现有实例创建逻辑一致)
|
||||
func NewItemGift() *ItemGift {
|
||||
return &ItemGift{
|
||||
BaseConfig: NewBaseConfig(),
|
||||
Model: cool.NewModel(),
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
@@ -11,15 +11,16 @@ const (
|
||||
|
||||
// PetReward 精灵奖励基础配置模型(核心存储结构,与数据库表字段一一对应)
|
||||
type PetReward struct {
|
||||
*BaseConfig
|
||||
*cool.Model // 保留通用Model(ID/创建时间/更新时间等)
|
||||
|
||||
MonID int32 `gorm:"not null;comment:'BOSS对应的精灵ID'" json:"mon_id"`
|
||||
DV int32 `gorm:"not null;default:0;comment:'成长值'" json:"dv"`
|
||||
Nature int32 `gorm:"not null;default:0;comment:'BOSS属性-性格'" json:"nature"`
|
||||
Effect int32 `gorm:"not null;comment:'BOSS特性'" json:"effect"`
|
||||
Lv int32 `gorm:"not null;comment:'BOSS等级(LvHpMatchUser非0时此配置无效)'" json:"lv"`
|
||||
IsEgg uint32 `gorm:"not null;default:0;comment:'是否蛋'" json:"is_egg"` //奖励是否为扭蛋奖励
|
||||
IsLight uint32 `gorm:"not null;default:0;comment:'是否擦灯'" json:"is_light"` //奖励是否为光之子``
|
||||
IsEgg uint32 `gorm:"not null;default:0;comment:'是否蛋'" json:"is_egg"` //奖励是否为扭蛋奖励
|
||||
IsLight uint32 `gorm:"not null;default:0;comment:'是否擦灯'" json:"is_light"` //奖励是否为光之子``
|
||||
Remark string `gorm:"type:varchar(255);default:'';comment:'性别配置备注(如:默认性别规则)'" json:"remark"` // 调整注释
|
||||
}
|
||||
|
||||
// TableName 指定PetReward对应的数据库表名(遵循现有代码规范)
|
||||
@@ -35,7 +36,7 @@ func (*PetReward) GroupName() string {
|
||||
// NewPetReward 创建一个新的PetReward实例(初始化通用Model字段+所有字段默认值,与NewBossConfig保持一致)
|
||||
func NewPetReward() *PetReward {
|
||||
return &PetReward{
|
||||
BaseConfig: NewBaseConfig(),
|
||||
Model: cool.NewModel(),
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
Reference in New Issue
Block a user