Enha: nullable roomID for player [WIP]

This commit is contained in:
Grail Finder
2025-07-03 11:00:33 +03:00
parent c82439d43a
commit 2a593739ae
4 changed files with 21 additions and 13 deletions

View File

@ -104,7 +104,7 @@ type Action struct {
type Player struct {
ID uint32 `json:"id" db:"id"`
RoomID string `json:"room_id" db:"room_id"`
RoomID *string `json:"room_id" db:"room_id"`
Username string `json:"username" db:"username"`
Team UserTeam `json:"team" db:"team"`
Role UserRole `json:"role" db:"role"`
@ -386,12 +386,12 @@ type WordCard struct {
// table: settings
type GameSettings struct {
ID uint32 `json:"id" db:"id"`
RoomID string `db:"room_id"`
Language string `json:"language" example:"en" form:"language" db:"language"`
RoomPass string `json:"room_pass" db:"room_pass"`
TurnSecondsLeft uint32 `db:"-"`
RoundTime uint32 `json:"round_time" db:"turn_time"`
ID uint32 `json:"id" db:"id"`
RoomID string `db:"room_id"`
Language string `json:"language" example:"en" form:"language" db:"language"`
RoomPass string `json:"room_pass" db:"room_pass"`
TurnSecondsLeft uint32 `db:"-"`
RoundTime uint32 `json:"round_time" db:"turn_time"`
CreatedAt time.Time `db:"created_at"`
}