Files
bl/modules/config/model/peak_tianxuan.go
昔念 c07e521e4e
All checks were successful
ci/woodpecker/push/my-first-workflow Pipeline was successful
1
2026-04-26 02:33:06 +08:00

50 lines
2.1 KiB
Go

package model
import (
"blazing/cool"
)
const (
TableNamePeakTianxuan = "config_peak_tianxuan"
)
type PeakTianxuan struct {
*BaseConfig
PlayerID uint32 `gorm:"not null;index:idx_peak_tianxuan_player;uniqueIndex:idx_peak_tianxuan_player_pet;comment:'所属玩家ID'" json:"player_id"`
DisplayOrder uint32 `gorm:"not null;default:0;comment:'展示顺序'" json:"display_order"`
PetID uint32 `gorm:"not null;uniqueIndex:idx_peak_tianxuan_player_pet;comment:'天选精灵ID'" json:"pet_id"`
PresetName string `gorm:"type:varchar(64);not null;default:'';comment:'预设显示名'" json:"preset_name"`
Level uint32 `gorm:"not null;default:100;comment:'预设等级'" json:"level"`
Nature uint32 `gorm:"not null;default:0;comment:'预设性格'" json:"nature"`
Hp uint32 `gorm:"not null;default:0;comment:'预设当前生命'" json:"hp"`
MaxHp uint32 `gorm:"not null;default:0;comment:'预设最大生命'" json:"max_hp"`
Attack uint32 `gorm:"not null;default:0;comment:'预设攻击'" json:"attack"`
Defence uint32 `gorm:"not null;default:0;comment:'预设防御'" json:"defence"`
SpAttack uint32 `gorm:"not null;default:0;comment:'预设特攻'" json:"sp_attack"`
SpDefence uint32 `gorm:"not null;default:0;comment:'预设特防'" json:"sp_defence"`
Speed uint32 `gorm:"not null;default:0;comment:'预设速度'" json:"speed"`
SkinID uint32 `gorm:"not null;default:0;comment:'预设皮肤ID'" json:"skin_id"`
EffectIDs []uint32 `gorm:"type:jsonb;not null;default:'[]';comment:'预设特性/效果ID列表'" json:"effect_ids"`
SkillIDs []uint32 `gorm:"type:jsonb;not null;default:'[]';comment:'预设技能ID列表'" json:"skill_ids"`
VoteCount uint32 `gorm:"not null;default:0;comment:'票数统计'" json:"vote_count"`
}
func (*PeakTianxuan) TableName() string {
return TableNamePeakTianxuan
}
func (*PeakTianxuan) GroupName() string {
return "default"
}
func NewPeakTianxuan() *PeakTianxuan {
return &PeakTianxuan{
BaseConfig: NewBaseConfig(),
}
}
func init() {
cool.CreateTable(&PeakTianxuan{})
}