mirror of
https://github.com/Sendouc/sendou.ink.git
synced 2026-05-23 11:57:50 -05:00
* Initial * Swiss UI initial * Start Swiss bracket * Match up generation skeleton * Bracket advancing * Misc * Progress * Remove unneeded script * Timed bans feature * Add badge * Add tournament logo * Add Heavy Splatling MoveSpeed_Charge Closes #1461 * Require verified email for new account registration * Weapon stats/builds use absolute URL * Allow mod to ban users * Prevent app from crashing on unhandled rejection Context: https://github.com/remix-run/remix/issues/9178#issuecomment-2032102431 * Try changing authenticate call to match docs example * Limit fresh account queue joining * Fix tournament avatar not showing * Limit when weapon shown on leaderboard * Nuke reported weapons script * FC scripts * Increase tournament rules max length * Add Discord URL to tournament page * Hotfix reopen * Fix matchAffectsAnotherBracket logic better * Switch to Patreon API v2 Closes #1389 Also fixes problem with people who canceled not getting access. * Fix reset showing for first round * Dropping out * Progress * Range inputs * better way to create rounds * Fix TODO * E2E test * Small round count info text * Fix lint
106 lines
2.2 KiB
TypeScript
106 lines
2.2 KiB
TypeScript
/*-----------------------------------------------------------------|
|
|
* Contains the types which are persisted in the chosen storage.
|
|
*----------------------------------------------------------------*/
|
|
|
|
import type { TournamentRoundMaps } from "~/db/tables";
|
|
import type { StageSettings } from "./input";
|
|
import type { MatchResults } from "./other";
|
|
import type { StageType } from "./unions";
|
|
|
|
/**
|
|
* A participant of a stage (team or individual).
|
|
*/
|
|
export interface Participant {
|
|
/** ID of the participant. */
|
|
id: number;
|
|
|
|
/** ID of the tournament this participant belongs to. */
|
|
tournament_id: number;
|
|
|
|
/** Name of the participant. */
|
|
name: string;
|
|
}
|
|
|
|
/**
|
|
* A stage, which can be a round-robin stage or a single/double elimination stage.
|
|
*/
|
|
export interface Stage {
|
|
/** ID of the stage. */
|
|
id: number;
|
|
|
|
/** ID of the tournament this stage belongs to. */
|
|
tournament_id: number;
|
|
|
|
/** Name of the stage. */
|
|
name: string;
|
|
|
|
/** Type of the stage. */
|
|
type: StageType;
|
|
|
|
/** Settings of the stage. */
|
|
settings: StageSettings;
|
|
|
|
/** The number of the stage in its tournament. */
|
|
number: number;
|
|
}
|
|
|
|
/**
|
|
* A group of a stage.
|
|
*/
|
|
export interface Group {
|
|
/** ID of the group. */
|
|
id: number;
|
|
|
|
/** ID of the parent stage. */
|
|
stage_id: number;
|
|
|
|
/** The number of the group in its stage. */
|
|
number: number;
|
|
}
|
|
|
|
// The next levels don't have a `name` property. They are automatically named with their `number` and their context (parent levels).
|
|
|
|
/**
|
|
* A round of a group.
|
|
*/
|
|
export interface Round {
|
|
/** ID of the round. */
|
|
id: number;
|
|
|
|
/** ID of the parent stage. */
|
|
stage_id: number;
|
|
|
|
/** ID of the parent group. */
|
|
group_id: number;
|
|
|
|
/** The number of the round in its group. */
|
|
number: number;
|
|
|
|
/** Info about the maps count */
|
|
maps?: Pick<TournamentRoundMaps, "count" | "type" | "pickBan"> | null;
|
|
}
|
|
|
|
/**
|
|
* A match of a round.
|
|
*/
|
|
export interface Match extends MatchResults {
|
|
/** ID of the match. */
|
|
id: number;
|
|
|
|
/** ID of the parent stage. */
|
|
stage_id: number;
|
|
|
|
/** ID of the parent group. */
|
|
group_id: number;
|
|
|
|
/** ID of the parent round. */
|
|
round_id: number;
|
|
|
|
/** The number of the match in its round. */
|
|
number: number;
|
|
|
|
lastGameFinishedAt?: number | null;
|
|
|
|
createdAt?: number | null;
|
|
}
|