-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy pathbeatmap.types.ts
84 lines (77 loc) · 1.64 KB
/
beatmap.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
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
import { Json } from "./database.types";
export type BeatmapSet = {
id: number;
queueDate: Date | null;
rankDate: Date | null;
rankDateEarly: Date | null;
artist: string;
title: string;
mapper: string;
mapperId: number;
probability: number | null;
unresolved: boolean;
beatmaps: Beatmap[];
mode: number;
lastQualifiedDate?: Date | null; // only used when calculating queueDate
};
export type Beatmap = {
id: number;
ver: string;
spin: number;
sr: number;
len: number;
mode: number;
};
export type BeatmapSetAPI = {
id: number;
artist: string;
title: string;
creator: string;
user_id: number;
ranked_date: string;
beatmaps: BeatmapAPI[];
status: "qualified" | "ranked" | "pending";
};
export type BeatmapAPI = {
id: number;
version: string;
count_spinners: number;
difficulty_rating: number;
total_length: number;
mode_int: number;
};
export type BeatmapSetDatabase = {
id: number;
queue_date: number | null;
rank_date: number;
rank_date_early: number | null;
artist: string;
title: string;
mapper: string;
mapper_id: number;
probability: number | null;
unresolved: boolean;
beatmaps: Json;
};
export type MapEvent = {
id: number;
beatmapSetId: number;
type: "rank" | "qualify" | "disqualify" | "nominate" | "nomination_reset";
createdAt: Date;
};
export type MapEventAPI = {
id: number;
beatmapset: {
id: number;
};
type: "rank" | "qualify" | "disqualify" | "nominate" | "nomination_reset";
created_at: string;
comment: null | {
beatmap_ids: number[];
nominator_ids: number[];
};
user_id: number;
discussion: {
beatmapset_id: number;
};
};