Feat: add player interface

This commit is contained in:
Grail Finder
2025-07-01 13:38:20 +03:00
parent 83d3a19d05
commit 70f83f1002
3 changed files with 70 additions and 7 deletions

View File

@ -50,12 +50,24 @@ type Team struct {
}
type Action struct {
Actor string
ActorColor string
Action string // clue | guess
Word string
WordColor string
Number string // for clue
ID int `json:"id" db:"id"`
RoomID string `json:"room_id" db:"room_id"`
Actor string `json:"actor" db:"actor"`
ActorColor string `json:"actor_color" db:"actor_color"`
Action string `json:"action_type" db:"action_type"`
Word string `json:"word" db:"word"`
WordColor string `json:"word_color" db:"word_color"`
Number string `json:"number_associated" db:"number_associated"`
CreatedAt time.Time `json:"created_at" db:"created_at"`
}
type Player struct {
ID int `json:"id" db:"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"`
IsBot bool `json:"is_bot" db:"is_bot"`
}
type BotPlayer struct {