update game model & types

This commit is contained in:
Nathaniel Tampus
2023-03-25 19:17:49 +08:00
parent ee8f9a58fd
commit 10ed00ebc0
3 changed files with 48 additions and 7 deletions

6
types/index.d.ts vendored
View File

@@ -4,6 +4,7 @@ export interface Game {
white?: User;
black?: User;
winner?: "white" | "black" | "draw";
reason?: string;
host?: User;
code?: string;
unlisted?: boolean;
@@ -15,5 +16,8 @@ export interface User {
id?: number | string; // string for guest IDs
name?: string | null;
email?: string;
connected?: boolean; // mainly for players, not spectators
// mainly for players, not spectators
connected?: boolean;
disconnectedOn?: number;
}