1
This commit is contained in:
49
modules/config/model/peak_tianxuan.go
Normal file
49
modules/config/model/peak_tianxuan.go
Normal file
@@ -0,0 +1,49 @@
|
||||
package model
|
||||
|
||||
import (
|
||||
"blazing/cool"
|
||||
)
|
||||
|
||||
const (
|
||||
TableNamePeakTianxuan = "config_peak_tianxuan"
|
||||
)
|
||||
|
||||
type PeakTianxuan struct {
|
||||
*BaseConfig
|
||||
|
||||
WeekIndex uint32 `gorm:"not null;index:idx_peak_tianxuan_week;uniqueIndex:idx_peak_tianxuan_week_pet;comment:'周序号'" json:"week_index"`
|
||||
DisplayOrder uint32 `gorm:"not null;default:0;comment:'展示顺序'" json:"display_order"`
|
||||
PetID uint32 `gorm:"not null;uniqueIndex:idx_peak_tianxuan_week_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{})
|
||||
}
|
||||
35
modules/config/model/peak_tianxuan_vote.go
Normal file
35
modules/config/model/peak_tianxuan_vote.go
Normal file
@@ -0,0 +1,35 @@
|
||||
package model
|
||||
|
||||
import (
|
||||
"blazing/cool"
|
||||
)
|
||||
|
||||
const (
|
||||
TableNamePeakTianxuanVote = "config_peak_tianxuan_vote"
|
||||
)
|
||||
|
||||
type PeakTianxuanVote struct {
|
||||
*cool.Model
|
||||
|
||||
WeekIndex uint32 `gorm:"not null;uniqueIndex:idx_peak_tianxuan_vote_week_player;index:idx_peak_tianxuan_vote_week_pet;comment:'周序号'" json:"week_index"`
|
||||
PlayerID uint32 `gorm:"not null;uniqueIndex:idx_peak_tianxuan_vote_week_player;comment:'投票玩家ID'" json:"player_id"`
|
||||
PetID uint32 `gorm:"not null;index:idx_peak_tianxuan_vote_week_pet;comment:'投票精灵ID'" json:"pet_id"`
|
||||
}
|
||||
|
||||
func (*PeakTianxuanVote) TableName() string {
|
||||
return TableNamePeakTianxuanVote
|
||||
}
|
||||
|
||||
func (*PeakTianxuanVote) GroupName() string {
|
||||
return "default"
|
||||
}
|
||||
|
||||
func NewPeakTianxuanVote() *PeakTianxuanVote {
|
||||
return &PeakTianxuanVote{
|
||||
Model: cool.NewModel(),
|
||||
}
|
||||
}
|
||||
|
||||
func init() {
|
||||
cool.CreateTable(&PeakTianxuanVote{})
|
||||
}
|
||||
Reference in New Issue
Block a user