-
Notifications
You must be signed in to change notification settings - Fork 1
/
types.ts
53 lines (51 loc) · 1.15 KB
/
types.ts
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
// Tournament > Matches
// Match > Select Teams
// Create Team
// Create Player - name,
// Team has players
// Match - date, title, desc, venue, status
// - Teams - players, title, logo
// - Events - type, player1, player2, timestamp
export interface Player {
key?: string;
name: string;
photoUrl?: string;
}
export interface Team {
key?: string;
name: string;
logo?: string;
}
export interface Tournament {
key?: string;
title: string;
logo: string;
}
export interface Goal {
player: Player, assist: Player, timeStamp: number, matchTimeStamp: number, team: string
}
export interface Match {
key?: string;
title: string;
tournament: Tournament | null;
desc: string;
venue: string;
time: number;
status: 'SCHEDULED' | 'STARTED' | 'CANCELED' | 'POSTPONED' | 'PAUSED' | 'ENDED';
events: string[];
teams: Team[];
goals: Goal[]
}
export interface Event {
type: string;
comment: string;
timeStamp: string;
matchTimeStamp: string;
player1?: string;
player2?: string;
team1?: string;
team2?: string;
}
export type Partial<T> = {
[P in keyof T]?: T[P];
};