This commit is contained in:
xinian
2026-04-27 00:51:28 +08:00
parent 6781178f6c
commit f97275cb54
12 changed files with 250 additions and 34 deletions

View File

@@ -13,7 +13,7 @@ const TableNamePlayerInfo = "player_info"
type Player struct {
*cool.Model
PlayerID uint64 `gorm:"not null;uniqueIndex;index:idx_pet_by_player_id;comment:'所属玩家ID'" json:"player_id"`
PlayerID uint64 `gorm:"not null;uniqueIndex:idx_player_info_player_id,where:deleted_at IS NULL;index:idx_pet_by_player_id;comment:'所属玩家ID'" json:"player_id"`
LastResetTime *gtime.Time `struc:"skip" json:"last_reset_time"` // 重置时间,比如电池和每日任务
WeekLastResetTime *gtime.Time `struc:"skip" json:"week_last_reset_time"`
Data PlayerInfo `gorm:"type:jsonb;not null;comment:'全部数据'" json:"data"`