Feat: player stats [WIP]

This commit is contained in:
Grail Finder
2025-07-07 13:05:07 +03:00
parent 2751b6b9dc
commit 75651d7f76
4 changed files with 77 additions and 7 deletions

View File

@ -138,6 +138,22 @@ type Journal struct {
CreatedAt time.Time `db:"created_at"`
}
type PlayerStats struct {
ID uint32 `db:"id"`
PlayerUsername string `db:"player_username"`
GamesPlayed int `db:"games_played"`
GamesWon int `db:"games_won"`
GamesLost int `db:"games_lost"`
OpenedOppositeWords int `db:"opened_opposite_words"`
OpenedWhiteWords int `db:"opened_white_words"`
OpenedBlackWords int `db:"opened_black_words"`
MimeWinrate float64 `db:"mime_winrate"`
GuesserWinrate float64 `db:"guesser_winrate"`
PlayedAsMime int `db:"played_as_mime"`
PlayedAsGuesser int `db:"played_as_guesser"`
}
type Room struct {
ID string `json:"id" db:"id"`
CreatedAt time.Time `json:"created_at" db:"created_at"`