fix: 修正PVP模型PlayerID类型并优化空值处理
All checks were successful
ci/woodpecker/push/my-first-workflow Pipeline was successful

This commit is contained in:
xinian
2026-03-17 10:11:10 +08:00
committed by cnb
parent 15ecbcc7de
commit ed8e3327b4
2 changed files with 7 additions and 1 deletions

View File

@@ -14,7 +14,7 @@ const TableNamePlayerPVP = "player_pvp"
// PVP 对应数据库表 player_pvp用于记录用户PVP赛季数据及场次统计
type PVP struct {
*cool.Model
PlayerID uint64 `gorm:"not null;index:idx_pvp_player_id;comment:'所属玩家ID'" json:"player_id"`
PlayerID uint32 `gorm:"not null;index:idx_pvp_player_id;comment:'所属玩家ID'" json:"player_id"`
//本赛季排名信息'通过下标来确认当前赛季
RankInfo []PVPRankInfo `gorm:"type:jsonb;not null;comment:'赛季核心数据'" json:"season_data"`
}