This commit is contained in:
@@ -15,12 +15,9 @@ type Player struct {
|
||||
*cool.Model
|
||||
PlayerID uint64 `gorm:"not null;index:idx_pet_by_player_id;comment:'所属玩家ID'" json:"player_id"`
|
||||
LastResetTime *gtime.Time `struc:"skip" json:"last_reset_time"` // 重置时间,比如电池和每日任务
|
||||
Data string `gorm:"type:jsonb;not null;comment:'全部数据'" json:"data"`
|
||||
}
|
||||
type PlayerEX struct {
|
||||
Player
|
||||
Data PlayerInfo `orm:"data" json:"data"`
|
||||
Data PlayerInfo `gorm:"type:jsonb;not null;comment:'全部数据'" json:"data"`
|
||||
}
|
||||
|
||||
type Pos struct {
|
||||
X uint32 `struc:"uint32" default:"0"`
|
||||
Y uint32 `struc:"uint32" default:"0"`
|
||||
@@ -227,11 +224,9 @@ func (*Player) GroupName() string {
|
||||
}
|
||||
|
||||
// NewPlayerInfo create a new PlayerInfo
|
||||
func NewPlayer() *PlayerEX {
|
||||
return &PlayerEX{
|
||||
Player: Player{
|
||||
Model: cool.NewModel(),
|
||||
},
|
||||
func NewPlayer() *Player {
|
||||
return &Player{
|
||||
Model: cool.NewModel(),
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
Reference in New Issue
Block a user