onsite-toolkit: add resolver (#706)

Co-authored-by: panda <panda_dtdyy@outlook.com>
This commit is contained in:
undefinedandpanda committed 2024-11-13 11:32:00 +08:00
1 parent c90436f489
commit c7b67e3a9a
7 files changed
+510 -6

No files matched your search

+33
View File
@@ -0,0 +1,33 @@
type Verdict = 'RJ' | 'AC' | 'NA';
export interface ProblemInfo {
color?: string; // hex color
id: string;
name: string; // A, B, C, ...
}
export interface TeamInfo {
id: string;
name: string;
avatar?: string;
institution?: string;
exclude?: boolean; // false by default
}
export interface InstitiutionInfo {
id: string;
name: string;
avatar?: string;
}
export interface SubmissionInfo {
team: string;
problem: string;
verdict: Verdict;
time: number; // in seconds
}
export interface ResolverInput {
name: string;
duration: number; // in seconds
frozen: number; // in seconds
problems: ProblemInfo[];
submissions: SubmissionInfo[];
teams: TeamInfo[];
institutions: Record<string, InstitiutionInfo>;
}