feat: 支持每周任务重置和查询
All checks were successful
ci/woodpecker/push/my-first-workflow Pipeline was successful

This commit is contained in:
xinian
2026-03-05 14:56:28 +08:00
committed by cnb
parent 10e1126cd7
commit 2259093790
4 changed files with 61 additions and 19 deletions

View File

@@ -13,9 +13,10 @@ 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"`
LastResetTime *gtime.Time `struc:"skip" json:"last_reset_time"` // 重置时间,比如电池和每日任务
Data PlayerInfo `gorm:"type:jsonb;not null;comment:'全部数据'" json:"data"`
PlayerID uint64 `gorm:"not null;uniqueIndex;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:"last_week_reset_time"`
Data PlayerInfo `gorm:"type:jsonb;not null;comment:'全部数据'" json:"data"`
}
type Pos struct {