Database tables
Generated from the DB interface of app/db/tables.ts. See Database schemas for how columns are typed. The relations are the foreign keys of the schema the migrations build.
AllTeam
Table backing the Team view. Includes soft-deleted teams.
Rows typed by Team
| Column | Type | Description |
|---|---|---|
avatarImgId | number | null → UnvalidatedUserSubmittedImage | |
bannerImgId | number | null → UnvalidatedUserSubmittedImage | |
bio | string | null | |
createdAt | Generated<number> | |
customUrl | string | |
customTheme | JSONColumnTypeNullable<CustomTheme> | |
deletedAt | number | null | Soft delete marker. Always |
id | GeneratedAlways<number> | |
inviteCode | string | |
name | string | |
bsky | string | null | |
mapModePreferences | JSONColumnTypeNullable<UserMapModePreferences> | |
tag | string | null | Shown in-game in front of members' names |
Used by 23 repository functions · 58 routes
SQGroupRepository findMapModePreferencesByGroupIdfindCurrentGroups
SQMatchRepository findByIdcancelMatchrequestCancelMatchacceptCancelMatchrefuseCancelMatchreportMapWinnerresolveUnfinishedMatchundoMatchReportundoMapReport
TeamRepository findByIdinsertupdateupdateCustomThemeupdateMapModePreferencesdeleteByIdresetInviteCode
TournamentRepository findByIdfindTeamsFullByTournamentIdfindAllForShowcase
TournamentOrganizationRepository findEventsByMonthfindPaginatedEventsBySeries
//api/layout/api/status/calendar/:id/calendar/new/events/friends/org/:slug/q/q/looking/q/match/:id/q/preparing/q/ready/refresh-caches/seed/sendouq/active-match/:userId/sendouq/match/:matchId/settings/t/:customUrl/t/:customUrl/edit/t/:customUrl/roster/t/new/to/:id/to/:id/to/:id/admin/to/:id/admin/to/:id/admin/audit/to/:id/admin/brackets/to/:id/admin/import-teams/to/:id/admin/registration/:tid?/to/:id/admin/seeds/to/:id/admin/staff/to/:id/admin/stream/to/:id/brackets/to/:id/brackets/finalize/to/:id/info/to/:id/join/to/:id/looking/to/:id/matches/to/:id/matches/:mid/to/:id/register/to/:id/results/to/:id/rules/to/:id/streams/to/:id/teams/to/:id/teams/:tid/to/:id/teams/:tid/comps/tournament-match/:id/tournament/:id/brackets/:bidx/tournament/:id/brackets/:bidx/standings/tournament/:id/seeds/tournament/:id/starting-brackets/tournament/:id/teams/tournament/:id/teams/:teamId/add-member/tournament/:id/teams/:teamId/remove-member/tournament/:id/teams/:teamId/update-member-ign/tournament/:id/teams/upsert/user/:userId/active-match
Relations (9)
erDiagram
direction LR
UnvalidatedUserSubmittedImage |o--o{ AllTeam : "avatarImgId"
UnvalidatedUserSubmittedImage |o--o{ AllTeam : "bannerImgId"
AllTeam ||--o{ AllTeamMember : "teamId"
AllTeam |o--o{ Group : "teamId"
AllTeam |o--o{ LFGPost : "teamId"
AllTeam |o--o{ ScrimPost : "teamId"
AllTeam |o--o{ ScrimPostRequest : "teamId"
AllTeam ||--o{ TeamEvent : "teamId"
AllTeam |o--o{ TournamentTeam : "teamId"Referenced by AllTeamMember.teamId, Group.teamId, LFGPost.teamId, ScrimPost.teamId, ScrimPostRequest.teamId, TeamEvent.teamId, TournamentTeam.teamId
AllTeamMember
Table backing the TeamMember & TeamMemberWithSecondary views. Includes members who have left and members of deleted teams.
Rows typed by TeamMember
| Column | Type | Description |
|---|---|---|
createdAt | Generated<number> | |
isOwner | Generated<DBBoolean> | |
isManager | Generated<DBBoolean> | |
leftAt | number | null | Always |
role | MemberRole | null | |
customRole | string | null | |
roleType | MemberRoleType | null | If customRole is defined, this classifies how the role should be treated |
order | Generated<number> | User-defined ordering of members within a team (ascending) |
teamId | number → AllTeam | |
userId | number → User | |
isMainTeam | Generated<DBBoolean> |
Used by 13 repository functions · 11 routes
SQGroupRepository insertFromPrevioussyncTeamIdmorphGroupsinsertMemberleaveGroup
TeamRepository findResultsByIdinsertswitchOwnMainTeamdeleteByIdinsertOwnMembershiphandleMemberLeavingupdateRoster
/admin/q/q/looking/q/match/:id/q/preparing/q/ready/t/:customUrl/t/:customUrl/join/t/:customUrl/results/t/:customUrl/roster/t/new
Relations (2)
erDiagram
direction LR
AllTeam ||--o{ AllTeamMember : "teamId"
User ||--o{ AllTeamMember : "userId"ApiToken
Rows typed by ApiToken
| Column | Type | Description |
|---|---|---|
id | GeneratedAlways<number> | |
userId | number → User | |
token | string | |
type | Generated<ApiTokenType> | |
createdAt | Generated<number> |
Used by 4 repository functions · 5 routes
ApiRepository findTokenByUserIdgenerateTokenfindAllApiTokens
Relations (1)
erDiagram
direction LR
User ||--o{ ApiToken : "userId"Art
Rows typed by Art
| Column | Type | Description |
|---|---|---|
authorId | number → User | |
createdAt | Generated<number> | |
description | string | null | |
id | GeneratedAlways<number> | |
imgId | number → UnvalidatedUserSubmittedImage | |
isShowcase | Generated<DBBoolean> |
Used by 14 repository functions · 101 routes
ArtRepository findShowcaseArtsfindShowcaseArtsByTagfindRecentlyUploadedArtsfindByIdfindArtsByUserIddeleteByIdinsertupdate
ImageRepository deleteByIdcountUnvalidatedArtcountAllUnvalidatedfindAllUnvalidatedcountUnvalidatedBySubmitterUserId
UserRepository findLayoutDataById
/admin/admin/streams/admin/voice/api/api/chat/rooms/:id/mentions/seen/api/chat/rooms/:id/messages/api/chat/rooms/:id/read/api/voice/rooms/:id/api/voice/telemetry/api/voice/webhook/art/art/new/associations/associations/new/auth/auth/create-link/auth/impersonate/auth/impersonate/stop/auth/logout/auth/refresh/badges/:id/edit/calendar/calendar/:id/calendar/:id/report-winners/calendar/new/end-season/events/friends/ingest/leaderboards/lfg/lfg/new/notifications/seen/notifications/subscribe/org/:slug/org/:slug/edit/org/new/patrons/player/:id/plus/suggestions/plus/suggestions/comment/:tier/:userId/plus/suggestions/new/plus/voting/q/q/looking/q/match/:id/q/preparing/q/ready/refresh-caches/run-routine/scrims/scrims/:id/scrims/new/seed/set-plus-voting-active/settings/sidenav/sse/:connectionId/topics/t/:customUrl/t/:customUrl/edit/t/:customUrl/join/t/:customUrl/roster/t/:customUrl/schedule/t/new/theme/to/:id/admin/to/:id/admin/to/:id/admin/brackets/to/:id/admin/registration/:tid?/to/:id/admin/seeds/to/:id/admin/staff/to/:id/admin/stream/to/:id/brackets/to/:id/brackets/finalize/to/:id/info/to/:id/join/to/:id/looking/to/:id/matches/:mid/to/:id/register/tournament/:id/seeds/tournament/:id/starting-brackets/tournament/:id/teams/:teamId/add-member/tournament/:id/teams/:teamId/remove-member/tournament/:id/teams/:teamId/update-member-ign/tournament/:id/teams/upsert/trophies/new/u/:identifier/u/:identifier/u/:identifier/admin/u/:identifier/art/u/:identifier/builds/u/:identifier/builds/new/u/:identifier/edit/u/:identifier/edit-widgets/u/:identifier/results/highlights/upload/admin/user-card/:id/note/user-card/edit/user-report/:id/vods/:id/vods/new
Relations (4)
erDiagram
direction LR
User ||--o{ Art : "authorId"
UnvalidatedUserSubmittedImage ||--o{ Art : "imgId"
Art ||--o{ ArtUserMetadata : "artId"
Art ||--o{ TaggedArt : "artId"Referenced by ArtUserMetadata.artId, TaggedArt.artId
ArtTag
Rows typed by ArtTag
| Column | Type | Description |
|---|---|---|
authorId | number → User | |
createdAt | Generated<number> | |
id | GeneratedAlways<number> | |
name | string |
Used by 5 repository functions · 4 routes
ArtRepository findAllTagsdeleteOrphanTagsfindArtsByUserIdinsertupdate
Relations (2)
erDiagram
direction LR
User ||--o{ ArtTag : "authorId"
ArtTag ||--o{ TaggedArt : "tagId"Referenced by TaggedArt.tagId
ArtUserMetadata
Rows typed by ArtUserMetadata
| Column | Type | Description |
|---|---|---|
artId | number → Art | |
userId | number → User |
Used by 9 repository functions · 6 routes
ArtRepository unlinkOwnFromArtfindShowcaseArtsfindShowcaseArtsByTagfindRecentlyUploadedArtsfindByIdfindArtsByUserIdinsertupdate
UserRepository findLayoutDataById
/art/art/new/u/:identifier/u/:identifier/u/:identifier/admin/u/:identifier/art
Relations (2)
erDiagram
direction LR
Art ||--o{ ArtUserMetadata : "artId"
User ||--o{ ArtUserMetadata : "userId"Association
Rows typed by Association
| Column | Type | Description |
|---|---|---|
id | GeneratedAlways<number> | |
name | string | |
inviteCode | string | |
createdAt | Generated<number> |
Used by 7 repository functions · 4 routes
AssociationRepository findByIdfindByMemberUserIdfindByInviteCodefindInviteCodeByIdinsertrefreshInviteCodedeleteById
Relations (1)
erDiagram
direction LR
Association ||--o{ AssociationMember : "associationId"Referenced by AssociationMember.associationId
AssociationMember
Rows typed by AssociationMember
| Column | Type | Description |
|---|---|---|
userId | number → User | |
associationId | number → Association | |
role | "MEMBER" | "MANAGER" | "ADMIN" | MANAGER can also share the invite link, ADMIN (one per association) can also manage the members |
Used by 8 repository functions · 4 routes
AssociationRepository findByIdfindByMemberUserIdfindByInviteCodeinsertinsertMemberupdateMemberRoledeleteMemberhandleMemberLeaving
Relations (2)
erDiagram
direction LR
Association ||--o{ AssociationMember : "associationId"
User ||--o{ AssociationMember : "userId"AvailabilityDayNote
Rows typed by AvailabilityDayNote
| Column | Type | Description |
|---|---|---|
availabilityWeekId | number → AvailabilityWeek | |
date | string | YYYY-MM-DD, in the week's |
text | string |
Used by 2 repository functions · 7 routes
AvailabilityRepository findAllWeeksByUserIdsupsertOwnWeek
/events/friends/scrims/scrims/new/t/:customUrl/schedule/to/:id/matches/:mid/to/:id/register
Relations (1)
erDiagram
direction LR
AvailabilityWeek ||--o{ AvailabilityDayNote : "availabilityWeekId"AvailabilitySlot
A range the user is available for. Absolute, so a range crossing midnight is one row like any other.
Rows typed by AvailabilitySlot
| Column | Type | Description |
|---|---|---|
id | GeneratedAlways<number> | |
availabilityWeekId | number → AvailabilityWeek | |
startsAt | number | |
endsAt | number |
Used by 2 repository functions · 7 routes
AvailabilityRepository findAllWeeksByUserIdsupsertOwnWeek
/events/friends/scrims/scrims/new/t/:customUrl/schedule/to/:id/matches/:mid/to/:id/register
Relations (1)
erDiagram
direction LR
AvailabilityWeek ||--o{ AvailabilitySlot : "availabilityWeekId"AvailabilityWeek
One week of availability a user reported. The row existing means the week was submitted, which is what tells "unavailable all week" (submitted, no slots) apart from "unknown" (no row).
Rows typed by AvailabilityWeek
| Column | Type | Description |
|---|---|---|
id | GeneratedAlways<number> | |
userId | number → User | |
weekStartsAt | number | Monday 00:00 of the week, in |
timezone | string | IANA timezone the week was reported in, which the day notes' dates are relative to |
createdAt | Generated<number> | |
updatedAt | Generated<number> |
Used by 5 repository functions · 8 routes
AvailabilityRepository findAllWeeksByUserIdshasReportedWeekfindWeekReminderUserIdsupsertOwnWeekdeleteWeeksStartedBefore
/api/layout/events/friends/scrims/scrims/new/t/:customUrl/schedule/to/:id/matches/:mid/to/:id/register
Relations (3)
erDiagram
direction LR
User ||--o{ AvailabilityWeek : "userId"
AvailabilityWeek ||--o{ AvailabilityDayNote : "availabilityWeekId"
AvailabilityWeek ||--o{ AvailabilitySlot : "availabilityWeekId"Referenced by AvailabilityDayNote.availabilityWeekId, AvailabilitySlot.availabilityWeekId
Badge
Rows typed by Badge
| Column | Type | Description |
|---|---|---|
id | GeneratedAlways<number> | |
code | string | |
displayName | string | |
hue | number | null | |
authorId | number | null → User | Who made the badge? If null, a legacy badge. |
Used by 13 repository functions · 31 routes
BadgeRepository insertfindAllfindByIdfindByManagersListfindManagedByUserIdfindByOwnerUserIdfindByAuthorUserIdsyncXPBadges
CalendarRepository findAllBetweenTwoTimestampsfindById
TournamentRepository findAllForShowcase
TournamentOrganizationRepository findBySlug
//admin/api/layout/badges/badges/:id/badges/:id/edit/calendar/calendar.ics/calendar/:id/calendar/:id/report-winners/calendar/new/events/org/:slug/org/:slug/edit/org/:slug/stats/org/new/player/:id/to/:id/admin/to/:id/admin/to/:id/admin/registration/:tid?/to/:id/brackets/to/:id/brackets/finalize/to/:id/join/to/:id/looking/to/:id/register/tournament/:id/teams/:teamId/add-member/tournament/:id/teams/:teamId/remove-member/tournament/:id/teams/upsert/u/:identifier/u/:identifier/edit-widgets/user/:identifier
Relations (5)
erDiagram
direction LR
User |o--o{ Badge : "authorId"
Badge ||--o{ BadgeManager : "badgeId"
Badge ||--o{ CalendarEventBadge : "badgeId"
Badge ||--o{ TournamentBadgeOwner : "badgeId"
Badge ||--o{ TournamentOrganizationBadge : "badgeId"Referenced by BadgeManager.badgeId, CalendarEventBadge.badgeId, TournamentBadgeOwner.badgeId, TournamentOrganizationBadge.badgeId
BadgeManager
Rows typed by BadgeManager
| Column | Type | Description |
|---|---|---|
badgeId | number → Badge | |
userId | number → User |
Used by 6 repository functions · 8 routes
BadgeRepository findAllfindByIdfindByManagersListfindManagedByUserIdreplaceManagers
/admin/badges/badges/:id/badges/:id/edit/calendar/new/org/:slug/edit/to/:id/brackets/finalize/u/:identifier
Relations (2)
erDiagram
direction LR
Badge ||--o{ BadgeManager : "badgeId"
User ||--o{ BadgeManager : "userId"BadgeOwner
VIEW, read-only. TournamentBadgeOwner rows plus a synthetic patron badge row per patron of tier 2+.
View of TournamentBadgeOwner, User
Rows typed by BadgeOwner
| Column | Type | Description |
|---|---|---|
badgeId | number | |
userId | number | |
count | number |
Used by 2 repository functions · 6 routes
BadgeRepository findByIdfindByOwnerUserId
/badges/:id/badges/:id/edit/to/:id/brackets/finalize/u/:identifier/u/:identifier/edit-widgets/user/:identifier
BanLog
Rows typed by BanLog
| Column | Type | Description |
|---|---|---|
id | GeneratedAlways<number> | |
userId | number → User | |
banned | number | null | |
bannedReason | string | null | |
bannedByUserId | number → User | |
createdAt | Generated<number> |
Used by 4 repository functions · 3 routes
AdminRepository migratebanUserunbanUser
Relations (2)
erDiagram
direction LR
User ||--o{ BanLog : "bannedByUserId"
User ||--o{ BanLog : "userId"Build
Abilities are stored as JSON in abilities, BuildAbilitySum & BuildWeaponAbility denormalize them for computing ability point averages.
Rows typed by Build
| Column | Type | Description |
|---|---|---|
clothesGearSplId | number | null | |
description | string | null | |
headGearSplId | number | null | |
id | GeneratedAlways<number> | |
isPrivate | Generated<DBBoolean> | |
modes | JSONColumnTypeNullable<ModeShort[]> | |
ownerId | number → User | |
shoesGearSplId | number | null | |
title | string | |
updatedAt | Generated<number> | |
abilities | JSONColumnTypeNullable<BuildAbilitiesTuple> | 3x4 ability tuple (head/clothes/shoes × main + 3 subs). |
abilitiesSignature | string | null | Serialized ability+AP combo (e.g. |
Used by 13 repository functions · 9 routes
BuildRepository findAllByUserIdinsertupdatedeleteByIdfindOwnerIdByIdfindAllAbilityPointSumsfindNewestBuildPerOwnerByWeaponIdfindPageByWeaponIdfindPageByUserIdcountsByUserIdrecalculateAllSortValues
UserRepository findLayoutDataById
/admin/builds/:slug/builds/:slug/popular/builds/:slug/stats/u/:identifier/u/:identifier/u/:identifier/admin/u/:identifier/builds/u/:identifier/builds/new
Relations (4)
erDiagram
direction LR
User ||--o{ Build : "ownerId"
Build ||--o{ BuildAbilitySum : "buildId"
Build ||--o{ BuildWeapon : "buildId"
Build ||--o{ BuildWeaponAbility : "buildId"Referenced by BuildAbilitySum.buildId, BuildWeapon.buildId, BuildWeaponAbility.buildId
BuildAbilitySum
Per-build ability point sums across all gear slots. Used to compute global findAllAbilityPointAverages.
Rows typed by BuildAbilitySum
| Column | Type | Description |
|---|---|---|
buildId | number → Build | |
ability | Ability | |
abilityPoints | number |
Used by 3 repository functions · 2 routes
Relations (1)
erDiagram
direction LR
Build ||--o{ BuildAbilitySum : "buildId"BuildWeapon
Rows typed by BuildWeapon
| Column | Type | Description |
|---|---|---|
buildId | number → Build | |
weaponSplId | MainWeaponId | |
canonicalWeaponSplId | MainWeaponId | Alt skins collapse to their base weapon (e.g. Hero Shot Replica |
updatedAt | Generated<number> | Mirror of |
sortValue | number | null | Per-weapon sort priority: |
ownerId | number | Mirror of |
Used by 10 repository functions · 8 routes
BuildRepository findAllByUserIdinsertupdatefindAbilityPointCountsByWeaponIdsfindNewestBuildPerOwnerByWeaponIdfindPageByWeaponIdfindPageByUserIdcountsByUserIdcountAllPublicByWeaponIdrecalculateAllSortValues
/admin/builds/builds/:slug/builds/:slug/popular/builds/:slug/stats/u/:identifier/u/:identifier/builds/u/:identifier/builds/new
Relations (1)
erDiagram
direction LR
Build ||--o{ BuildWeapon : "buildId"BuildWeaponAbility
Per-weapon, per-build ability point sums. Used to compute per-weapon findAllAbilityPointAverages. One row per canonical weapon × build × ability with non-zero AP.
Rows typed by BuildWeaponAbility
| Column | Type | Description |
|---|---|---|
canonicalWeaponSplId | MainWeaponId | |
buildId | number → Build | |
ability | Ability | |
abilityPoints | number |
Used by 4 repository functions · 3 routes
BuildRepository insertupdatefindAbilityPointCountsByWeaponIdsfindPageByWeaponId
Relations (1)
erDiagram
direction LR
Build ||--o{ BuildWeaponAbility : "buildId"CalendarEvent
Rows typed by CalendarEvent
| Column | Type | Description |
|---|---|---|
authorId | number → User | |
bracketUrl | string | |
description | string | null | |
discordInviteCode | string | null | |
id | GeneratedAlways<number> | |
discordUrl | GeneratedAlways<string | null> | |
name | string | |
participantCount | number | null | |
tags | JSONColumnTypeNullable<CalendarEventTag[]> | |
hidden | Generated<DBBoolean> | |
tournamentId | number | null → Tournament | |
organizationId | number | null → TournamentOrganization | |
avatarImgId | number | null → UnvalidatedUserSubmittedImage | |
trophyId | number | null → Trophy |
Used by 71 repository functions · 136 routes
CalendarRepository findAllBetweenTwoTimestampsfindByIdfindAvatarImgIdsfindRecentTournamentsByOrganizerUserIdinsertupdateupsertReportedScoresdeleteById
FriendRepository findByUserIdWithActivity
ImageRepository findByIdcountAllUnvalidatedfindAllUnvalidatedcountUnvalidatedBySubmitterUserId
SkillRepository findSeasonProgressionByUserIdfindSeasonActiveDaysByUserId
ScannerIngestRepository staffTournamentIdsAt
ScrimMapListRepository findMapListsByScrimPostId
ScrimPostRepository findByIdfindAllRelevantfindAcceptedScrimsBetweenTwoTimestampsfindPendingOverlapsForUsersfindUserScrims
PlayerStatRepository findSeasonBestSetsByUserIdfindSeasonTournamentRunsByUserId
SQMatchRepository findSeasonResultsByUserIdfindSeasonDaySummariesByUserId
TeamRepository findResultsById
SavedCalendarEventRepository saveOwnunsaveByUserIdisSavedfindAllUpcomingByUserIddeleteByTournamentId
TournamentRepository findByIdfindDescriptionByIdfindLatestFinalizedLeagueParticipantsfindTOSetMapPoolByIdfindRelatedUsersByTournamentIdsfindAllForShowcasefindAllBetweenTwoTimestampsfindPendingCheckInsStartingBetweenfindOrganizerPermissionsByTournamentIdssearchByNamefindRunningTournamentIds
TournamentTeamRepository findAllByChatRoomIdsupdateOwnMemberInGameNameForNonStartedinsertupsertRegistrationjoinfindAllRegistrationsByUserIds
TournamentMatchVodRepository findTournamentsNeedingVodSyncdeleteObsolete
TournamentMatchRepository findAllByChatRoomIdsfindScheduledByUserIdsfindScheduledByUserId
TournamentOrganizationRepository findEventsByMonthfindAllOrganizedTournamentTeamCountsfindAllUnfinalizedEventsfindPaginatedEventsBySeriesfindAllEventsBySeriesfindAllSeriesWinsByUserIdcountActiveParticipantsupdate
TrophyRepository allfindByOrganizationIdfindTournamentsByTrophyIdfindWinsByOwnerfindAllBackfillableTournamentsbackfill
UserRepository findWidgetsByUserIdfindResultsByUserIdcountResultsByUserId
//admin/admin/streams/admin/voice/api/api/chat/rooms/api/chat/rooms/:id/api/chat/rooms/:id/mentions/seen/api/chat/rooms/:id/messages/api/chat/rooms/:id/read/api/layout/api/status/api/voice/rooms/:id/api/voice/telemetry/api/voice/webhook/art/new/associations/associations/new/auth/auth/create-link/auth/impersonate/auth/impersonate/stop/auth/logout/auth/refresh/badges/:id/edit/calendar/calendar.ics/calendar/:id/calendar/:id/report-winners/calendar/:year/:week/calendar/new/end-season/events/friends/ingest/leaderboards/lfg/lfg/new/notifications/seen/notifications/subscribe/org/:slug/org/:slug/edit/org/:slug/stats/org/new/patrons/player/:id/plus/suggestions/plus/suggestions/comment/:tier/:userId/plus/suggestions/new/plus/voting/q/q/looking/q/match/:id/q/preparing/q/ready/refresh-caches/run-routine/scrims/scrims/:id/scrims/new/search/seed/set-plus-voting-active/settings/sidenav/sse/:connectionId/topics/t/:customUrl/t/:customUrl/edit/t/:customUrl/join/t/:customUrl/results/t/:customUrl/roster/t/:customUrl/schedule/t/new/theme/to/:id/to/:id/to/:id/admin/to/:id/admin/to/:id/admin/audit/to/:id/admin/brackets/to/:id/admin/import-teams/to/:id/admin/registration/:tid?/to/:id/admin/seeds/to/:id/admin/staff/to/:id/admin/stream/to/:id/brackets/to/:id/brackets/finalize/to/:id/info/to/:id/join/to/:id/looking/to/:id/matches/to/:id/matches/:mid/to/:id/register/to/:id/results/to/:id/rules/to/:id/streams/to/:id/teams/to/:id/teams/:tid/to/:id/teams/:tid/comps/to/search/tournament-match/:id/tournament/:id/tournament/:id/brackets/:bidx/tournament/:id/brackets/:bidx/standings/tournament/:id/seeds/tournament/:id/starting-brackets/tournament/:id/teams/tournament/:id/teams/:teamId/add-member/tournament/:id/teams/:teamId/remove-member/tournament/:id/teams/:teamId/update-member-ign/tournament/:id/teams/upsert/trophies/trophies/:id/trophies/:id/backfill/:seriesId/trophies/:id/tournaments/trophies/:id/wins/:userId/trophies/new/u/:identifier/u/:identifier/admin/u/:identifier/art/u/:identifier/builds/u/:identifier/builds/new/u/:identifier/edit/u/:identifier/edit-widgets/u/:identifier/results/u/:identifier/results/highlights/u/:identifier/seasons/u/:identifier/seasons/u/:identifier/seasons/stats/u/:identifier/seasons/summary-graphic/upload/admin/user-card/:id/note/user-card/edit/user-report/:id/vods/:id/vods/new
Relations (11)
erDiagram
direction LR
User ||--o{ CalendarEvent : "authorId"
UnvalidatedUserSubmittedImage |o--o{ CalendarEvent : "avatarImgId"
TournamentOrganization |o--o{ CalendarEvent : "organizationId"
Tournament |o--o{ CalendarEvent : "tournamentId"
Trophy |o--o{ CalendarEvent : "trophyId"
CalendarEvent ||--o{ CalendarEventBadge : "eventId"
CalendarEvent ||--o{ CalendarEventDate : "eventId"
CalendarEvent ||--o{ CalendarEventResultTeam : "eventId"
CalendarEvent |o--o{ MapPoolMap : "calendarEventId"
CalendarEvent ||--o{ SavedCalendarEvent : "calendarEventId"
CalendarEvent |o--o{ UnvalidatedVideo : "eventId"Referenced by CalendarEventBadge.eventId, CalendarEventDate.eventId, CalendarEventResultTeam.eventId, MapPoolMap.calendarEventId, SavedCalendarEvent.calendarEventId, UnvalidatedVideo.eventId
CalendarEventBadge
Rows typed by CalendarEventBadge
| Column | Type | Description |
|---|---|---|
badgeId | number → Badge | |
eventId | number → CalendarEvent |
Used by 5 repository functions · 19 routes
CalendarRepository findAllBetweenTwoTimestampsfindByIdinsertupdate
TournamentRepository findAllForShowcase
//api/layout/calendar/calendar.ics/calendar/:id/calendar/:id/report-winners/calendar/new/events/to/:id/admin/to/:id/admin/to/:id/admin/registration/:tid?/to/:id/brackets/to/:id/brackets/finalize/to/:id/join/to/:id/looking/to/:id/register/tournament/:id/teams/:teamId/add-member/tournament/:id/teams/:teamId/remove-member/tournament/:id/teams/upsert
Relations (2)
erDiagram
direction LR
Badge ||--o{ CalendarEventBadge : "badgeId"
CalendarEvent ||--o{ CalendarEventBadge : "eventId"CalendarEventDate
A regular calendar event can have many dates, a tournament only one.
Rows typed by CalendarEventDate
| Column | Type | Description |
|---|---|---|
eventId | number → CalendarEvent | |
id | GeneratedAlways<number> | |
startsAt | number |
Used by 41 repository functions · 72 routes
CalendarRepository findAllBetweenTwoTimestampsfindByIdfindRecentTournamentsByOrganizerUserIdinsertupdate
FriendRepository findByUserIdWithActivity
SkillRepository findSeasonProgressionByUserIdfindSeasonActiveDaysByUserId
SQMatchRepository findSeasonResultsByUserIdfindSeasonDaySummariesByUserId
TeamRepository findResultsById
TournamentRepository findByIdfindLatestFinalizedLeagueParticipantsfindRelatedUsersByTournamentIdsfindAllForShowcasefindAllBetweenTwoTimestampsfindPendingCheckInsStartingBetweensearchByNamefindRunningTournamentIds
TournamentTeamRepository updateOwnMemberInGameNameForNonStartedinsertupsertRegistrationjoinfindAllRegistrationsByUserIds
TournamentMatchVodRepository findTournamentsNeedingVodSyncdeleteObsolete
TournamentOrganizationRepository findEventsByMonthfindAllOrganizedTournamentTeamCountsfindPaginatedEventsBySeriesfindAllEventsBySeriesfindAllSeriesWinsByUserIdcountActiveParticipantsupdate
TrophyRepository allfindByOrganizationIdfindTournamentsByTrophyIdfindWinsByOwnerfindAllBackfillableTournaments
UserRepository findWidgetsByUserIdfindResultsByUserIdcountResultsByUserId
//api/layout/api/status/calendar/calendar.ics/calendar/:id/calendar/:id/report-winners/calendar/:year/:week/calendar/new/events/friends/org/:slug/org/:slug/edit/org/:slug/stats/refresh-caches/scrims/scrims/new/search/seed/t/:customUrl/results/t/:customUrl/schedule/to/:id/to/:id/to/:id/admin/to/:id/admin/to/:id/admin/audit/to/:id/admin/brackets/to/:id/admin/import-teams/to/:id/admin/registration/:tid?/to/:id/admin/seeds/to/:id/admin/staff/to/:id/admin/stream/to/:id/brackets/to/:id/brackets/finalize/to/:id/info/to/:id/join/to/:id/looking/to/:id/matches/to/:id/matches/:mid/to/:id/register/to/:id/results/to/:id/rules/to/:id/streams/to/:id/teams/to/:id/teams/:tid/to/:id/teams/:tid/comps/to/search/tournament-match/:id/tournament/:id/tournament/:id/brackets/:bidx/tournament/:id/brackets/:bidx/standings/tournament/:id/seeds/tournament/:id/starting-brackets/tournament/:id/teams/tournament/:id/teams/:teamId/add-member/tournament/:id/teams/:teamId/remove-member/tournament/:id/teams/:teamId/update-member-ign/tournament/:id/teams/upsert/trophies/trophies/:id/trophies/:id/backfill/:seriesId/trophies/:id/tournaments/trophies/:id/wins/:userId/trophies/new/u/:identifier/u/:identifier/edit/u/:identifier/results/u/:identifier/results/highlights/u/:identifier/seasons/u/:identifier/seasons/u/:identifier/seasons/stats/u/:identifier/seasons/summary-graphic
Relations (1)
erDiagram
direction LR
CalendarEvent ||--o{ CalendarEventDate : "eventId"CalendarEventResultPlayer
Rows typed by CalendarEventResultPlayer
| Column | Type | Description |
|---|---|---|
name | string | null | |
teamId | number → CalendarEventResultTeam | |
userId | number | null → User |
Used by 11 repository functions · 9 routes
CalendarRepository findResultsByEventIdfindTopThreeResultsByEventIdsupsertReportedScores
TournamentOrganizationRepository findEventsByMonthfindPaginatedEventsBySeriesfindAllSeriesWinsByUserId
UserRepository findLayoutDataByIdfindWidgetsByUserIdfindResultsByUserIdcountResultsByUserIdfindResultPlacementsByUserId
/calendar/:id/calendar/:id/report-winners/org/:slug/to/:id/teams/:tid/comps/u/:identifier/u/:identifier/u/:identifier/admin/u/:identifier/results/u/:identifier/results/highlights
Relations (2)
erDiagram
direction LR
CalendarEventResultTeam ||--o{ CalendarEventResultPlayer : "teamId"
User |o--o{ CalendarEventResultPlayer : "userId"CalendarEventResultTeam
Results of events not hosted on sendou.ink.
Rows typed by CalendarEventResultTeam
| Column | Type | Description |
|---|---|---|
eventId | number → CalendarEvent | |
id | GeneratedAlways<number> | |
name | string | |
placement | number |
Used by 10 repository functions · 7 routes
CalendarRepository findResultsByEventIdfindTopThreeResultsByEventIdsupsertReportedScores
TournamentOrganizationRepository findEventsByMonthfindPaginatedEventsBySeriesfindAllSeriesWinsByUserId
UserRepository findWidgetsByUserIdfindResultsByUserIdcountResultsByUserIdfindResultPlacementsByUserId
/calendar/:id/calendar/:id/report-winners/org/:slug/to/:id/teams/:tid/comps/u/:identifier/u/:identifier/results/u/:identifier/results/highlights
Relations (3)
erDiagram
direction LR
CalendarEvent ||--o{ CalendarEventResultTeam : "eventId"
CalendarEventResultTeam ||--o{ CalendarEventResultPlayer : "teamId"
CalendarEventResultTeam ||--o{ UserResultHighlight : "teamId"Referenced by CalendarEventResultPlayer.teamId, UserResultHighlight.teamId
ChatMessage
Rows typed by ChatMessage
| Column | Type | Description |
|---|---|---|
authorUserId | number | null → User | The sender, or for a system message the actor it describes. |
contents | string | null |
|
createdAt | Generated<number> | |
id | GeneratedAlways<number> | |
publicId | string | Client-generated nanoid, unique so a retried send can't double-insert. |
roomId | number → ChatRoom | |
type | PersistedSystemMessageType | null |
|
Used by 5 repository functions · 7 routes
ChatRepository findAllMessagesByRoomIdfindMessageByIdfindMessageStatsByRoomIdsinsertMessageinsertSystemMessage
/api/chat/rooms/api/chat/rooms/:id/api/chat/rooms/:id/messages/q/looking/q/match/:id/scrims/:id/to/:id/matches/:mid
Relations (2)
erDiagram
direction LR
User |o--o{ ChatMessage : "authorUserId"
ChatRoom ||--o{ ChatMessage : "roomId"ChatMessageReadIndicator
Rows typed by ChatMessageReadIndicator
| Column | Type | Description |
|---|---|---|
lastSeenMessageId | number | Id of the newest message the user has seen in the room; upserts keep the MAX. |
roomId | number → ChatRoom | |
userId | number → User |
Used by 2 repository functions · 8 routes
ChatRepository findMessageStatsByRoomIdsupsertReadIndicator
/api/chat/rooms/api/chat/rooms/:id/api/chat/rooms/:id/messages/api/chat/rooms/:id/read/q/looking/q/match/:id/scrims/:id/to/:id/matches/:mid
Relations (2)
erDiagram
direction LR
ChatRoom ||--o{ ChatMessageReadIndicator : "roomId"
User ||--o{ ChatMessageReadIndicator : "userId"ChatRoom
Rows typed by ChatRoom
| Column | Type | Description |
|---|---|---|
closedAt | number | null | Set by a routine ~a month after |
createdAt | Generated<number> | |
expiresAt | number | |
id | GeneratedAlways<number> | |
inactive | Generated<DBBoolean> | The owner's activity has concluded, e.g. the set the room was for was finalized or canceled. Reverted if a tournament match is reopened. |
type | ChatRoomType |
Used by 11 repository functions · 19 routes
ChatRepository findAllRoomsByIdsfindAllOpenRoomIdsByUserIdinsertRoominsertRoomsupdateRoomExpiresAtupdateRoomsExpiresAtupdateRoomsInactivecloseExpiredRoomsdeleteOrphanedRooms
VoiceRepository findDailyAdoptionSincefindPlayerAdoptionSince
/admin/voice/api/chat/rooms/api/chat/rooms/:id/api/chat/rooms/:id/messages/api/chat/rooms/:id/read/api/voice/rooms/:id/api/voice/webhook/q/q/looking/q/match/:id/q/ready/scrims/scrims/:id/sse/:connectionId/topics/to/:id/admin/to/:id/admin/to/:id/brackets/to/:id/looking/to/:id/matches/:mid
Relations (8)
erDiagram
direction LR
ChatRoom ||--o{ ChatMessage : "roomId"
ChatRoom ||--o{ ChatMessageReadIndicator : "roomId"
ChatRoom |o--o| Group : "chatRoomId"
ChatRoom |o--o| GroupMatch : "chatRoomId"
ChatRoom |o--o| ScrimPost : "chatRoomId"
ChatRoom |o--o| TournamentMatch : "chatRoomId"
ChatRoom |o--o| TournamentTeam : "chatRoomId"
ChatRoom |o--o{ VoiceSession : "roomId"Referenced by ChatMessage.roomId, ChatMessageReadIndicator.roomId, Group.chatRoomId, GroupMatch.chatRoomId, ScrimPost.chatRoomId, TournamentMatch.chatRoomId, TournamentTeam.chatRoomId, VoiceSession.roomId
ExternalStream
Rows typed by ExternalStream
| Column | Type | Description |
|---|---|---|
id | GeneratedAlways<number> | |
name | string | |
url | string | |
avatarImgId | number | null → UnvalidatedUserSubmittedImage | |
startsAt | number | |
createdAt | Generated<number> |
Used by 5 repository functions · 2 routes
ExternalStreamRepository insertdeleteByIdfindAllfindAllForSidebardeleteOld
Relations (1)
erDiagram
direction LR
UnvalidatedUserSubmittedImage |o--o{ ExternalStream : "avatarImgId"FriendRequest
Pending friend request from one user to another.
Rows typed by FriendRequest
| Column | Type | Description |
|---|---|---|
id | GeneratedAlways<number> | |
senderId | number → User | |
receiverId | number → User | |
createdAt | Generated<number> |
Used by 11 repository functions · 3 routes
FriendRepository findPendingSentRequestsinsertFriendRequestdeleteFriendRequestdeleteOldPendingRequestsfindFriendRequestBetweenfindPendingReceivedRequestsfindPendingReceivedRequestIdsinsertFriendshipfindFriendRequestByIdAndReceiverdeleteFriendRequestByReceivercountPendingSentRequests
Relations (2)
erDiagram
direction LR
User ||--o{ FriendRequest : "receiverId"
User ||--o{ FriendRequest : "senderId"Friendship
Mutual friendship between two users. Invariant: userOneId < userTwoId.
Rows typed by Friendship
| Column | Type | Description |
|---|---|---|
id | GeneratedAlways<number> | |
userOneId | number → User | |
userTwoId | number → User | |
createdAt | Generated<number> | |
isPinnedByUserOne | Generated<DBBoolean> | userOne keeps this friend at the top of their friends list |
isPinnedByUserTwo | Generated<DBBoolean> | userTwo keeps this friend at the top of their friends list |
Used by 10 repository functions · 13 routes
AvailabilityRepository findScheduleVisibleUserIds
FriendRepository findByUserIdWithActivitydeleteOwnFriendshipByIdupdateOwnFriendshipPinnedinsertFriendshipfindMutualFriendsfindFriendsByUserIdfindFriendIdsfindFriendship
SQGroupRepository findFriendsAndTeammates
/api/layout/associations/friends/friends-for-adding/q/preparing/scrims/scrims/new/t/:customUrl/schedule/to/:id/matches/:mid/to/:id/register/u/:identifier/u/:identifier/user-card/:id/friendship
Relations (2)
erDiagram
direction LR
User ||--o{ Friendship : "userOneId"
User ||--o{ Friendship : "userTwoId"Group
SendouQ group. A new group is created every time even if the same players rejoin the queue after their match.
Rows typed by Group
| Column | Type | Description |
|---|---|---|
chatRoomId | number | null → ChatRoom | |
createdAt | Generated<number> | |
id | GeneratedAlways<number> | |
inviteCode | string | |
latestActionAt | Generated<number> | |
matchmade | Generated<DBBoolean> | If truthy, group was at least partly made in the matchmaking UI (/q/looking) |
status | "PREPARING" | "ACTIVE" | "INACTIVE" | "READY_CHECK" | |
teamId | number | null → AllTeam | |
tierName | TierName | null | Tier the group held as its match was created, snapshotted because tier thresholds are percentiles of the season's live distribution and so shift as the season goes on. |
tierIsPlus | Generated<DBBoolean> | Second half of {@link Group.tierName}, meaningless while that is |
Used by 37 repository functions · 29 routes
ChatRepository findAllOpenRoomIdsByUserId
SQGroupRepository findMapModePreferencesByGroupIdfindAllByChatRoomIdsfindCurrentGroupsfindActiveGroupMembersinsertinsertFromPrevioussyncTeamIdmorphGroupsinsertMemberfindCurrentReceivedLikerGroupIdssetOldGroupsAsInactivecloseExpiredContinueVotesinsertLikeinsertSuggestiondeleteLikeleaveGrouprefreshGroupupdateOwnMemberNoteinsertReadyCheckdeleteReadyChecksetPreparingGroupAsActivesetAsInactive
SQMatchRepository findByIdfindSeasonResultsByUserIdfindSeasonCanceledMatchesByUserIdinsertcancelMatchrequestCancelMatchacceptCancelMatchrefuseCancelMatchreportMapWinnerresolveUnfinishedMatchundoMatchReportundoMapReport
QStreamsRepository findAllActiveMatchPlayers
VoiceRepository findPlayerAdoptionSince
/admin/voice/api/chat/rooms/api/chat/rooms/:id/api/chat/rooms/:id/messages/api/chat/rooms/:id/read/api/layout/api/status/api/voice/rooms/:id/api/voice/webhook/friends/q/q/looking/q/match/:id/q/preparing/q/ready/q/streams/refresh-caches/scrims/:id/seed/sendouq/active-match/:userId/sendouq/match/:matchId/settings/sse/:connectionId/topics/to/:id/admin/to/:id/admin/to/:id/matches/:mid/u/:identifier/seasons/u/:identifier/seasons/user/:userId/active-match
Relations (14)
erDiagram
direction LR
ChatRoom |o--o| Group : "chatRoomId"
AllTeam |o--o{ Group : "teamId"
Group ||--o{ GroupLike : "likerGroupId"
Group ||--o{ GroupLike : "targetGroupId"
Group ||--o| GroupMatch : "alphaGroupId"
Group ||--o| GroupMatch : "bravoGroupId"
Group ||--o{ GroupMatchCancelReport : "groupId"
Group ||--o{ GroupMatchContinueVote : "groupId"
Group |o--o{ GroupMatchMap : "winnerGroupId"
Group ||--o{ GroupMember : "groupId"
Group ||--o| GroupReadyCheck : "alphaGroupId"
Group ||--o| GroupReadyCheck : "bravoGroupId"
Group ||--o{ GroupSuggestion : "suggesterGroupId"
Group ||--o{ GroupSuggestion : "targetGroupId"Referenced by GroupLike.likerGroupId, GroupLike.targetGroupId, GroupMatch.alphaGroupId, GroupMatch.bravoGroupId, GroupMatchCancelReport.groupId, GroupMatchContinueVote.groupId, GroupMatchMap.winnerGroupId, GroupMember.groupId, GroupReadyCheck.alphaGroupId, GroupReadyCheck.bravoGroupId, GroupSuggestion.suggesterGroupId, GroupSuggestion.targetGroupId
GroupLike
Rows typed by GroupLike
| Column | Type | Description |
|---|---|---|
createdAt | Generated<number> | |
likerGroupId | number → Group | |
targetGroupId | number → Group | |
isRechallenge | Generated<DBBoolean> | |
createdByUserId | number | null → User | Member of the liker group who sent the invite. |
Used by 12 repository functions · 13 routes
SQGroupRepository deleteLikesAndSuggestionsByGroupIdmorphGroupsinsertMemberfindCurrentReceivedLikerGroupIdsfindAllLikesByGroupIdrechallengesetOldGroupsAsInactiveinsertLikedeleteLikedeleteAllLikesByGroupIdleaveGroupinsertReadyCheck
/api/layout/api/status/friends/q/q/looking/q/match/:id/q/preparing/q/ready/refresh-caches/seed/sendouq/active-match/:userId/settings/user/:userId/active-match
Relations (3)
erDiagram
direction LR
User |o--o{ GroupLike : "createdByUserId"
Group ||--o{ GroupLike : "likerGroupId"
Group ||--o{ GroupLike : "targetGroupId"GroupMatch
Rows typed by GroupMatch
| Column | Type | Description |
|---|---|---|
alphaGroupId | number → Group | |
bravoGroupId | number → Group | |
chatRoomId | number | null → ChatRoom | |
confirmedAt | number | null | |
confirmedByUserId | number | null → User | |
createdAt | Generated<number> | |
id | GeneratedAlways<number> | |
cancelRequestedByUserId | number | null → User | |
cancelAcceptedByUserId | number | null → User | |
noScreen | Generated<DBBoolean> |
Used by 39 repository functions · 46 routes
ChatRepository findAllOpenRoomIdsByUserId
LeaderboardRepository findSeasonPopularUsersWeapon
SkillRepository findSeasonProgressionByUserIdfindSeasonActiveDaysByUserId
ScannerIngestRepository gamesInGroupMatchsendouqGamesPlayedByUserSincegroupMatchIdAtfindScoreboardsByGroupMatchId
SQGroupRepository findCurrentGroupsinsertinsertMembersetOldGroupsAsInactivecloseExpiredContinueVotesfindRecentlyFinishedMatchesleaveGroup
PlayerStatRepository findSeasonSetScoresByUserIdfindSeasonSetParticipantsByUserIdfindSeasonBestSetsByUserId
ReportedWeaponRepository findAllWeaponUsageStats
SQMatchRepository existsfindAllByChatRoomIdsfindLiveStateByIdfindByIdfindSeasonResultsByUserIdfindSeasonDaySummariesByUserIdfindSeasonCanceledMatchesByUserIdfindCancelNominationCountsByUserIdsinsertcancelMatchrequestCancelMatchacceptCancelMatchrefuseCancelMatchreportMapWinnerfindUnfinishedMatchesCreatedBeforeresolveUnfinishedMatchundoMatchReportundoMapReport
QStreamsRepository findAllActiveMatchPlayers
VoiceRepository findPlayerAdoptionSince
//admin/voice/api/chat/rooms/api/chat/rooms/:id/api/chat/rooms/:id/messages/api/chat/rooms/:id/read/api/layout/api/status/api/voice/rooms/:id/api/voice/webhook/friends/ingest/leaderboards/lfg/plus/suggestions/plus/voting/q/q/looking/q/match/:id/q/preparing/q/ready/q/streams/refresh-caches/scrims/scrims/:id/seed/sendouq/active-match/:userId/sendouq/match/:matchId/settings/sse/:connectionId/topics/to/:id/admin/to/:id/admin/to/:id/admin/seeds/to/:id/looking/to/:id/matches/:mid/to/:id/streams/trophies/:id/wins/:userId/u/:identifier/u/:identifier/seasons/u/:identifier/seasons/u/:identifier/seasons/stats/u/:identifier/seasons/summary-graphic/user-card/edit/user-report/:id/user/:userId/active-match/weapon-usage
Relations (12)
erDiagram
direction LR
Group ||--o| GroupMatch : "alphaGroupId"
Group ||--o| GroupMatch : "bravoGroupId"
User |o--o{ GroupMatch : "cancelAcceptedByUserId"
User |o--o{ GroupMatch : "cancelRequestedByUserId"
ChatRoom |o--o| GroupMatch : "chatRoomId"
User |o--o{ GroupMatch : "confirmedByUserId"
GroupMatch ||--o{ GroupMatchCancelReport : "groupMatchId"
GroupMatch ||--o{ GroupMatchMap : "matchId"
GroupMatch |o--o{ IngestedMatch : "groupMatchIdHint"
GroupMatch |o--o{ ReportedWeapon : "groupMatchId"
GroupMatch |o--o{ Skill : "groupMatchId"
GroupMatch |o--o{ UserReport : "matchId"Referenced by GroupMatchCancelReport.groupMatchId, GroupMatchMap.matchId, IngestedMatch.groupMatchIdHint, ReportedWeapon.groupMatchId, Skill.groupMatchId, UserReport.matchId
GroupMatchCancelReport
One team's account of why a SendouQ match was canceled. Staff-only information.
Rows typed by GroupMatchCancelReport
| Column | Type | Description |
|---|---|---|
id | GeneratedAlways<number> | |
groupMatchId | number → GroupMatch | |
groupId | number → Group | |
authorUserId | number → User | |
reason | string | |
createdAt | Generated<number> |
Used by 9 repository functions · 2 routes
SQMatchRepository findSeasonCanceledMatchesByUserIdfindCancelReportsByGroupMatchIdfindCancelNominationCountsByUserIdscancelMatchrequestCancelMatchacceptCancelMatchrefuseCancelMatchreportMapWinnerresolveUnfinishedMatch
Relations (4)
erDiagram
direction LR
User ||--o{ GroupMatchCancelReport : "authorUserId"
Group ||--o{ GroupMatchCancelReport : "groupId"
GroupMatch ||--o{ GroupMatchCancelReport : "groupMatchId"
GroupMatchCancelReport ||--o{ GroupMatchCancelReportPlayer : "cancelReportId"Referenced by GroupMatchCancelReportPlayer.cancelReportId
GroupMatchCancelReportPlayer
Player nominated as a cause of the cancellation in a {@link GroupMatchCancelReport}.
Rows typed by GroupMatchCancelReportPlayer
| Column | Type | Description |
|---|---|---|
cancelReportId | number → GroupMatchCancelReport | |
userId | number → User |
Used by 5 repository functions · 2 routes
SQMatchRepository findSeasonCanceledMatchesByUserIdfindCancelReportsByGroupMatchIdfindCancelNominationCountsByUserIdsrequestCancelMatchacceptCancelMatch
Relations (2)
erDiagram
direction LR
GroupMatchCancelReport ||--o{ GroupMatchCancelReportPlayer : "cancelReportId"
User ||--o{ GroupMatchCancelReportPlayer : "userId"GroupMatchContinueVote
Rows typed by GroupMatchContinueVote
| Column | Type | Description |
|---|---|---|
id | GeneratedAlways<number> | |
groupId | number → Group | |
userId | number → User | |
isContinuing | DBBoolean | |
votedAt | Generated<number> |
Used by 14 repository functions · 4 routes
SQGroupRepository insertinsertMembercloseExpiredContinueVotes
GroupMatchContinueVoteRepository findAllByGroupIdscastOwnVote
SQMatchRepository findByIdcancelMatchrequestCancelMatchacceptCancelMatchrefuseCancelMatchreportMapWinnerresolveUnfinishedMatchundoMatchReportundoMapReport
Relations (2)
erDiagram
direction LR
Group ||--o{ GroupMatchContinueVote : "groupId"
User ||--o{ GroupMatchContinueVote : "userId"GroupMatchMap
Rows typed by GroupMatchMap
| Column | Type | Description |
|---|---|---|
id | GeneratedAlways<number> | |
index | number | |
matchId | number → GroupMatch | |
mode | ModeShort | |
reportedAt | number | null | |
reportedByUserId | number | null → User | |
source | DBTournamentMaplistSource | |
stageId | StageId | |
winnerGroupId | number | null → Group |
Used by 18 repository functions · 8 routes
ScannerIngestRepository gamesInGroupMatchsendouqGamesPlayedByUserSincefindScoreboardsByGroupMatchId
PlayerStatRepository findSeasonSetScoresByUserIdfindSeasonBestSetsByUserId
ReportedWeaponRepository findAllWeaponUsageStats
SQMatchRepository findByIdfindSeasonResultsByUserIdfindSeasonDaySummariesByUserIdinsertcancelMatchrequestCancelMatchacceptCancelMatchrefuseCancelMatchreportMapWinnerresolveUnfinishedMatchundoMatchReportundoMapReport
/ingest/q/match/:id/q/ready/sendouq/match/:matchId/to/:id/matches/:mid/u/:identifier/seasons/u/:identifier/seasons/summary-graphic/weapon-usage
Relations (4)
erDiagram
direction LR
GroupMatch ||--o{ GroupMatchMap : "matchId"
User |o--o{ GroupMatchMap : "reportedByUserId"
Group |o--o{ GroupMatchMap : "winnerGroupId"
GroupMatchMap |o--o{ IngestedMatchLink : "groupMatchMapId"Referenced by IngestedMatchLink.groupMatchMapId
GroupMember
Rows typed by GroupMember
| Column | Type | Description |
|---|---|---|
addedByUserId | number | null → User | Member who quick added this one as their friend, |
createdAt | Generated<number> | |
groupId | number → Group | |
missedReadyCheckAt | number | null | When the member last let a {@link GroupReadyCheck} expire without confirming, letting the rest of the group kick them. |
note | string | null | |
userId | number → User | |
tierName | TierName | "CALCULATING" | null | Tier the member held as their group's match was created, snapshotted for the same reason as {@link Group.tierName}. |
tierIsPlus | Generated<DBBoolean> | Second half of {@link GroupMember.tierName}, meaningless unless that names a tier. |
Used by 45 repository functions · 34 routes
ChatRepository findAllOpenRoomIdsByUserId
ScannerIngestRepository gamesInGroupMatchsendouqGamesPlayedByUserSincegroupMatchIdAt
SQGroupRepository findMapModePreferencesByGroupIdfindAllByChatRoomIdsfindCurrentGroupsfindActiveGroupMembersinsertinsertFromPrevioussyncTeamIdmorphGroupsinsertMembercloseExpiredContinueVotesfindRecentlyFinishedMatchesleaveGroupupdateOwnMemberNotefindAllMissedReadyCheckUserIdsByGroupIdfindReadyCheckByGroupIdfindAllReadyChecksStartedBeforeinsertReadyCheckinsertReadyCheckConfirmationdeleteReadyCheck
PlayerStatRepository findSeasonSetScoresByUserIdfindSeasonSetParticipantsByUserIdfindSeasonBestSetsByUserId
ReportedWeaponRepository findAllWeaponUsageStats
SQMatchRepository findAllByChatRoomIdsfindByIdfindSeasonResultsByUserIdfindSeasonDaySummariesByUserIdfindSeasonCanceledMatchesByUserIdinsertcancelMatchrequestCancelMatchacceptCancelMatchrefuseCancelMatchreportMapWinnerfindUnfinishedMatchesCreatedBeforeresolveUnfinishedMatchundoMatchReportundoMapReport
QStreamsRepository findAllActiveMatchPlayers
VoiceRepository findPlayerAdoptionSince
/admin/admin/voice/api/chat/rooms/api/chat/rooms/:id/api/chat/rooms/:id/messages/api/chat/rooms/:id/read/api/layout/api/status/api/voice/rooms/:id/api/voice/webhook/friends/ingest/q/q/looking/q/match/:id/q/preparing/q/ready/q/streams/refresh-caches/scrims/:id/seed/sendouq/active-match/:userId/sendouq/match/:matchId/settings/sse/:connectionId/topics/to/:id/admin/to/:id/admin/to/:id/matches/:mid/u/:identifier/seasons/u/:identifier/seasons/u/:identifier/seasons/stats/u/:identifier/seasons/summary-graphic/user/:userId/active-match/weapon-usage
Relations (3)
erDiagram
direction LR
User |o--o{ GroupMember : "addedByUserId"
Group ||--o{ GroupMember : "groupId"
User ||--o{ GroupMember : "userId"GroupReadyCheck
Both groups' members confirming they are ready to play, before their match is created
Rows typed by GroupReadyCheck
| Column | Type | Description |
|---|---|---|
alphaGroupId | number → Group | |
bravoGroupId | number → Group | |
createdAt | Generated<number> | |
id | GeneratedAlways<number> |
Used by 6 repository functions · 4 routes
SQGroupRepository leaveGroupfindReadyCheckByGroupIdfindAllReadyChecksStartedBeforeinsertReadyCheckinsertReadyCheckConfirmationdeleteReadyCheck
Relations (3)
erDiagram
direction LR
Group ||--o| GroupReadyCheck : "alphaGroupId"
Group ||--o| GroupReadyCheck : "bravoGroupId"
GroupReadyCheck ||--o{ GroupReadyCheckConfirmation : "readyCheckId"Referenced by GroupReadyCheckConfirmation.readyCheckId
GroupReadyCheckConfirmation
One member confirming they are ready to play in a {@link GroupReadyCheck}
Rows typed by GroupReadyCheckConfirmation
| Column | Type | Description |
|---|---|---|
createdAt | Generated<number> | |
readyCheckId | number → GroupReadyCheck | |
userId | number → User |
Used by 5 repository functions · 4 routes
SQGroupRepository leaveGroupfindReadyCheckByGroupIdinsertReadyCheckinsertReadyCheckConfirmationdeleteReadyCheck
Relations (2)
erDiagram
direction LR
GroupReadyCheck ||--o{ GroupReadyCheckConfirmation : "readyCheckId"
User ||--o{ GroupReadyCheckConfirmation : "userId"GroupSuggestion
A group member pointing their own group at another group, without inviting it
Rows typed by GroupSuggestion
| Column | Type | Description |
|---|---|---|
createdAt | Generated<number> | |
suggesterGroupId | number → Group | Group whose members see the suggestion |
targetGroupId | number → Group | |
createdByUserId | number → User |
Used by 9 repository functions · 4 routes
SQGroupRepository deleteLikesAndSuggestionsByGroupIdmorphGroupsinsertMemberfindAllSuggestionsByGroupIdsetOldGroupsAsInactiveinsertLikeinsertSuggestionleaveGroupinsertReadyCheck
Relations (3)
erDiagram
direction LR
User ||--o{ GroupSuggestion : "createdByUserId"
Group ||--o{ GroupSuggestion : "suggesterGroupId"
Group ||--o{ GroupSuggestion : "targetGroupId"IngestedMatch
Rows typed by IngestedMatch
| Column | Type | Description |
|---|---|---|
id | GeneratedAlways<number> | |
povUserId | number | null → User | |
submitterUserId | number | null → User | |
playedAt | number | null | database timestamp (seconds) the match was played at, when known |
data | JSONColumnType<ScannerMatch> | |
matchHash | string | |
tournamentIdHint | number | null → Tournament | server-resolved tournament the match probably belongs to; aids future linking |
groupMatchIdHint | number | null → GroupMatch | server-resolved SendouQ match the match probably belongs to; aids future linking |
createdAt | Generated<number> |
Used by 13 repository functions · 4 routes
ScannerIngestRepository gamesPlayedByUserInTournamentgamesPlayedByUserSincecastedGamesInTournamentgamesInTournamentMatchesgamesInGroupMatchsendouqGamesPlayedByUserSincefindScoreboardsByTournamentMatchIdfindScoreboardsByGroupMatchIdaddOrMergeMatchesaddLinksfindUnlinkedMatchesByHintfindIngestQuotaUsagedeleteUnlinkedMatchesCreatedBefore
/ingest/q/match/:id/to/:id/matches/:mid/to/:id/teams/:tid/comps
Relations (6)
erDiagram
direction LR
GroupMatch |o--o{ IngestedMatch : "groupMatchIdHint"
User |o--o{ IngestedMatch : "povUserId"
User |o--o{ IngestedMatch : "submitterUserId"
Tournament |o--o{ IngestedMatch : "tournamentIdHint"
IngestedMatch ||--o| IngestedMatchLink : "ingestedMatchId"
IngestedMatch |o--o{ ReportedWeapon : "ingestedMatchId"Referenced by IngestedMatchLink.ingestedMatchId, ReportedWeapon.ingestedMatchId
IngestedMatchLink
Links an ingested match to the game result it describes (exactly one target).
Rows typed by IngestedMatchLink
| Column | Type | Description |
|---|---|---|
id | GeneratedAlways<number> | |
ingestedMatchId | number → IngestedMatch | |
tournamentMatchGameResultId | number | null → TournamentMatchGameResult | |
groupMatchMapId | number | null → GroupMatchMap | |
createdAt | Generated<number> |
Used by 12 repository functions · 4 routes
ScannerIngestRepository gamesPlayedByUserInTournamentgamesPlayedByUserSincecastedGamesInTournamentgamesInTournamentMatchesgamesInGroupMatchsendouqGamesPlayedByUserSincefindScoreboardsByTournamentMatchIdfindScoreboardsByGroupMatchIdaddLinksfindUnlinkedMatchesByHintdeleteUnlinkedMatchesCreatedBeforedeleteLinksByGroupMatchMapId
/ingest/q/match/:id/to/:id/matches/:mid/to/:id/teams/:tid/comps
Relations (3)
erDiagram
direction LR
GroupMatchMap |o--o{ IngestedMatchLink : "groupMatchMapId"
IngestedMatch ||--o| IngestedMatchLink : "ingestedMatchId"
TournamentMatchGameResult |o--o{ IngestedMatchLink : "tournamentMatchGameResultId"LeaderboardTeamSkip
A team that is shown on the team leaderboard but doesn't count for its placements, e.g. because its players want to qualify with another roster.
Rows typed by LeaderboardTeamSkip
| Column | Type | Description |
|---|---|---|
id | GeneratedAlways<number> | |
season | number | |
identifier | SkillTeamIdentifier | The team's roster, same as |
skippedByUserId | number → User | |
createdAt | Generated<number> |
Used by 3 repository functions · 4 routes
LeaderboardRepository findTeamLeaderboardBySeasoninsertTeamSkipdeleteTeamSkip
//leaderboards/u/:identifier/seasons/u/:identifier/seasons/summary-graphic
Relations (1)
erDiagram
direction LR
User ||--o{ LeaderboardTeamSkip : "skippedByUserId"LFGPost
Rows typed by LFGPost
| Column | Type | Description |
|---|---|---|
id | GeneratedAlways<number> | |
type | LFGType | |
text | string | |
timezone | string | e.g. Europe/Helsinki |
authorId | number → User | |
teamId | number | null → AllTeam | |
plusTierVisibility | number | null | |
languages | JSONColumnTypeNullable<UnifiedLanguageCode[]> | |
updatedAt | Generated<number> | |
createdAt | Generated<number> |
Used by 13 repository functions · 19 routes
LFGRepository findBoardPagefindVisibleByIdfindAllOwnfindByAuthorUserIdfindAllVisibleParticipantIdsinsertPostupdatePostbumpPostdeletePostdeletePostsByTeamId
UserCardRepository findAllByUserIdsfindAllByUserIdsCached
/admin/lfg/lfg/new/plus/suggestions/plus/voting/q/looking/q/match/:id/q/ready/q/streams/scrims/scrims/:id/t/:customUrl/to/:id/admin/seeds/to/:id/looking/to/:id/matches/:mid/to/:id/streams/trophies/:id/wins/:userId/u/:identifier/user-card/edit
Relations (2)
erDiagram
direction LR
User ||--o{ LFGPost : "authorId"
AllTeam |o--o{ LFGPost : "teamId"LiveStream
Splatoon 3 stream live right now, replaced wholesale on every sync.
Rows typed by LiveStream
| Column | Type | Description |
|---|---|---|
id | GeneratedAlways<number> | |
platform | StreamPlatform | |
account | string | Twitch login or YouTube channel id |
videoId | string | null | Id of the live video, |
userId | number | null → User | User whose Twitch/YouTube connection the account is. |
viewerCount | number | |
thumbnailUrl | string |
Used by 5 repository functions · 47 routes
LiveStreamRepository replaceAllfindByUserIdfindXRankStreams
QStreamsRepository findAllActiveMatchPlayers
TournamentRepository findStreamsByTournamentId
/api/layout/calendar/:id/calendar/new/friends/q/looking/q/match/:id/q/ready/q/streams/refresh-caches/seed/to/:id/to/:id/to/:id/admin/to/:id/admin/to/:id/admin/audit/to/:id/admin/brackets/to/:id/admin/import-teams/to/:id/admin/registration/:tid?/to/:id/admin/seeds/to/:id/admin/staff/to/:id/admin/stream/to/:id/brackets/to/:id/brackets/finalize/to/:id/info/to/:id/join/to/:id/looking/to/:id/matches/to/:id/matches/:mid/to/:id/register/to/:id/results/to/:id/rules/to/:id/streams/to/:id/teams/to/:id/teams/:tid/to/:id/teams/:tid/comps/tournament-match/:id/tournament/:id/brackets/:bidx/tournament/:id/brackets/:bidx/standings/tournament/:id/seeds/tournament/:id/starting-brackets/tournament/:id/streams/tournament/:id/teams/tournament/:id/teams/:teamId/add-member/tournament/:id/teams/:teamId/remove-member/tournament/:id/teams/:teamId/update-member-ign/tournament/:id/teams/upsert/u/:identifier
Relations (1)
erDiagram
direction LR
User |o--o{ LiveStream : "userId"LogInLink
Log-in links generated via the Lohi Discord bot commands.
Rows typed by LogInLink
| Column | Type | Description |
|---|---|---|
code | string | |
expiresAt | number | |
userId | number → User |
Used by 3 repository functions · 2 routes
Relations (1)
erDiagram
direction LR
User ||--o{ LogInLink : "userId"MapPoolMap
One of: - a regular calendar event's map pool (calendarEventId) - a tournament's map pool, organizer picked or the custom pool of a team picked tournament (calendarEventId) - a tournament team's map picks in a team picked tournament (tournamentTeamId), the modes and counts live in Tournament.settings.teamPick
Rows typed by MapPoolMap
| Column | Type | Description |
|---|---|---|
calendarEventId | number | null → CalendarEvent | |
mode | ModeShort | |
stageId | StageId | |
tournamentTeamId | number | null → TournamentTeam |
Used by 11 repository functions · 43 routes
CalendarRepository findAllBetweenTwoTimestampsfindByIdinsertupdate
ScrimMapListRepository findMapListsByScrimPostId
TournamentRepository findByIdfindTeamsFullByTournamentIdfindTOSetMapPoolById
TournamentTeamRepository upsertRegistrationupsertCounterpickMapsfindMapPoolsByTeamIds
/calendar/calendar.ics/calendar/:id/calendar/:id/report-winners/calendar/new/refresh-caches/scrims/:id/seed/to/:id/to/:id/to/:id/admin/to/:id/admin/to/:id/admin/audit/to/:id/admin/brackets/to/:id/admin/import-teams/to/:id/admin/registration/:tid?/to/:id/admin/seeds/to/:id/admin/staff/to/:id/admin/stream/to/:id/brackets/to/:id/brackets/finalize/to/:id/info/to/:id/join/to/:id/looking/to/:id/matches/to/:id/matches/:mid/to/:id/register/to/:id/results/to/:id/rules/to/:id/streams/to/:id/teams/to/:id/teams/:tid/to/:id/teams/:tid/comps/tournament-match/:id/tournament/:id/brackets/:bidx/tournament/:id/brackets/:bidx/standings/tournament/:id/seeds/tournament/:id/starting-brackets/tournament/:id/teams/tournament/:id/teams/:teamId/add-member/tournament/:id/teams/:teamId/remove-member/tournament/:id/teams/:teamId/update-member-ign/tournament/:id/teams/upsert
Relations (2)
erDiagram
direction LR
CalendarEvent |o--o{ MapPoolMap : "calendarEventId"
TournamentTeam |o--o{ MapPoolMap : "tournamentTeamId"MapResult
Denormalized win/loss counts per user, map and season so they are efficient to fetch.
Rows typed by MapResult
| Column | Type | Description |
|---|---|---|
losses | number | |
mode | ModeShort | |
season | number | |
stageId | StageId | |
userId | number → User | |
wins | number |
Used by 4 repository functions · 5 routes
PlayerStatRepository upsertMapResultsfindSeasonMapWinrateByUserIdfindSeasonStagesByUserId
/q/match/:id/to/:id/brackets/finalize/u/:identifier/seasons/u/:identifier/seasons/stats/u/:identifier/seasons/summary-graphic
Relations (1)
erDiagram
direction LR
User ||--o{ MapResult : "userId"ModAuditLog
History of user written public texts, kept for moderators to review
Rows typed by ModAuditLog
| Column | Type | Description |
|---|---|---|
id | GeneratedAlways<number> | |
type | "SENDOUQ_PUBLIC_NOTE" | |
userId | number → User | Author of the text |
text | string | |
createdAt | Generated<number> |
Used by 2 repository functions · 2 routes
Relations (1)
erDiagram
direction LR
User ||--o{ ModAuditLog : "userId"ModNote
Rows typed by ModNote
| Column | Type | Description |
|---|---|---|
id | GeneratedAlways<number> | |
userId | number → User | |
authorId | number → User | |
text | string | |
createdAt | Generated<number> | |
isDeleted | Generated<DBBoolean> |
Used by 5 repository functions · 2 routes
AdminRepository migrateaddModNotefindModNoteByIddeleteModNote
Relations (2)
erDiagram
direction LR
User ||--o{ ModNote : "authorId"
User ||--o{ ModNote : "userId"Notification
Rows typed by Notification
| Column | Type | Description |
|---|---|---|
id | GeneratedAlways<number> | |
type | NotificationValue["type"] | |
meta | JSONColumnTypeNullable<Record<string, number | string>> | |
pictureUrl | string | null | |
createdAt | Generated<number> |
Used by 5 repository functions · 23 routes
NotificationRepository insertfindByUserIdfindAllByTypefindUserIdsWithUnseenByTypedeleteOld
/api/chat/rooms/:id/messages/api/notifications/art/new/badges/:id/edit/calendar/new/friends/notifications/plus/suggestions/new/q/looking/q/preparing/q/ready/scrims/scrims/:id/t/:customUrl/schedule/to/:id/admin/registration/:tid?/to/:id/brackets/to/:id/brackets/finalize/to/:id/looking/to/:id/matches/:mid/to/:id/register/tournament/:id/teams/:teamId/add-member/tournament/:id/teams/upsert/trophies/new
Relations (1)
erDiagram
direction LR
Notification ||--o{ NotificationUser : "notificationId"Referenced by NotificationUser.notificationId
NotificationUser
Rows typed by NotificationUser
| Column | Type | Description |
|---|---|---|
notificationId | number → Notification | |
userId | number → User | |
seen | Generated<DBBoolean> |
Used by 6 repository functions · 33 routes
NotificationRepository insertfindByUserIdmarkAsSeenByTypefindUserIdsWithUnseenByTypemarkOwnAsSeenfindUnseenSubscriptionsByNotificationId
/api/chat/rooms/:id/mentions/seen/api/chat/rooms/:id/messages/api/chat/rooms/:id/read/api/notifications/art/new/badges/:id/edit/calendar/new/events/friends/notifications/notifications/seen/plus/suggestions/plus/suggestions/new/plus/voting/q/q/looking/q/match/:id/q/preparing/q/ready/scrims/scrims/:id/t/:customUrl/schedule/to/:id/admin/to/:id/admin/to/:id/admin/registration/:tid?/to/:id/brackets/to/:id/brackets/finalize/to/:id/looking/to/:id/matches/:mid/to/:id/register/tournament/:id/teams/:teamId/add-member/tournament/:id/teams/upsert/trophies/new
Relations (2)
erDiagram
direction LR
Notification ||--o{ NotificationUser : "notificationId"
User ||--o{ NotificationUser : "userId"NotificationUserSubscription
A subscription of user's browser indicating where push notifications can be sent to.
Rows typed by NotificationUserSubscription
| Column | Type | Description |
|---|---|---|
id | GeneratedAlways<number> | |
userId | number → User | |
subscription | JSONColumnType<NotificationSubscription> |
Used by 4 repository functions · 22 routes
NotificationRepository upsertOwnSubscriptionfindUnseenSubscriptionsByNotificationIdfindAllSubscriptionsByUserIdsdeleteSubscriptionById
/api/chat/rooms/:id/messages/art/new/badges/:id/edit/calendar/new/friends/notifications/subscribe/plus/suggestions/new/q/looking/q/preparing/q/ready/scrims/scrims/:id/t/:customUrl/schedule/to/:id/admin/registration/:tid?/to/:id/brackets/to/:id/brackets/finalize/to/:id/looking/to/:id/matches/:mid/to/:id/register/tournament/:id/teams/:teamId/add-member/tournament/:id/teams/upsert/trophies/new
Relations (1)
erDiagram
direction LR
User ||--o{ NotificationUserSubscription : "userId"PendingTrophy
Rows typed by PendingTrophy
| Column | Type | Description |
|---|---|---|
id | GeneratedAlways<number> | |
name | string | |
model | string | |
description | string | |
organizationId | number | null → TournamentOrganization | |
submitterUserId | number → User | |
createdAt | number | |
declineReason | string | null | |
declinedAt | number | null | |
declinedByUserId | number | null → User | |
acceptedAt | number | null | |
targetTrophyId | number | null → Trophy | |
managerId | number | null → User | |
creatorId | number | null → User |
Used by 10 repository functions · 2 routes
TrophyRepository existsByNamecreatePendingfindPendingByIdallPendingpendingBySubmitterunreviewedCountBySubmitterdeletePendingdeclinePendingaddApproval
Relations (7)
erDiagram
direction LR
User |o--o{ PendingTrophy : "creatorId"
User |o--o{ PendingTrophy : "declinedByUserId"
User |o--o{ PendingTrophy : "managerId"
TournamentOrganization |o--o{ PendingTrophy : "organizationId"
User ||--o{ PendingTrophy : "submitterUserId"
Trophy |o--o{ PendingTrophy : "targetTrophyId"
PendingTrophy ||--o{ PendingTrophyApproval : "pendingTrophyId"Referenced by PendingTrophyApproval.pendingTrophyId
PendingTrophyApproval
Rows typed by PendingTrophyApproval
| Column | Type | Description |
|---|---|---|
pendingTrophyId | number → PendingTrophy | |
userId | number → User | |
createdAt | number |
Used by 6 repository functions · 2 routes
TrophyRepository findPendingByIdallPendingpendingBySubmitterdeclinePendingaddApproval
Relations (2)
erDiagram
direction LR
PendingTrophy ||--o{ PendingTrophyApproval : "pendingTrophyId"
User ||--o{ PendingTrophyApproval : "userId"PlayerResult
Denormalized head-to-head results between two users per season so they are efficient to fetch.
Rows typed by PlayerResult
| Column | Type | Description |
|---|---|---|
mapLosses | number | |
mapWins | number | |
otherUserId | number → User | |
ownerUserId | number → User | |
season | number | |
setLosses | number | |
setWins | number | |
type | "MATE" | "ENEMY" | Was |
Used by 4 repository functions · 5 routes
PlayerStatRepository findSeasonSetWinrateByUserIdfindSeasonMatesEnemiesByUserIdupsertPlayerResults
/q/match/:id/to/:id/brackets/finalize/u/:identifier/seasons/u/:identifier/seasons/stats/u/:identifier/seasons/summary-graphic
Relations (2)
erDiagram
direction LR
User ||--o{ PlayerResult : "otherUserId"
User ||--o{ PlayerResult : "ownerUserId"PlusSuggestion
Comments to a suggestion are also stored as suggestions, same as the suggestion itself.
Rows typed by PlusSuggestion
| Column | Type | Description |
|---|---|---|
authorId | number → User | |
createdAt | Generated<number> | |
id | GeneratedAlways<number> | |
month | number | |
suggestedId | number → User | |
text | string | |
tier | number | |
updatedAt | number | null | |
year | number |
Used by 6 repository functions · 4 routes
PlusSuggestionRepository findAllByMonthfindMonthSummaryinsertupdateTextByIddeleteByIddeleteWithCommentsBySuggestedUserId
/plus/suggestions/plus/suggestions/comment/:tier/:userId/plus/suggestions/new/plus/voting
Relations (2)
erDiagram
direction LR
User ||--o{ PlusSuggestion : "authorId"
User ||--o{ PlusSuggestion : "suggestedId"PlusTier
Result of the latest voting (PlusVoting.computeFreshPlusTiers) with players from the leaderboard added, materialized for performance.
Rows typed by PlusTier
| Column | Type | Description |
|---|---|---|
tier | number | |
userId | number → User |
Used by 25 repository functions · 41 routes
AdminRepository replacePlusTiers
AssociationRepository findByMemberUserId
BuildRepository insertupdatefindPageByWeaponIdrecalculateAllSortValues
LFGRepository findBoardPagefindVisibleByIdfindAllOwnfindByAuthorUserIdfindAllVisibleParticipantIds
PlusSuggestionRepository findAllByMonthfindMonthSummary
PlusVotingRepository findAllUsersForVoting
TournamentLFGRepository findLookingTeamsByTournamentIdfindSubGroups
UserCardRepository findAllByUserIdsfindAllByUserIdsCached
UserRepository findPlusTiersByUserIdsfindLayoutDataByIdfindProfileByUserIdfindLeanByIdfindAllPlusServerMemberssearchsearchExact
//admin/api/layout/associations/builds/:slug/friends/leaderboards/lfg/lfg/new/plus/list/plus/suggestions/plus/suggestions/comment/:tier/:userId/plus/suggestions/new/plus/voting/q/looking/q/match/:id/q/preparing/q/ready/q/streams/scrims/scrims/:id/scrims/new/search/to/:id/admin/registration/:tid?/to/:id/admin/seeds/to/:id/join/to/:id/looking/to/:id/matches/:mid/to/:id/register/to/:id/streams/tournament/:id/teams/:teamId/add-member/tournament/:id/teams/upsert/trophies/:id/wins/:userId/u/:identifier/u/:identifier/u/:identifier/admin/u/:identifier/builds/new/u/:identifier/edit/user-card/edit/user-report/:id/user/:identifier
Relations (1)
erDiagram direction LR User |o--o| PlusTier : "userId"
PlusVote
Rows typed by PlusVote
| Column | Type | Description |
|---|---|---|
authorId | number → User | |
month | number | |
score | number | |
tier | number | |
becomesValidAt | number | When the vote stops being secret and starts counting towards the results i.e. the end of the voting range. |
votedId | number → User | |
year | number |
Used by 3 repository functions · 2 routes
PlusVotingRepository findAllPlusTiersFromLatestVotinghasVotedupsertMany
Relations (2)
erDiagram
direction LR
User ||--o{ PlusVote : "authorId"
User ||--o{ PlusVote : "votedId"PlusVotingResult
VIEW, read-only. PlusVote rows aggregated per (votedId, tier, month, year) with the average score.
View of PlusSuggestion, PlusVote
Rows typed by PlusVotingResult
| Column | Type | Description |
|---|---|---|
votedId | number | |
tier | number | |
score | number | |
month | number | |
year | number | |
wasSuggested | DBBoolean |
Used by 2 repository functions · 2 routes
PlusVotingRepository findAllPlusTiersFromLatestVotingfindResultsByMonthYear
PrivateUserNote
Rows typed by PrivateUserNote
| Column | Type | Description |
|---|---|---|
authorId | number → User | |
targetId | number → User | |
text | string | null | |
sentiment | "POSITIVE" | "NEUTRAL" | "NEGATIVE" | |
updatedAt | Generated<number> |
Used by 5 repository functions · 17 routes
PrivateUserNoteRepository findAllOwnupsertOwnNotedeleteOwnNoteById
UserCardRepository findAllByUserIdsfindAllByUserIdsCached
/lfg/plus/suggestions/plus/voting/q/looking/q/match/:id/q/ready/q/streams/scrims/scrims/:id/to/:id/admin/seeds/to/:id/looking/to/:id/matches/:mid/to/:id/streams/trophies/:id/wins/:userId/u/:identifier/user-card/:id/note/user-card/edit
Relations (2)
erDiagram
direction LR
User ||--o{ PrivateUserNote : "authorId"
User ||--o{ PrivateUserNote : "targetId"ReportedWeapon
Rows typed by ReportedWeapon
| Column | Type | Description |
|---|---|---|
groupMatchId | number | null → GroupMatch | |
tournamentMatchId | number | null → TournamentMatch | |
mapIndex | number | |
userId | number → User | |
weaponSplId | MainWeaponId | |
createdAt | Generated<number> | |
ingestedMatchId | number | null → IngestedMatch | the scanner read this weapon was reported from, null when reported by hand |
Used by 16 repository functions · 26 routes
LeaderboardRepository findSeasonPopularUsersWeapon
ScannerIngestRepository addLinksdeleteUnlinkedMatchesCreatedBefore
ReportedWeaponRepository upsertOwnreplaceByMatchIddeleteByMatchIddeleteOwnByMapIndexdeleteByMapIndexfindByMatchIdupsertOwnTournamentdeleteOwnByMapIndexTournamentdeleteExtraByTournamentMatchIdfindByTournamentMatchIdfindSeasonReportedWeaponsByUserIdfindAllWeaponUsageStats
TrophyRepository findWinsByOwner
//api/layout/friends/ingest/leaderboards/lfg/plus/suggestions/plus/voting/q/looking/q/match/:id/q/ready/q/streams/scrims/scrims/:id/to/:id/admin/seeds/to/:id/looking/to/:id/matches/:mid/to/:id/streams/to/:id/teams/:tid/comps/trophies/:id/wins/:userId/u/:identifier/u/:identifier/seasons/u/:identifier/seasons/stats/u/:identifier/seasons/summary-graphic/user-card/edit/weapon-usage
Relations (4)
erDiagram
direction LR
GroupMatch |o--o{ ReportedWeapon : "groupMatchId"
IngestedMatch |o--o{ ReportedWeapon : "ingestedMatchId"
TournamentMatch |o--o{ ReportedWeapon : "tournamentMatchId"
User ||--o{ ReportedWeapon : "userId"SavedCalendarEvent
Rows typed by SavedCalendarEvent
| Column | Type | Description |
|---|---|---|
id | GeneratedAlways<number> | |
userId | number → User | |
calendarEventId | number → CalendarEvent | |
createdAt | Generated<number> |
Used by 6 repository functions · 5 routes
SavedCalendarEventRepository saveOwnunsaveByUserIdisSavedcountByUserIdfindAllUpcomingByUserIddeleteByTournamentId
/api/layout/events/to/:id/brackets/finalize/to/:id/info/to/:id/register
Relations (2)
erDiagram
direction LR
CalendarEvent ||--o{ SavedCalendarEvent : "calendarEventId"
User ||--o{ SavedCalendarEvent : "userId"ScrimMap
Rows typed by ScrimMap
| Column | Type | Description |
|---|---|---|
id | GeneratedAlways<number> | |
scrimPostId | number → ScrimPost | |
index | number | |
mode | ModeShort | |
stageId | StageId | |
winnerSide | "ALPHA" | "BRAVO" | null | |
reportedAt | number | null | |
reportedByUserId | number | null → User |
Used by 5 repository functions · 1 route
ScrimMapRepository reportMapAndGenerateNextundoMostRecentMapreplaceCurrentMapfindMapsByScrimPostIdtryGenerateAndInsertNextMap
Relations (2)
erDiagram
direction LR
User |o--o{ ScrimMap : "reportedByUserId"
ScrimPost ||--o{ ScrimMap : "scrimPostId"ScrimMapList
Rows typed by ScrimMapList
| Column | Type | Description |
|---|---|---|
id | GeneratedAlways<number> | |
scrimPostId | number → ScrimPost | |
side | "ALPHA" | "BRAVO" | |
source | "TOURNAMENT" | "POOL" | |
tournamentId | number | null → Tournament | |
serializedPool | string | null | |
updatedAt | number |
Used by 3 repository functions · 1 route
ScrimMapListRepository submitMapListAndGenerateIfNeededdeleteMapListfindMapListsByScrimPostId
Relations (2)
erDiagram
direction LR
ScrimPost ||--o{ ScrimMapList : "scrimPostId"
Tournament |o--o{ ScrimMapList : "tournamentId"ScrimPickupRoster
Rows typed by ScrimPickupRoster
| Column | Type | Description |
|---|---|---|
id | GeneratedAlways<number> | |
userId | number → User | |
usedAt | Generated<number> | When the roster was last used to make a scrim post |
Used by 3 repository functions · 1 route
ScrimPickupRosterRepository findAllOwnRecentupsertOwndeleteOld
Relations (2)
erDiagram
direction LR
User ||--o{ ScrimPickupRoster : "userId"
ScrimPickupRoster ||--o{ ScrimPickupRosterUser : "scrimPickupRosterId"Referenced by ScrimPickupRosterUser.scrimPickupRosterId
ScrimPickupRosterUser
Rows typed by ScrimPickupRosterUser
| Column | Type | Description |
|---|---|---|
scrimPickupRosterId | number → ScrimPickupRoster | |
userId | number → User | Member of the pick-up roster, excluding the roster's owner |
Used by 2 repository functions · 1 route
Relations (2)
erDiagram
direction LR
ScrimPickupRoster ||--o{ ScrimPickupRosterUser : "scrimPickupRosterId"
User ||--o{ ScrimPickupRosterUser : "userId"ScrimPost
Rows typed by ScrimPost
| Column | Type | Description |
|---|---|---|
id | GeneratedAlways<number> | |
startsAt | number | |
rangeEndsAt | number | null | Optional end of time range indicating team accepts scrims starting between startsAt and rangeEndsAt |
maxDiv | number | null | Highest LUTI div accepted |
minDiv | number | null | Lowest LUTI div accepted |
visibility | JSONColumnTypeNullable<AssociationVisibility> | |
text | string | null | |
chatRoomId | number | null → ChatRoom | |
teamId | number | null → AllTeam | Refers to the team looking for the team (can also be a pick-up) |
managedByAnyone | DBBoolean | |
canceledAt | number | null | |
canceledByUserId | number | null → User | |
cancelReason | string | null | |
isScheduledForFuture | Generated<DBBoolean> | When the post was made was it scheduled for a future time slot (as opposed to looking now) |
maps | "SZ" | "ALL" | "RANKED" | null | Maps/modes the scrim is available for. If null means no preference unless "mapsTournamentId" is set |
mapsTournamentId | number | null → Tournament | If set, specifies the maps of a tournament to play |
createdAt | Generated<number> | |
updatedAt | Generated<number> |
Used by 12 repository functions · 21 routes
ChatRepository findAllOpenRoomIdsByUserId
ScrimPostRepository insertdeleteByIdfindAllByChatRoomIdsfindByIdfindAllRelevantacceptRequestcancelScrimfindAcceptedScrimsBetweenTwoTimestampsfindAllAcceptedByUserIdsfindPendingOverlapsForUsersfindUserScrims
/admin/voice/api/chat/rooms/api/chat/rooms/:id/api/chat/rooms/:id/messages/api/chat/rooms/:id/read/api/layout/api/voice/rooms/:id/api/voice/webhook/events/friends/q/looking/q/match/:id/scrims/scrims/:id/scrims/new/sse/:connectionId/topics/t/:customUrl/schedule/to/:id/admin/to/:id/admin/to/:id/matches/:mid/to/:id/register
Relations (8)
erDiagram
direction LR
User |o--o{ ScrimPost : "canceledByUserId"
ChatRoom |o--o| ScrimPost : "chatRoomId"
Tournament |o--o{ ScrimPost : "mapsTournamentId"
AllTeam |o--o{ ScrimPost : "teamId"
ScrimPost ||--o{ ScrimMap : "scrimPostId"
ScrimPost ||--o{ ScrimMapList : "scrimPostId"
ScrimPost ||--o{ ScrimPostRequest : "scrimPostId"
ScrimPost ||--o{ ScrimPostUser : "scrimPostId"Referenced by ScrimMap.scrimPostId, ScrimMapList.scrimPostId, ScrimPostRequest.scrimPostId, ScrimPostUser.scrimPostId
ScrimPostRequest
Rows typed by ScrimPostRequest
| Column | Type | Description |
|---|---|---|
id | GeneratedAlways<number> | |
scrimPostId | number → ScrimPost | |
teamId | number | null → AllTeam | |
message | string | null | |
startsAt | number | null | Specific time selected by requester (required when post has rangeEndsAt) |
isAccepted | Generated<DBBoolean> | |
createdAt | Generated<number> |
Used by 11 repository functions · 21 routes
ChatRepository findAllOpenRoomIdsByUserId
ScrimPostRepository insertRequestfindAllByChatRoomIdsfindByIdfindAllRelevantacceptRequestdeleteRequestfindAcceptedScrimsBetweenTwoTimestampsfindAllAcceptedByUserIdsfindPendingOverlapsForUsersfindUserScrims
/admin/voice/api/chat/rooms/api/chat/rooms/:id/api/chat/rooms/:id/messages/api/chat/rooms/:id/read/api/layout/api/voice/rooms/:id/api/voice/webhook/events/friends/q/looking/q/match/:id/scrims/scrims/:id/scrims/new/sse/:connectionId/topics/t/:customUrl/schedule/to/:id/admin/to/:id/admin/to/:id/matches/:mid/to/:id/register
Relations (3)
erDiagram
direction LR
ScrimPost ||--o{ ScrimPostRequest : "scrimPostId"
AllTeam |o--o{ ScrimPostRequest : "teamId"
ScrimPostRequest ||--o{ ScrimPostRequestUser : "scrimPostRequestId"Referenced by ScrimPostRequestUser.scrimPostRequestId
ScrimPostRequestUser
Rows typed by ScrimPostRequestUser
| Column | Type | Description |
|---|---|---|
scrimPostRequestId | number → ScrimPostRequest | |
userId | number → User | |
isOwner | DBBoolean |
Used by 9 repository functions · 21 routes
ChatRepository findAllOpenRoomIdsByUserId
ScrimPostRepository insertRequestfindAllByChatRoomIdsfindByIdfindAllRelevantfindAcceptedScrimsBetweenTwoTimestampsfindAllAcceptedByUserIdsfindPendingOverlapsForUsersfindUserScrims
/admin/voice/api/chat/rooms/api/chat/rooms/:id/api/chat/rooms/:id/messages/api/chat/rooms/:id/read/api/layout/api/voice/rooms/:id/api/voice/webhook/events/friends/q/looking/q/match/:id/scrims/scrims/:id/scrims/new/sse/:connectionId/topics/t/:customUrl/schedule/to/:id/admin/to/:id/admin/to/:id/matches/:mid/to/:id/register
Relations (2)
erDiagram
direction LR
ScrimPostRequest ||--o{ ScrimPostRequestUser : "scrimPostRequestId"
User ||--o{ ScrimPostRequestUser : "userId"ScrimPostUser
Rows typed by ScrimPostUser
| Column | Type | Description |
|---|---|---|
scrimPostId | number → ScrimPost | |
userId | number → User | |
isOwner | DBBoolean |
Used by 9 repository functions · 21 routes
ChatRepository findAllOpenRoomIdsByUserId
ScrimPostRepository insertfindAllByChatRoomIdsfindByIdfindAllRelevantfindAcceptedScrimsBetweenTwoTimestampsfindAllAcceptedByUserIdsfindPendingOverlapsForUsersfindUserScrims
/admin/voice/api/chat/rooms/api/chat/rooms/:id/api/chat/rooms/:id/messages/api/chat/rooms/:id/read/api/layout/api/voice/rooms/:id/api/voice/webhook/events/friends/q/looking/q/match/:id/scrims/scrims/:id/scrims/new/sse/:connectionId/topics/t/:customUrl/schedule/to/:id/admin/to/:id/admin/to/:id/matches/:mid/to/:id/register
Relations (2)
erDiagram
direction LR
ScrimPost ||--o{ ScrimPostUser : "scrimPostId"
User ||--o{ ScrimPostUser : "userId"SeedingSkill
Used for tournament auto-seeding. Calculates off tournament matches same as SP but does not have seasonal resets.
Rows typed by SeedingSkill
| Column | Type | Description |
|---|---|---|
mu | number | |
ordinal | number | |
sigma | number | |
userId | number → User | |
type | "RANKED" | "UNRANKED" |
Used by 4 repository functions · 39 routes
SkillRepository findSeedingSkills
TournamentRepository findByIdfindTeamsFullByTournamentIdfinalize
/calendar/:id/calendar/new/refresh-caches/seed/to/:id/to/:id/to/:id/admin/to/:id/admin/to/:id/admin/audit/to/:id/admin/brackets/to/:id/admin/import-teams/to/:id/admin/registration/:tid?/to/:id/admin/seeds/to/:id/admin/staff/to/:id/admin/stream/to/:id/brackets/to/:id/brackets/finalize/to/:id/info/to/:id/join/to/:id/looking/to/:id/matches/to/:id/matches/:mid/to/:id/register/to/:id/results/to/:id/rules/to/:id/streams/to/:id/teams/to/:id/teams/:tid/to/:id/teams/:tid/comps/tournament-match/:id/tournament/:id/brackets/:bidx/tournament/:id/brackets/:bidx/standings/tournament/:id/seeds/tournament/:id/starting-brackets/tournament/:id/teams/tournament/:id/teams/:teamId/add-member/tournament/:id/teams/:teamId/remove-member/tournament/:id/teams/:teamId/update-member-ign/tournament/:id/teams/upsert
Relations (1)
erDiagram
direction LR
User ||--o{ SeedingSkill : "userId"Skill
Rows typed by Skill
| Column | Type | Description |
|---|---|---|
groupMatchId | number | null → GroupMatch | |
id | GeneratedAlways<number> | |
identifier | SkillTeamIdentifier | null | Set for team ratings, |
matchesCount | number | |
mu | number | |
ordinal | number | |
sigma | number | |
season | number | |
tournamentId | number | null → Tournament | |
userId | number | null → User | |
createdAt | number | null | Can be null because we did not always save this. |
Used by 37 repository functions · 38 routes
LeaderboardRepository findTeamLeaderboardBySeasonfindSeasonsParticipatedInByUserIdfindUserSPLeaderboard
LiveStreamRepository findXRankStreams
SkillRepository findCurrentUserSkillsfindCurrentTeamSkillsfindOrderedUserOrdinalsBySeasonexistsBySeasonaddInitialSkillfindSeasonProgressionByUserIdfindSeasonPeakOrdinalByUserIdfindSeasonActiveDaysByUserId
SQGroupRepository findAllMapModePreferencesBySeasonNth
MatchSkillRepository insertMatchSkills
PlayerStatRepository findSeasonSetScoresByUserIdfindSeasonSetParticipantsByUserIdfindSeasonBestSetsByUserIdfindSeasonTournamentPlacementsByUserIdfindSeasonTournamentRunsByUserId
SQMatchRepository findLiveStateByIdfindByIdcountSeasonResultPagesByUserIdfindSeasonResultsByUserIdfindSeasonDaySummariesByUserIdfindSeasonCanceledMatchesByUserIdfindCancelNominationCountsByUserIdscancelMatchrequestCancelMatchacceptCancelMatchrefuseCancelMatchreportMapWinnerfindUnfinishedMatchesCreatedBeforeresolveUnfinishedMatchundoMatchReportundoMapReport
TournamentRepository reopenTournamentfinalize
//admin/api/layout/api/status/friends/leaderboards/lfg/plus/suggestions/plus/voting/q/q/looking/q/match/:id/q/preparing/q/ready/q/streams/refresh-caches/scrims/scrims/:id/seed/sendouq/active-match/:userId/sendouq/match/:matchId/settings/tiers/to/:id/admin/brackets/to/:id/admin/seeds/to/:id/brackets/finalize/to/:id/looking/to/:id/matches/:mid/to/:id/streams/trophies/:id/wins/:userId/u/:identifier/u/:identifier/seasons/u/:identifier/seasons/u/:identifier/seasons/stats/u/:identifier/seasons/summary-graphic/user-card/edit/user/:identifier/user/:userId/active-match
Relations (4)
erDiagram
direction LR
GroupMatch |o--o{ Skill : "groupMatchId"
Tournament |o--o{ Skill : "tournamentId"
User |o--o{ Skill : "userId"
Skill ||--o{ SkillTeamUser : "skillId"Referenced by SkillTeamUser.skillId
SkillTeamUser
Rows typed by SkillTeamUser
| Column | Type | Description |
|---|---|---|
skillId | number → Skill | |
userId | number → User |
Used by 4 repository functions · 7 routes
LeaderboardRepository findTeamLeaderboardBySeason
MatchSkillRepository insertMatchSkills
SQMatchRepository findSeasonResultsByUserId
//leaderboards/q/match/:id/to/:id/brackets/finalize/u/:identifier/seasons/u/:identifier/seasons/u/:identifier/seasons/summary-graphic
Relations (2)
erDiagram
direction LR
Skill ||--o{ SkillTeamUser : "skillId"
User ||--o{ SkillTeamUser : "userId"SpecialTrophyOwner
Rows typed by SpecialTrophyOwner
| Column | Type | Description |
|---|---|---|
trophyId | number → Trophy | |
userId | number → User | |
createdAt | number |
Used by 6 repository functions · 7 routes
TrophyRepository findByOwnerUserIdfindByOwnerUserIdIncludingHiddenfindByIdfindXpWeaponCountsByIdsyncSpecialTrophies
/admin/player/:id/trophies/:id/trophies/:id/backfill/:seriesId/trophies/new/u/:identifier/u/:identifier/edit
Relations (2)
erDiagram
direction LR
Trophy ||--o{ SpecialTrophyOwner : "trophyId"
User ||--o{ SpecialTrophyOwner : "userId"SplatoonPlayer
Rows typed by SplatoonPlayer
| Column | Type | Description |
|---|---|---|
id | GeneratedAlways<number> | |
splId | string | |
userId | number | null → User | |
peakXp | JSONColumnTypeNullable<PeakXP> | Players best XP across both divisions. Denormalized for performance. |
Used by 26 repository functions · 26 routes
AdminRepository linkUserAndPlayer
BuildRepository insertupdaterecalculateAllSortValues
LeaderboardRepository findAllXPLeaderboardfindModeXPLeaderboardfindWeaponXPLeaderboard
LiveStreamRepository findXRankStreams
XRankPlacementRepository insertManyunlinkPlayerByUserIdisPlayerLinkedByUserIdfindPeakVerifiedXpByUserIdfindPlacementsOfMonthfindPlacementsByPlayerIdfindPlacementsByUserIdfindPeaksByUserIdrefreshAllPeakXprefreshTenStarWeapons
TrophyRepository findByOwnerUserIdfindByOwnerUserIdIncludingHiddenfindXpWeaponCountsByIdsyncSpecialTrophies
UserCardRepository findAllByUserIdsfindAllByUserIdsCachedfindVerifiedXpByUserId
/admin/api/layout/leaderboards/lfg/player/:id/plus/suggestions/plus/voting/q/looking/q/match/:id/q/ready/q/streams/scrims/scrims/:id/to/:id/admin/seeds/to/:id/looking/to/:id/matches/:mid/to/:id/streams/trophies/:id/trophies/:id/placements/:userId/trophies/:id/wins/:userId/u/:identifier/u/:identifier/builds/new/u/:identifier/edit/user-card/edit/user/:identifier/xsearch
Relations (2)
erDiagram
direction LR
User |o--o| SplatoonPlayer : "userId"
SplatoonPlayer ||--o{ XRankPlacement : "playerId"Referenced by XRankPlacement.playerId
SplatoonRotation
Rows typed by SplatoonRotation
| Column | Type | Description |
|---|---|---|
id | GeneratedAlways<number> | |
type | SplatoonRotationType | |
mode | RankedModeShort | |
stageId1 | number | |
stageId2 | number | |
startsAt | number | |
endsAt | number |
TaggedArt
Rows typed by TaggedArt
| Column | Type | Description |
|---|---|---|
artId | number → Art | |
tagId | number → ArtTag |
Used by 5 repository functions · 4 routes
ArtRepository findShowcaseArtsByTagdeleteOrphanTagsfindArtsByUserIdinsertupdate
Relations (2)
erDiagram
direction LR
Art ||--o{ TaggedArt : "artId"
ArtTag ||--o{ TaggedArt : "tagId"Team
VIEW over AllTeam, excludes soft-deleted teams. Insert/update via AllTeam.
View of AllTeam
Rows typed by Team
| Column | Type | Description |
|---|---|---|
avatarImgId | number | null | |
bannerImgId | number | null | |
bio | string | null | |
createdAt | Generated<number> | |
customUrl | string | |
customTheme | JSONColumnTypeNullable<CustomTheme> | |
deletedAt | number | null | Soft delete marker. Always |
id | GeneratedAlways<number> | |
inviteCode | string | |
name | string | |
bsky | string | null | |
mapModePreferences | JSONColumnTypeNullable<UserMapModePreferences> | |
tag | string | null | Shown in-game in front of members' names |
Used by 32 repository functions · 109 routes
AvailabilityRepository findAllUpcomingTeamEventsByUserId
ImageRepository countAllUnvalidatedfindAllUnvalidatedcountUnvalidatedBySubmitterUserId
LeaderboardRepository findTeamLeaderboardBySeason
LFGRepository findBoardPagefindVisibleByIdfindAllOwn
ScrimPostRepository findByIdfindAllRelevantfindAcceptedScrimsBetweenTwoTimestampsfindPendingOverlapsForUsersfindUserScrims
SQGroupRepository insertFromPrevioussyncTeamIdmorphGroupsinsertMemberfindFriendsAndTeammatesleaveGroup
TeamRepository searchByNamefindAllMemberOfByUserIdfindByCustomUrlfindAllByMemberUserIdupdateupdateMapModePreferencesswitchOwnMainTeamdeleteByIdinsertOwnMembershiphandleMemberLeavingupdateRoster
UserRepository findProfileByUserIdfindLeanById
//admin/admin/streams/admin/voice/api/api/chat/rooms/:id/mentions/seen/api/chat/rooms/:id/messages/api/chat/rooms/:id/read/api/layout/api/voice/rooms/:id/api/voice/telemetry/api/voice/webhook/art/new/associations/associations/new/auth/auth/create-link/auth/impersonate/auth/impersonate/stop/auth/logout/auth/refresh/badges/:id/edit/calendar/calendar/:id/calendar/:id/report-winners/calendar/new/end-season/events/friends/friends-for-adding/ingest/leaderboards/lfg/lfg/new/notifications/seen/notifications/subscribe/org/:slug/org/:slug/edit/org/new/patrons/player/:id/plus/suggestions/plus/suggestions/comment/:tier/:userId/plus/suggestions/new/plus/voting/q/q/looking/q/match/:id/q/preparing/q/ready/refresh-caches/run-routine/scrims/scrims/:id/scrims/new/search/seed/set-plus-voting-active/settings/sidenav/sse/:connectionId/topics/t/:customUrl/t/:customUrl/t/:customUrl/edit/t/:customUrl/join/t/:customUrl/results/t/:customUrl/roster/t/:customUrl/schedule/t/new/team/:id/theme/to/:id/admin/to/:id/admin/to/:id/admin/brackets/to/:id/admin/registration/:tid?/to/:id/admin/seeds/to/:id/admin/staff/to/:id/admin/stream/to/:id/brackets/to/:id/brackets/finalize/to/:id/info/to/:id/join/to/:id/looking/to/:id/matches/:mid/to/:id/register/tournament/:id/seeds/tournament/:id/starting-brackets/tournament/:id/teams/:teamId/add-member/tournament/:id/teams/:teamId/remove-member/tournament/:id/teams/:teamId/update-member-ign/tournament/:id/teams/upsert/trophies/new/u/:identifier/u/:identifier/admin/u/:identifier/art/u/:identifier/builds/u/:identifier/builds/new/u/:identifier/edit/u/:identifier/edit-widgets/u/:identifier/results/highlights/u/:identifier/seasons/u/:identifier/seasons/summary-graphic/upload/admin/user-card/:id/note/user-card/edit/user-report/:id/user/:identifier/vods/:id/vods/new
TeamEvent
Something the team does together that is not a tournament or a scrim, e.g. a VoD review. Blocks the members' availability.
Rows typed by TeamEvent
| Column | Type | Description |
|---|---|---|
id | GeneratedAlways<number> | |
teamId | number → AllTeam | |
authorId | number | null → User | User who created the event. Null if their account has since been deleted. |
name | string | |
startsAt | number | |
endsAt | number | |
createdAt | Generated<number> |
Used by 8 repository functions · 8 routes
AvailabilityRepository findAllTeamEventsByUserIdsfindTeamEventsByTeamIdfindAllUpcomingTeamEventsByUserIdfindTeamEventByIddeleteTeamEventsEndedBeforeinsertTeamEventupdateTeamEventdeleteTeamEvent
/api/layout/events/friends/scrims/scrims/new/t/:customUrl/schedule/to/:id/matches/:mid/to/:id/register
Relations (3)
erDiagram
direction LR
User |o--o{ TeamEvent : "authorId"
AllTeam ||--o{ TeamEvent : "teamId"
TeamEvent ||--o{ TeamEventMember : "teamEventId"Referenced by TeamEventMember.teamEventId
TeamEventMember
Participant of a team event limited to selected members. No rows for an event = the whole team takes part.
Rows typed by TeamEventMember
| Column | Type | Description |
|---|---|---|
teamEventId | number → TeamEvent | |
userId | number → User |
Used by 5 repository functions · 8 routes
AvailabilityRepository findAllTeamEventsByUserIdsfindTeamEventsByTeamIdfindAllUpcomingTeamEventsByUserIdinsertTeamEventupdateTeamEvent
/api/layout/events/friends/scrims/scrims/new/t/:customUrl/schedule/to/:id/matches/:mid/to/:id/register
Relations (2)
erDiagram
direction LR
TeamEvent ||--o{ TeamEventMember : "teamEventId"
User ||--o{ TeamEventMember : "userId"TeamMember
VIEW over AllTeamMember, excludes members who have left, members of deleted teams, and members whose secondary team this is. Insert/update via AllTeamMember.
View of AllTeamMember, Team
Rows typed by TeamMember
| Column | Type | Description |
|---|---|---|
createdAt | Generated<number> | |
isOwner | Generated<DBBoolean> | |
isManager | Generated<DBBoolean> | |
leftAt | number | null | Always |
role | MemberRole | null | |
customRole | string | null | |
roleType | MemberRoleType | null | If customRole is defined, this classifies how the role should be treated |
order | Generated<number> | User-defined ordering of members within a team (ascending) |
teamId | number | |
userId | number | |
isMainTeam | Generated<DBBoolean> |
Used by 3 repository functions · 13 routes
/admin/plus/suggestions/new/q/preparing/scrims/scrims/new/t/:customUrl/to/:id/admin/registration/:tid?/to/:id/join/to/:id/looking/to/:id/register/tournament/:id/teams/:teamId/add-member/tournament/:id/teams/upsert/user-report/:id
TeamMemberWithSecondary
VIEW over AllTeamMember, same as TeamMember but also includes rows where this is the member's secondary (i.e. non-main) team. Insert/update via AllTeamMember.
View of AllTeamMember, Team
Rows typed by TeamMember
| Column | Type | Description |
|---|---|---|
createdAt | Generated<number> | |
isOwner | Generated<DBBoolean> | |
isManager | Generated<DBBoolean> | |
leftAt | number | null | Always |
role | MemberRole | null | |
customRole | string | null | |
roleType | MemberRoleType | null | If customRole is defined, this classifies how the role should be treated |
order | Generated<number> | User-defined ordering of members within a team (ascending) |
teamId | number | |
userId | number | |
isMainTeam | Generated<DBBoolean> |
Used by 21 repository functions · 27 routes
AvailabilityRepository findScheduleVisibleUserIdsfindWeekReminderUserIdsfindAllTeamEventsByUserIdsfindAllUpcomingTeamEventsByUserId
FriendRepository findByUserIdWithActivity
LeaderboardRepository findTeamLeaderboardBySeason
LFGRepository findBoardPagefindVisibleByIdfindAllOwnfindAllVisibleParticipantIds
SQGroupRepository findFriendsAndTeammates
TeamRepository searchByNamefindAllMemberOfByUserIdfindByCustomUrlfindAllByMemberUserIdswitchOwnMainTeamdeleteByIdinsertOwnMembershiphandleMemberLeavingupdateRoster
UserRepository findProfileByUserId
//api/layout/events/friends/friends-for-adding/leaderboards/lfg/lfg/new/q/preparing/scrims/scrims/new/search/t/:customUrl/t/:customUrl/t/:customUrl/edit/t/:customUrl/join/t/:customUrl/results/t/:customUrl/roster/t/:customUrl/schedule/t/new/to/:id/matches/:mid/to/:id/register/u/:identifier/u/:identifier/edit/u/:identifier/seasons/u/:identifier/seasons/summary-graphic/user/:identifier
TenStarWeapon
Rows typed by TenStarWeapon
| Column | Type | Description |
|---|---|---|
userId | number → User | |
weaponSplId | MainWeaponId |
Used by 20 repository functions · 33 routes
LFGRepository findBoardPagefindVisibleByIdfindAllOwn
MatchProfileRepository findSettingsByUserIdfindWeaponPoolByUserId
SQGroupRepository findCurrentGroups
SQMatchRepository findByIdcancelMatchrequestCancelMatchacceptCancelMatchrefuseCancelMatchreportMapWinnerresolveUnfinishedMatchundoMatchReportundoMapReport
TeamRepository findByCustomUrl
XRankPlacementRepository findTenStarWeaponSplIdsByUserIdrefreshTenStarWeapons
TournamentLFGRepository findLookingTeamsByTournamentIdfindSubGroups
//admin/analyzer/api/layout/api/status/builds/friends/lfg/lfg/new/object-damage-calculator/player/:id/q/q/looking/q/match/:id/q/preparing/q/ready/refresh-caches/seed/sendouq/active-match/:userId/sendouq/match/:matchId/settings/t/:customUrl/t/:customUrl/t/:customUrl/edit/t/:customUrl/join/t/:customUrl/results/t/:customUrl/roster/t/:customUrl/schedule/t/new/to/:id/looking/to/:id/matches/:mid/u/:identifier/user/:userId/active-match
Relations (1)
erDiagram
direction LR
User ||--o{ TenStarWeapon : "userId"Tournament
The bracket tables (TournamentStage, TournamentGroup, TournamentRound, TournamentMatch) mimic the [brackets-manager.js schema](https://github.com/Drarig29/brackets-manager.js/issues/111#issuecomment-997417423).
Rows typed by Tournament
| Column | Type | Description |
|---|---|---|
settings | JSONColumnType<TournamentSettings> | |
id | GeneratedAlways<number> | |
mapPickingStyle | TournamentMapPickingStyle | |
preparedMaps | JSONColumnTypeNullable<(PreparedMaps | null)[]> | Maps prepared ahead of time for rounds. Follows settings.bracketProgression order. Null in the spot if not defined yet for that bracket. |
castAccounts | JSONColumnTypeNullable<CastAccount[]> | |
castedMatchesInfo | JSONColumnTypeNullable<CastedMatchesInfo> | |
rules | string | null | |
isFinalized | Generated<DBBoolean> | Is the tournament finalized meaning all the matches are played and TO has locked it making it read-only |
seedingSnapshot | JSONColumnTypeNullable<SeedingSnapshot> | Snapshot of teams and rosters when seeds were last saved. Used to detect NEW teams/players. |
tier | TournamentTierNumber | null | Tournament tier based on top teams' skill. 1=X, 2=S+, 3=S, 4=A+, 5=A, 6=B+, 7=B, 8=C+, 9=C |
vodsLastSyncAt | Generated<number | null> | |
vodsSyncCount | Generated<number> | How many times vods have been synced (automatic process that happens when tournament has concluded). |
Used by 62 repository functions · 92 routes
CalendarRepository findAllBetweenTwoTimestampsfindByIdfindRecentTournamentsByOrganizerUserIdinsertupdate
FriendRepository findByUserIdWithActivity
LeaderboardRepository findSeasonPopularUsersWeapon
SkillRepository findSeasonProgressionByUserIdfindSeasonActiveDaysByUserId
ScannerIngestRepository castedGamesInTournament
ScrimMapListRepository findMapListsByScrimPostId
PlayerStatRepository findSeasonTournamentRunsByUserId
ReportedWeaponRepository findSeasonReportedWeaponsByUserId
TeamRepository findResultsById
TournamentRepository findByIdfindStreamsByTournamentIdfindTeamsFullByTournamentIdfindRulesByIdfindSeedingSnapshotByIdfindLatestFinalizedLeagueParticipantsfindPreparedMapsByIdfindRelatedUsersByTournamentIdsfindAllForShowcasefindShowcaseCountsByIdfindAllBetweenTwoTimestampsfindPendingCheckInsStartingBetweenupdateProgressionupsertPreparedMapsupdateCastAccountslockMatchunlockMatchsetMatchAsCastedreopenTournamentfinalizefinalizeWithoutSummarysearchByNameupdateTeamSeedsupsertDivisionTierfindRunningTournamentIds
TournamentTeamRepository findAllByChatRoomIdsupdateOwnMemberInGameNameForNonStartedinsertupsertRegistrationjoinfindAllRegistrationsByUserIds
TournamentMatchVodRepository findTournamentsNeedingVodSyncmarkVodSyncCompletedfindCastedMatchHistoryByTournamentId
TournamentMatchRepository findMatchById
TournamentOrganizationRepository findAllUnfinalizedEventscountActiveParticipantsupdate
TrophyRepository allfindByOrganizationIdfindTournamentsByTrophyIdfindWinsByOwnerfindAllBackfillableTournamentsinsertTournamentOwnersbackfill
UserRepository findWidgetsByUserIdfindResultsByUserIdcountResultsByUserId
//admin/voice/api/chat/rooms/api/chat/rooms/:id/api/chat/rooms/:id/messages/api/chat/rooms/:id/read/api/layout/api/status/api/voice/rooms/:id/api/voice/webhook/calendar/calendar.ics/calendar/:id/calendar/:id/report-winners/calendar/:year/:week/calendar/new/events/friends/ingest/leaderboards/lfg/org/:slug/org/:slug/edit/org/:slug/stats/plus/suggestions/plus/voting/q/looking/q/match/:id/q/ready/q/streams/refresh-caches/scrims/scrims/:id/scrims/new/search/seed/sse/:connectionId/topics/t/:customUrl/results/t/:customUrl/schedule/to/:id/to/:id/to/:id/admin/to/:id/admin/to/:id/admin/audit/to/:id/admin/brackets/to/:id/admin/import-teams/to/:id/admin/registration/:tid?/to/:id/admin/seeds/to/:id/admin/staff/to/:id/admin/stream/to/:id/brackets/to/:id/brackets/finalize/to/:id/info/to/:id/join/to/:id/looking/to/:id/matches/to/:id/matches/:mid/to/:id/register/to/:id/results/to/:id/rules/to/:id/streams/to/:id/teams/to/:id/teams/:tid/to/:id/teams/:tid/comps/to/search/tournament-match/:id/tournament/:id/tournament/:id/brackets/:bidx/tournament/:id/brackets/:bidx/standings/tournament/:id/casted/tournament/:id/seeds/tournament/:id/starting-brackets/tournament/:id/streams/tournament/:id/teams/tournament/:id/teams/:teamId/add-member/tournament/:id/teams/:teamId/remove-member/tournament/:id/teams/:teamId/update-member-ign/tournament/:id/teams/upsert/trophies/trophies/:id/trophies/:id/backfill/:seriesId/trophies/:id/tournaments/trophies/:id/wins/:userId/trophies/new/u/:identifier/u/:identifier/edit/u/:identifier/results/u/:identifier/results/highlights/u/:identifier/seasons/u/:identifier/seasons/stats/u/:identifier/seasons/summary-graphic/user-card/edit
Relations (16)
erDiagram
direction LR
Tournament |o--o{ CalendarEvent : "tournamentId"
Tournament |o--o{ IngestedMatch : "tournamentIdHint"
Tournament |o--o{ ScrimMapList : "tournamentId"
Tournament |o--o{ ScrimPost : "mapsTournamentId"
Tournament |o--o{ Skill : "tournamentId"
Tournament ||--o{ TournamentAuditLog : "tournamentId"
Tournament |o--o{ TournamentBadgeOwner : "tournamentId"
Tournament ||--o{ TournamentBracketProgressionOverride : "tournamentId"
Tournament ||--o{ TournamentDivisionTier : "tournamentId"
Tournament ||--o{ TournamentResult : "tournamentId"
Tournament ||--o{ TournamentStaff : "tournamentId"
Tournament ||--o{ TournamentStage : "tournamentId"
Tournament ||--o{ TournamentStreamer : "tournamentId"
Tournament ||--o{ TournamentTeam : "tournamentId"
Tournament ||--o{ TournamentTeamHistory : "tournamentId"
Tournament ||--o{ TrophyOwner : "tournamentId"Referenced by CalendarEvent.tournamentId, IngestedMatch.tournamentIdHint, ScrimMapList.tournamentId, ScrimPost.mapsTournamentId, Skill.tournamentId, TournamentAuditLog.tournamentId, TournamentBadgeOwner.tournamentId, TournamentBracketProgressionOverride.tournamentId, TournamentDivisionTier.tournamentId, TournamentResult.tournamentId, TournamentStaff.tournamentId, TournamentStage.tournamentId, TournamentStreamer.tournamentId, TournamentTeam.tournamentId, TournamentTeamHistory.tournamentId, TrophyOwner.tournamentId
TournamentAuditLog
Rows typed by TournamentAuditLog
| Column | Type | Description |
|---|---|---|
id | GeneratedAlways<number> | |
tournamentId | number → Tournament | |
type | TournamentAuditLogType | |
actorUserId | number → User | |
subjectUserId | number | null → User | The affected member, for member-level events. |
tournamentTeamHistoryId | number | null → TournamentTeamHistory | References {@link TournamentTeamHistory.id} so the team name stays resolvable after the team is hard-deleted. |
metadata | JSONColumnTypeNullable<TournamentAuditLogMetadata> | |
createdAt | Generated<number> |
Used by 4 repository functions · 11 routes
TournamentAuditLogRepository insertfindByTournamentIdcountByTournamentIddeleteOld
/to/:id/admin/to/:id/admin/to/:id/admin/audit/to/:id/admin/registration/:tid?/to/:id/brackets/to/:id/join/to/:id/register/tournament/:id/teams/:teamId/add-member/tournament/:id/teams/:teamId/remove-member/tournament/:id/teams/:teamId/update-member-ign/tournament/:id/teams/upsert
Relations (4)
erDiagram
direction LR
User ||--o{ TournamentAuditLog : "actorUserId"
User |o--o{ TournamentAuditLog : "subjectUserId"
Tournament ||--o{ TournamentAuditLog : "tournamentId"
TournamentTeamHistory |o--o{ TournamentAuditLog : "tournamentTeamHistoryId"TournamentBadgeOwner
Rows typed by TournamentBadgeOwner
| Column | Type | Description |
|---|---|---|
badgeId | number → Badge | |
userId | number → User | |
tournamentId | number | null → Tournament | Which tournament the badge is from, if null was added manually by a badge manager as opposed to once a tournament was finalized. |
count | Generated<number> | How many times this badge was awarded to this user from this source. Tournament rows are always 1; manual grants aggregate repeat awards here. |
Used by 5 repository functions · 5 routes
BadgeRepository replaceOwnerssyncXPBadges
TournamentRepository reopenTournamentfinalize
/admin/badges/:id/edit/player/:id/to/:id/admin/brackets/to/:id/brackets/finalize
Relations (3)
erDiagram
direction LR
Badge ||--o{ TournamentBadgeOwner : "badgeId"
Tournament |o--o{ TournamentBadgeOwner : "tournamentId"
User ||--o{ TournamentBadgeOwner : "userId"TournamentBracketProgressionOverride
Rows typed by TournamentBracketProgressionOverride
| Column | Type | Description |
|---|---|---|
sourceBracketIdx | number | |
destinationBracketIdx | number | |
tournamentTeamId | number → TournamentTeam | |
tournamentId | number → Tournament |
Used by 2 repository functions · 39 routes
TournamentRepository findByIdoverrideTeamBracketProgression
/calendar/:id/calendar/new/refresh-caches/seed/to/:id/to/:id/to/:id/admin/to/:id/admin/to/:id/admin/audit/to/:id/admin/brackets/to/:id/admin/import-teams/to/:id/admin/registration/:tid?/to/:id/admin/seeds/to/:id/admin/staff/to/:id/admin/stream/to/:id/brackets/to/:id/brackets/finalize/to/:id/info/to/:id/join/to/:id/looking/to/:id/matches/to/:id/matches/:mid/to/:id/register/to/:id/results/to/:id/rules/to/:id/streams/to/:id/teams/to/:id/teams/:tid/to/:id/teams/:tid/comps/tournament-match/:id/tournament/:id/brackets/:bidx/tournament/:id/brackets/:bidx/standings/tournament/:id/seeds/tournament/:id/starting-brackets/tournament/:id/teams/tournament/:id/teams/:teamId/add-member/tournament/:id/teams/:teamId/remove-member/tournament/:id/teams/:teamId/update-member-ign/tournament/:id/teams/upsert
Relations (2)
erDiagram
direction LR
Tournament ||--o{ TournamentBracketProgressionOverride : "tournamentId"
TournamentTeam ||--o{ TournamentBracketProgressionOverride : "tournamentTeamId"TournamentDivisionTier
Tier of one division (= starting bracket) of a tournament, based on the skill of the teams that checked in to it. Tournaments where every team plays the same bracket have one row (bracket idx 0) matching Tournament.tier, tournaments with many starting brackets one row per division.
Rows typed by TournamentDivisionTier
| Column | Type | Description |
|---|---|---|
tournamentId | number → Tournament | |
bracketIdx | number | Idx of the starting bracket in |
tier | TournamentTierNumber | Same scale as |
Used by 9 repository functions · 45 routes
PlayerStatRepository findSeasonTournamentRunsByUserId
TeamRepository findResultsById
TournamentRepository findDivisionTiersByTournamentIdupsertDivisionTier
TrophyRepository insertTournamentOwnersbackfill
UserRepository findWidgetsByUserIdfindResultsByUserIdcountResultsByUserId
/calendar/:id/calendar/new/refresh-caches/seed/t/:customUrl/results/to/:id/to/:id/to/:id/admin/to/:id/admin/to/:id/admin/audit/to/:id/admin/brackets/to/:id/admin/import-teams/to/:id/admin/registration/:tid?/to/:id/admin/seeds/to/:id/admin/staff/to/:id/admin/stream/to/:id/brackets/to/:id/brackets/finalize/to/:id/info/to/:id/join/to/:id/looking/to/:id/matches/to/:id/matches/:mid/to/:id/register/to/:id/results/to/:id/rules/to/:id/streams/to/:id/teams/to/:id/teams/:tid/to/:id/teams/:tid/comps/tournament-match/:id/tournament/:id/brackets/:bidx/tournament/:id/brackets/:bidx/standings/tournament/:id/seeds/tournament/:id/starting-brackets/tournament/:id/teams/tournament/:id/teams/:teamId/add-member/tournament/:id/teams/:teamId/remove-member/tournament/:id/teams/:teamId/update-member-ign/tournament/:id/teams/upsert/trophies/new/u/:identifier/u/:identifier/results/u/:identifier/results/highlights/u/:identifier/seasons/summary-graphic
Relations (1)
erDiagram
direction LR
Tournament ||--o{ TournamentDivisionTier : "tournamentId"TournamentGroup
A set of participants of a stage that play among themselves: a pool of a round robin or swiss stage, or an elimination bracket whose rounds {@link TournamentRound.section} splits into winners, losers and finals. Every elimination stage has one group for now.
Rows typed by TournamentGroup
| Column | Type | Description |
|---|---|---|
id | GeneratedAlways<number> | |
number | number | |
stageId | number → TournamentStage |
Used by 6 repository functions · 39 routes
BracketRepository findByTournamentIdinsertBracketresetBracket
TournamentMatchVodRepository findAllForDownloadByTournamentIdfindMatchesWithStartedAt
TournamentMatchRepository findByTournamentTeamId
/calendar/:id/calendar/new/refresh-caches/seed/to/:id/to/:id/to/:id/admin/to/:id/admin/to/:id/admin/audit/to/:id/admin/brackets/to/:id/admin/import-teams/to/:id/admin/registration/:tid?/to/:id/admin/seeds/to/:id/admin/staff/to/:id/admin/stream/to/:id/brackets/to/:id/brackets/finalize/to/:id/info/to/:id/join/to/:id/looking/to/:id/matches/to/:id/matches/:mid/to/:id/register/to/:id/results/to/:id/rules/to/:id/streams/to/:id/teams/to/:id/teams/:tid/to/:id/teams/:tid/comps/tournament-match/:id/tournament/:id/brackets/:bidx/tournament/:id/brackets/:bidx/standings/tournament/:id/seeds/tournament/:id/starting-brackets/tournament/:id/teams/tournament/:id/teams/:teamId/add-member/tournament/:id/teams/:teamId/remove-member/tournament/:id/teams/:teamId/update-member-ign/tournament/:id/teams/upsert
Relations (3)
erDiagram
direction LR
TournamentStage ||--o{ TournamentGroup : "stageId"
TournamentGroup ||--o{ TournamentMatch : "groupId"
TournamentGroup ||--o{ TournamentRound : "groupId"Referenced by TournamentMatch.groupId, TournamentRound.groupId
TournamentLFGLike
Rows typed by TournamentLFGLike
| Column | Type | Description |
|---|---|---|
likerTeamId | number → TournamentTeam | |
targetTeamId | number → TournamentTeam | |
createdAt | Generated<number> |
Used by 5 repository functions · 6 routes
TournamentLFGRepository mergeTeamsinsertLikedeleteLikefindAllLikesByTeamIdleaveLfg
/to/:id/admin/registration/:tid?/to/:id/join/to/:id/looking/to/:id/register/tournament/:id/teams/:teamId/add-member/tournament/:id/teams/upsert
Relations (2)
erDiagram
direction LR
TournamentTeam ||--o{ TournamentLFGLike : "likerTeamId"
TournamentTeam ||--o{ TournamentLFGLike : "targetTeamId"TournamentMatch
Rows typed by TournamentMatch
| Column | Type | Description |
|---|---|---|
chatRoomId | number | null → ChatRoom | |
groupId | number → TournamentGroup | |
id | GeneratedAlways<number> | |
number | number | |
opponentOne | JSONColumnTypeNullable<ParticipantResult> | |
opponentTwo | JSONColumnTypeNullable<ParticipantResult> | |
roundId | number → TournamentRound | |
stageId | number → TournamentStage | |
startedAt | number | null | Set when the match becomes playable i.e. its status is "STARTED" |
winnerSide | Side | null | The side that won the set. |
scheduledAt | number | null | Leagues: the time the teams (or the organizer) agreed the set is played at. |
scheduleSetByOrganizer | Generated<DBBoolean> | Leagues: the organizer set {@link TournamentMatch.scheduledAt}, closing the candidate board for the teams. |
Used by 36 repository functions · 71 routes
ChatRepository findAllOpenRoomIdsByUserId
LeaderboardRepository findSeasonPopularUsersWeapon
ScannerIngestRepository gamesPlayedByUserInTournamentgamesPlayedByUserSincecastedGamesInTournamentgamesInTournamentMatchestournamentActivityAtstaffTournamentIdsAtfindScoreboardsByTournamentMatchId
PlayerStatRepository findSeasonSetScoresByUserIdfindSeasonSetParticipantsByUserIdfindSeasonBestSetsByUserId
ReportedWeaponRepository findSeasonReportedWeaponsByUserId
TournamentRepository findAllForShowcaseunlockMatch
BracketRepository findByTournamentIdinsertBracketapplyMatchChangesinsertRoundMatchesdeleteRoundMatchesresetBracket
TournamentMatchVodRepository findVodsByTournamentIdfindAllForDownloadByTournamentIddeleteObsoletefindMatchesWithStartedAt
TournamentMatchRepository findAllByChatRoomIdsfindMatchByIdfindAllResultsByTournamentIdfindUserParticipationByTournamentIdfindByTournamentTeamIdfindLastResultAtsByTournamentIdfindScheduledByUserIdsfindScheduledByUserIdfindScheduledBetweenscheduleMatch
TrophyRepository findWinsByOwner
//admin/voice/api/chat/rooms/api/chat/rooms/:id/api/chat/rooms/:id/messages/api/chat/rooms/:id/read/api/layout/api/voice/rooms/:id/api/voice/webhook/calendar/:id/calendar/new/events/friends/ingest/leaderboards/lfg/plus/suggestions/plus/voting/q/looking/q/match/:id/q/ready/q/streams/refresh-caches/scrims/scrims/:id/scrims/new/seed/sse/:connectionId/topics/t/:customUrl/schedule/to/:id/to/:id/to/:id/admin/to/:id/admin/to/:id/admin/audit/to/:id/admin/brackets/to/:id/admin/import-teams/to/:id/admin/registration/:tid?/to/:id/admin/seeds/to/:id/admin/staff/to/:id/admin/stream/to/:id/brackets/to/:id/brackets/finalize/to/:id/info/to/:id/join/to/:id/looking/to/:id/matches/to/:id/matches/:mid/to/:id/register/to/:id/results/to/:id/rules/to/:id/streams/to/:id/teams/to/:id/teams/:tid/to/:id/teams/:tid/comps/tournament-match/:id/tournament/:id/brackets/:bidx/tournament/:id/brackets/:bidx/standings/tournament/:id/players/tournament/:id/seeds/tournament/:id/starting-brackets/tournament/:id/teams/tournament/:id/teams/:teamId/add-member/tournament/:id/teams/:teamId/remove-member/tournament/:id/teams/:teamId/update-member-ign/tournament/:id/teams/upsert/trophies/:id/wins/:userId/u/:identifier/u/:identifier/seasons/u/:identifier/seasons/stats/u/:identifier/seasons/summary-graphic/user-card/edit
Relations (9)
erDiagram
direction LR
ChatRoom |o--o| TournamentMatch : "chatRoomId"
TournamentGroup ||--o{ TournamentMatch : "groupId"
TournamentRound ||--o{ TournamentMatch : "roundId"
TournamentStage ||--o{ TournamentMatch : "stageId"
TournamentMatch |o--o{ ReportedWeapon : "tournamentMatchId"
TournamentMatch ||--o{ TournamentMatchGameResult : "matchId"
TournamentMatch ||--o{ TournamentMatchPickBanEvent : "matchId"
TournamentMatch ||--o{ TournamentMatchScheduleProposal : "matchId"
TournamentMatch ||--o{ TournamentMatchVod : "matchId"Referenced by ReportedWeapon.tournamentMatchId, TournamentMatchGameResult.matchId, TournamentMatchPickBanEvent.matchId, TournamentMatchScheduleProposal.matchId, TournamentMatchVod.matchId
TournamentMatchGameResult
Rows typed by TournamentMatchGameResult
| Column | Type | Description |
|---|---|---|
createdAt | Generated<number> | |
id | GeneratedAlways<number> | |
ko | DBBoolean | null | Whether the game ended in a knockout. |
matchId | number → TournamentMatch | |
mode | ModeShort | |
number | number | |
reporterId | number → User | |
source | DBTournamentMaplistSource | |
stageId | StageId | |
winnerTeamId | number → TournamentTeam |
Used by 20 repository functions · 11 routes
ScannerIngestRepository gamesPlayedByUserInTournamentgamesPlayedByUserSincecastedGamesInTournamentgamesInTournamentMatchesfindScoreboardsByTournamentMatchId
PlayerStatRepository findSeasonSetScoresByUserIdfindSeasonSetParticipantsByUserIdfindSeasonBestSetsByUserId
TournamentTeamRepository findRecentlyPlayedMapsByIds
TournamentMatchVodRepository findAllForDownloadByTournamentIdfindMatchesWithStartedAt
TournamentMatchRepository findResultByIdfindResultsByMatchIdinsertResultupdateResultKodeleteResultByIdfindAllResultsByTournamentIdfindUserParticipationByTournamentIdfindByTournamentTeamIdfindLastResultAtsByTournamentId
/ingest/q/match/:id/to/:id/brackets/finalize/to/:id/matches/to/:id/matches/:mid/to/:id/teams/:tid/to/:id/teams/:tid/comps/tournament-match/:id/tournament/:id/players/u/:identifier/seasons/stats/u/:identifier/seasons/summary-graphic
Relations (5)
erDiagram
direction LR
TournamentMatch ||--o{ TournamentMatchGameResult : "matchId"
User ||--o{ TournamentMatchGameResult : "reporterId"
TournamentTeam ||--o{ TournamentMatchGameResult : "winnerTeamId"
TournamentMatchGameResult |o--o{ IngestedMatchLink : "tournamentMatchGameResultId"
TournamentMatchGameResult ||--o{ TournamentMatchGameResultParticipant : "matchGameResultId"Referenced by IngestedMatchLink.tournamentMatchGameResultId, TournamentMatchGameResultParticipant.matchGameResultId
TournamentMatchGameResultParticipant
Rows typed by TournamentMatchGameResultParticipant
| Column | Type | Description |
|---|---|---|
matchGameResultId | number → TournamentMatchGameResult | |
userId | number → User | |
tournamentTeamId | number → TournamentTeam |
Used by 15 repository functions · 11 routes
ScannerIngestRepository gamesPlayedByUserInTournamentgamesPlayedByUserSincecastedGamesInTournamentgamesInTournamentMatches
PlayerStatRepository findSeasonSetScoresByUserIdfindSeasonSetParticipantsByUserIdfindSeasonBestSetsByUserId
TournamentTeamRepository findRecentlyPlayedMapsByIds
TournamentMatchVodRepository findMatchesWithStartedAt
TournamentMatchRepository findResultsByMatchIdsetParticipantsfindAllResultsByTournamentIdfindUserParticipationByTournamentIdfindByTournamentTeamId
TournamentOrganizationRepository countActiveParticipants
/ingest/org/:slug/stats/q/match/:id/to/:id/brackets/finalize/to/:id/matches/:mid/to/:id/teams/:tid/to/:id/teams/:tid/comps/tournament-match/:id/tournament/:id/players/u/:identifier/seasons/stats/u/:identifier/seasons/summary-graphic
Relations (3)
erDiagram
direction LR
TournamentMatchGameResult ||--o{ TournamentMatchGameResultParticipant : "matchGameResultId"
TournamentTeam |o--o{ TournamentMatchGameResultParticipant : "tournamentTeamId"
User ||--o{ TournamentMatchGameResultParticipant : "userId"TournamentMatchPickBanEvent
Represents one decision, pick or ban, during tournaments pick/ban (counterpick, ban 2) phase.
Rows typed by TournamentMatchPickBanEvent
| Column | Type | Description |
|---|---|---|
type | "PICK" | "BAN" | "ROLL" | "MODE_PICK" | "MODE_BAN" | |
stageId | StageId | null | |
mode | ModeShort | null | |
matchId | number → TournamentMatch | |
authorId | number | null → User | |
number | number | |
createdAt | Generated<number> |
Used by 4 repository functions · 2 routes
TournamentRepository findPickBanEventsByMatchIdinsertPickBanEvent
TournamentMatchRepository deletePickBanEventsByMatchIddeletePickBanEvent
Relations (2)
erDiagram
direction LR
User |o--o{ TournamentMatchPickBanEvent : "authorId"
TournamentMatch ||--o{ TournamentMatchPickBanEvent : "matchId"TournamentMatchScheduleProposal
Leagues: a candidate time one team put on the set's scheduling board. Only exists while open, accepting or rejecting deletes the match's proposals.
Rows typed by TournamentMatchScheduleProposal
| Column | Type | Description |
|---|---|---|
id | GeneratedAlways<number> | |
matchId | number → TournamentMatch | |
tournamentTeamId | number → TournamentTeam | |
authorId | number → User | |
proposedAt | number | The candidate time. |
createdAt | Generated<number> |
Used by 6 repository functions · 1 route
TournamentMatchRepository findScheduleProposalsByMatchIdinsertScheduleProposalsreplaceScheduleProposalsfindScheduleProposalByIddeleteScheduleProposalsByTeamscheduleMatch
Relations (3)
erDiagram
direction LR
User ||--o{ TournamentMatchScheduleProposal : "authorId"
TournamentMatch ||--o{ TournamentMatchScheduleProposal : "matchId"
TournamentTeam ||--o{ TournamentMatchScheduleProposal : "tournamentTeamId"TournamentMatchVod
Past broadcast VoD of a tournament match with the offset to jump to the match.
Rows typed by TournamentMatchVod
| Column | Type | Description |
|---|---|---|
id | GeneratedAlways<number> | |
matchId | number → TournamentMatch | |
userId | number | null → User | |
platform | StreamPlatform | |
account | string | |
platformVideoId | string | |
timestampSeconds | number | |
viewCount | number |
Used by 5 repository functions · 14 routes
TournamentRepository findAllForShowcase
TournamentMatchVodRepository findVodsByTournamentIdfindAllForDownloadByTournamentIdinsertManydeleteObsolete
//api/layout/events/to/:id/to/:id/admin/to/:id/admin/to/:id/admin/registration/:tid?/to/:id/brackets/to/:id/join/to/:id/looking/to/:id/register/tournament/:id/teams/:teamId/add-member/tournament/:id/teams/:teamId/remove-member/tournament/:id/teams/upsert
Relations (2)
erDiagram
direction LR
TournamentMatch ||--o{ TournamentMatchVod : "matchId"
User |o--o{ TournamentMatchVod : "userId"TournamentOrganization
Rows typed by TournamentOrganization
| Column | Type | Description |
|---|---|---|
id | GeneratedAlways<number> | |
name | string | |
slug | string | |
description | string | null | |
socials | JSONColumnTypeNullable<string[]> | |
avatarImgId | number | null → UnvalidatedUserSubmittedImage | |
isEstablished | Generated<DBBoolean> |
Used by 17 repository functions · 58 routes
ApiRepository findAllApiTokens
CalendarRepository findAllBetweenTwoTimestampsfindById
TournamentRepository findByIdfindAllForShowcase
TournamentOrganizationRepository insertfindBySlugfindByUserIdsearchByNamefindOneByIdupdateupdateIsEstablisheddeleteById
TrophyRepository findByIdfindPendingByIdallPendingpendingBySubmitter
//admin/api/api/layout/calendar/calendar.ics/calendar/:id/calendar/:id/report-winners/calendar/new/events/org/:id/org/:slug/org/:slug/edit/org/:slug/stats/org/new/q/refresh-caches/search/seed/to/:id/to/:id/to/:id/admin/to/:id/admin/to/:id/admin/audit/to/:id/admin/brackets/to/:id/admin/import-teams/to/:id/admin/registration/:tid?/to/:id/admin/seeds/to/:id/admin/staff/to/:id/admin/stream/to/:id/brackets/to/:id/brackets/finalize/to/:id/info/to/:id/join/to/:id/looking/to/:id/matches/to/:id/matches/:mid/to/:id/register/to/:id/results/to/:id/rules/to/:id/streams/to/:id/teams/to/:id/teams/:tid/to/:id/teams/:tid/comps/tournament-match/:id/tournament/:id/brackets/:bidx/tournament/:id/brackets/:bidx/standings/tournament/:id/seeds/tournament/:id/starting-brackets/tournament/:id/teams/tournament/:id/teams/:teamId/add-member/tournament/:id/teams/:teamId/remove-member/tournament/:id/teams/:teamId/update-member-ign/tournament/:id/teams/upsert/trophies/:id/trophies/:id/backfill/:seriesId/trophies/new/u/:identifier
Relations (8)
erDiagram
direction LR
UnvalidatedUserSubmittedImage |o--o{ TournamentOrganization : "avatarImgId"
TournamentOrganization |o--o{ CalendarEvent : "organizationId"
TournamentOrganization |o--o{ PendingTrophy : "organizationId"
TournamentOrganization ||--o{ TournamentOrganizationBadge : "organizationId"
TournamentOrganization ||--o{ TournamentOrganizationBannedUser : "organizationId"
TournamentOrganization ||--o{ TournamentOrganizationMember : "organizationId"
TournamentOrganization ||--o{ TournamentOrganizationSeries : "organizationId"
TournamentOrganization |o--o{ Trophy : "organizationId"Referenced by CalendarEvent.organizationId, PendingTrophy.organizationId, TournamentOrganizationBadge.organizationId, TournamentOrganizationBannedUser.organizationId, TournamentOrganizationMember.organizationId, TournamentOrganizationSeries.organizationId, Trophy.organizationId
TournamentOrganizationBadge
Rows typed by TournamentOrganizationBadge
| Column | Type | Description |
|---|---|---|
organizationId | number → TournamentOrganization | |
badgeId | number → Badge |
Used by 2 repository functions · 4 routes
Relations (2)
erDiagram
direction LR
Badge ||--o{ TournamentOrganizationBadge : "badgeId"
TournamentOrganization ||--o{ TournamentOrganizationBadge : "organizationId"TournamentOrganizationBannedUser
Rows typed by TournamentOrganizationBannedUser
| Column | Type | Description |
|---|---|---|
organizationId | number → TournamentOrganization | |
userId | number → User | |
privateNote | string | null | |
updatedAt | Generated<number> | |
expiresAt | number | null |
Used by 4 repository functions · 4 routes
TournamentOrganizationRepository upsertBannedUserunbanUserfindAllBannedUsersByOrganizationIdisUserBannedByOrganization
Relations (2)
erDiagram
direction LR
TournamentOrganization ||--o{ TournamentOrganizationBannedUser : "organizationId"
User ||--o{ TournamentOrganizationBannedUser : "userId"TournamentOrganizationMember
Rows typed by TournamentOrganizationMember
| Column | Type | Description |
|---|---|---|
organizationId | number → TournamentOrganization | |
userId | number → User | |
role | TournamentOrganizationRole | |
roleDisplayName | string | null |
Used by 11 repository functions · 61 routes
ApiRepository findAllApiTokens
CalendarRepository findRecentTournamentsByOrganizerUserId
ScannerIngestRepository staffTournamentIdsAt
TournamentRepository findByIdfindOrganizerPermissionsByTournamentIds
TournamentOrganizationRepository insertfindBySlugfindByUserIdupdatedeleteOwnMembershipcountOrganizationsByUserId
/admin/admin/voice/api/api/chat/rooms/api/chat/rooms/:id/api/chat/rooms/:id/messages/api/chat/rooms/:id/read/api/voice/rooms/:id/api/voice/webhook/calendar/:id/calendar/new/events/ingest/org/:id/org/:slug/org/:slug/edit/org/:slug/stats/org/new/q/q/looking/q/match/:id/refresh-caches/scrims/:id/seed/sse/:connectionId/topics/to/:id/to/:id/to/:id/admin/to/:id/admin/to/:id/admin/audit/to/:id/admin/brackets/to/:id/admin/import-teams/to/:id/admin/registration/:tid?/to/:id/admin/seeds/to/:id/admin/staff/to/:id/admin/stream/to/:id/brackets/to/:id/brackets/finalize/to/:id/info/to/:id/join/to/:id/looking/to/:id/matches/to/:id/matches/:mid/to/:id/register/to/:id/results/to/:id/rules/to/:id/streams/to/:id/teams/to/:id/teams/:tid/to/:id/teams/:tid/comps/tournament-match/:id/tournament/:id/brackets/:bidx/tournament/:id/brackets/:bidx/standings/tournament/:id/seeds/tournament/:id/starting-brackets/tournament/:id/teams/tournament/:id/teams/:teamId/add-member/tournament/:id/teams/:teamId/remove-member/tournament/:id/teams/:teamId/update-member-ign/tournament/:id/teams/upsert/u/:identifier
Relations (2)
erDiagram
direction LR
TournamentOrganization ||--o{ TournamentOrganizationMember : "organizationId"
User ||--o{ TournamentOrganizationMember : "userId"TournamentOrganizationSeries
Rows typed by TournamentOrganizationSeries
| Column | Type | Description |
|---|---|---|
id | GeneratedAlways<number> | |
organizationId | number → TournamentOrganization | |
name | string | |
description | string | null | |
substringMatches | JSONColumnType<string[]> | |
showLeaderboard | Generated<DBBoolean> | |
tierHistory | JSONColumnTypeNullable<TournamentTierNumber[]> |
Used by 6 repository functions · 57 routes
TournamentOrganizationRepository findBySlugfindAllSeriesfindAllSeriesByOrganizationIdsupdateupdateSeriesTierHistory
//api/layout/calendar/calendar.ics/calendar/:id/calendar/new/events/friends/org/:slug/org/:slug/edit/org/:slug/stats/org/new/refresh-caches/scrims/scrims/new/seed/t/:customUrl/schedule/to/:id/to/:id/to/:id/admin/to/:id/admin/to/:id/admin/audit/to/:id/admin/brackets/to/:id/admin/import-teams/to/:id/admin/registration/:tid?/to/:id/admin/seeds/to/:id/admin/staff/to/:id/admin/stream/to/:id/brackets/to/:id/brackets/finalize/to/:id/info/to/:id/join/to/:id/looking/to/:id/matches/to/:id/matches/:mid/to/:id/register/to/:id/results/to/:id/rules/to/:id/streams/to/:id/teams/to/:id/teams/:tid/to/:id/teams/:tid/comps/tournament-match/:id/tournament/:id/brackets/:bidx/tournament/:id/brackets/:bidx/standings/tournament/:id/seeds/tournament/:id/starting-brackets/tournament/:id/teams/tournament/:id/teams/:teamId/add-member/tournament/:id/teams/:teamId/remove-member/tournament/:id/teams/:teamId/update-member-ign/tournament/:id/teams/upsert/trophies/trophies/:id/trophies/:id/backfill/:seriesId/trophies/:id/tournaments/trophies/new
Relations (1)
erDiagram
direction LR
TournamentOrganization ||--o{ TournamentOrganizationSeries : "organizationId"TournamentResult
Rows typed by TournamentResult
| Column | Type | Description |
|---|---|---|
isHighlight | Generated<DBBoolean> | |
participantCount | number | |
placement | number | |
tournamentId | number → Tournament | |
tournamentTeamId | number → TournamentTeam | |
setResults | JSONColumnType<WinLossParticipationArray> | E.g. ["W", "L", null] = won the first set, lost the second, did not play the third. |
userId | number → User | |
div | string | null | Division label for tournaments with multiple starting brackets (e.g., "D1", "D2") |
Used by 28 repository functions · 34 routes
CalendarRepository findAllBetweenTwoTimestamps
LeaderboardRepository findSeasonsParticipatedInByUserId
PlayerStatRepository findSeasonTournamentPlacementsByUserIdfindSeasonTournamentRunsByUserId
SQMatchRepository countSeasonResultPagesByUserIdfindSeasonResultsByUserIdfindSeasonDaySummariesByUserId
TeamRepository findResultPlacementsByIdfindResultsById
TournamentRepository findResultsByTournamentIdfindLatestFinalizedLeagueParticipantsfindAllForShowcasefindShowcaseCountsByIdfindTopThreeResultsByTournamentIdsreopenTournamentfinalize
TournamentOrganizationRepository findEventsByMonthfindPaginatedEventsBySeriesfindAllSeriesWinsByUserId
TrophyRepository findWinsByOwnerfindAllBackfillableTournaments
UserRepository findLayoutDataByIdfindWidgetsByUserIdfindResultsByUserIdcountResultsByUserIdhasHighlightedResultsByUserIdfindResultPlacementsByUserIdupdateOwnResultHighlights
//api/layout/calendar/calendar.ics/events/org/:slug/t/:customUrl/t/:customUrl/results/to/:id/admin/to/:id/admin/to/:id/admin/brackets/to/:id/admin/registration/:tid?/to/:id/brackets/to/:id/brackets/finalize/to/:id/join/to/:id/looking/to/:id/register/to/:id/results/to/:id/teams/:tid/comps/tournament/:id/teams/:teamId/add-member/tournament/:id/teams/:teamId/remove-member/tournament/:id/teams/upsert/trophies/:id/backfill/:seriesId/trophies/:id/wins/:userId/trophies/new/u/:identifier/u/:identifier/u/:identifier/admin/u/:identifier/results/u/:identifier/results/highlights/u/:identifier/seasons/u/:identifier/seasons/u/:identifier/seasons/stats/u/:identifier/seasons/summary-graphic
Relations (3)
erDiagram
direction LR
Tournament ||--o{ TournamentResult : "tournamentId"
TournamentTeam ||--o{ TournamentResult : "tournamentTeamId"
User ||--o{ TournamentResult : "userId"TournamentRound
Groups matches played at the same time (round-robin, swiss) or one round of a bracket (elimination).
Rows typed by TournamentRound
| Column | Type | Description |
|---|---|---|
groupId | number → TournamentGroup | |
id | GeneratedAlways<number> | |
number | number | Restarts from 1 per group, and in an elimination group per {@link TournamentRound.section}. |
stageId | number → TournamentStage | |
section | TournamentRoundSection | null | Part of the elimination group the round belongs to. |
maps | JSONColumnType<TournamentRoundMaps> | |
isPlayableAt | number | null | Leagues: the round's sets are playable from this time on. Null = playable whenever. |
Used by 8 repository functions · 39 routes
BracketRepository findByTournamentIdinsertBracketresetBracket
TournamentMatchVodRepository findAllForDownloadByTournamentIdfindMatchesWithStartedAt
TournamentMatchRepository findMatchByIdfindAllResultsByTournamentIdfindByTournamentTeamId
/calendar/:id/calendar/new/refresh-caches/seed/to/:id/to/:id/to/:id/admin/to/:id/admin/to/:id/admin/audit/to/:id/admin/brackets/to/:id/admin/import-teams/to/:id/admin/registration/:tid?/to/:id/admin/seeds/to/:id/admin/staff/to/:id/admin/stream/to/:id/brackets/to/:id/brackets/finalize/to/:id/info/to/:id/join/to/:id/looking/to/:id/matches/to/:id/matches/:mid/to/:id/register/to/:id/results/to/:id/rules/to/:id/streams/to/:id/teams/to/:id/teams/:tid/to/:id/teams/:tid/comps/tournament-match/:id/tournament/:id/brackets/:bidx/tournament/:id/brackets/:bidx/standings/tournament/:id/seeds/tournament/:id/starting-brackets/tournament/:id/teams/tournament/:id/teams/:teamId/add-member/tournament/:id/teams/:teamId/remove-member/tournament/:id/teams/:teamId/update-member-ign/tournament/:id/teams/upsert
Relations (3)
erDiagram
direction LR
TournamentGroup ||--o{ TournamentRound : "groupId"
TournamentStage ||--o{ TournamentRound : "stageId"
TournamentRound ||--o{ TournamentMatch : "roundId"Referenced by TournamentMatch.roundId
TournamentStaff
Rows typed by TournamentStaff
| Column | Type | Description |
|---|---|---|
tournamentId | number → Tournament | |
userId | number → User | |
role | TournamentStaffRole |
Used by 7 repository functions · 54 routes
CalendarRepository findRecentTournamentsByOrganizerUserIdinsert
ScannerIngestRepository staffTournamentIdsAt
TournamentRepository findByIdfindRelatedUsersByTournamentIdsfindOrganizerPermissionsByTournamentIdssetStaff
//admin/voice/api/chat/rooms/api/chat/rooms/:id/api/chat/rooms/:id/messages/api/chat/rooms/:id/read/api/layout/api/voice/rooms/:id/api/voice/webhook/calendar/:id/calendar/new/events/ingest/q/looking/q/match/:id/refresh-caches/scrims/:id/seed/sse/:connectionId/topics/to/:id/to/:id/to/:id/admin/to/:id/admin/to/:id/admin/audit/to/:id/admin/brackets/to/:id/admin/import-teams/to/:id/admin/registration/:tid?/to/:id/admin/seeds/to/:id/admin/staff/to/:id/admin/stream/to/:id/brackets/to/:id/brackets/finalize/to/:id/info/to/:id/join/to/:id/looking/to/:id/matches/to/:id/matches/:mid/to/:id/register/to/:id/results/to/:id/rules/to/:id/streams/to/:id/teams/to/:id/teams/:tid/to/:id/teams/:tid/comps/tournament-match/:id/tournament/:id/brackets/:bidx/tournament/:id/brackets/:bidx/standings/tournament/:id/seeds/tournament/:id/starting-brackets/tournament/:id/teams/tournament/:id/teams/:teamId/add-member/tournament/:id/teams/:teamId/remove-member/tournament/:id/teams/:teamId/update-member-ign/tournament/:id/teams/upsert
Relations (2)
erDiagram
direction LR
Tournament ||--o{ TournamentStaff : "tournamentId"
User ||--o{ TournamentStaff : "userId"TournamentStage
A stage is an intermediate phase in a tournament. In essence a bracket.
Rows typed by TournamentStage
| Column | Type | Description |
|---|---|---|
id | GeneratedAlways<number> | |
name | string | |
number | number | |
settings | JSONColumnType<StageSettings> | |
tournamentId | number → Tournament | |
type | (typeof TOURNAMENT_STAGE_TYPES)[number] | |
createdAt | Generated<number> |
Used by 30 repository functions · 73 routes
CalendarRepository findAllBetweenTwoTimestamps
LeaderboardRepository findSeasonPopularUsersWeapon
ScannerIngestRepository gamesPlayedByUserInTournamentgamesPlayedByUserSincecastedGamesInTournamentgamesInTournamentMatchesstaffTournamentIdsAt
PlayerStatRepository findSeasonSetScoresByUserIdfindSeasonSetParticipantsByUserIdfindSeasonBestSetsByUserId
ReportedWeaponRepository findSeasonReportedWeaponsByUserId
TournamentRepository findAllForShowcasefindShowcaseCountsByIdfindRunningTournamentIds
BracketRepository findByTournamentIdinsertBracketresetBracket
TournamentMatchVodRepository findVodsByTournamentIdfindAllForDownloadByTournamentIddeleteObsoletefindMatchesWithStartedAt
TournamentMatchRepository findAllByChatRoomIdsfindMatchByIdfindAllResultsByTournamentIdfindUserParticipationByTournamentIdfindLastResultAtsByTournamentIdfindScheduledByUserIdsfindScheduledByUserIdfindScheduledBetween
TrophyRepository findWinsByOwner
//admin/voice/api/chat/rooms/api/chat/rooms/:id/api/chat/rooms/:id/messages/api/chat/rooms/:id/read/api/layout/api/voice/rooms/:id/api/voice/webhook/calendar/calendar.ics/calendar/:id/calendar/new/events/friends/ingest/leaderboards/lfg/plus/suggestions/plus/voting/q/looking/q/match/:id/q/ready/q/streams/refresh-caches/scrims/scrims/:id/scrims/new/seed/sse/:connectionId/topics/t/:customUrl/schedule/to/:id/to/:id/to/:id/admin/to/:id/admin/to/:id/admin/audit/to/:id/admin/brackets/to/:id/admin/import-teams/to/:id/admin/registration/:tid?/to/:id/admin/seeds/to/:id/admin/staff/to/:id/admin/stream/to/:id/brackets/to/:id/brackets/finalize/to/:id/info/to/:id/join/to/:id/looking/to/:id/matches/to/:id/matches/:mid/to/:id/register/to/:id/results/to/:id/rules/to/:id/streams/to/:id/teams/to/:id/teams/:tid/to/:id/teams/:tid/comps/tournament-match/:id/tournament/:id/brackets/:bidx/tournament/:id/brackets/:bidx/standings/tournament/:id/players/tournament/:id/seeds/tournament/:id/starting-brackets/tournament/:id/teams/tournament/:id/teams/:teamId/add-member/tournament/:id/teams/:teamId/remove-member/tournament/:id/teams/:teamId/update-member-ign/tournament/:id/teams/upsert/trophies/:id/wins/:userId/u/:identifier/u/:identifier/seasons/u/:identifier/seasons/stats/u/:identifier/seasons/summary-graphic/user-card/edit
Relations (4)
erDiagram
direction LR
Tournament ||--o{ TournamentStage : "tournamentId"
TournamentStage ||--o{ TournamentGroup : "stageId"
TournamentStage ||--o{ TournamentMatch : "stageId"
TournamentStage ||--o{ TournamentRound : "stageId"Referenced by TournamentGroup.stageId, TournamentMatch.stageId, TournamentRound.stageId
TournamentStreamer
Account seen streaming the tournament while it was running, used to find match VoDs afterwards.
Rows typed by TournamentStreamer
| Column | Type | Description |
|---|---|---|
id | GeneratedAlways<number> | |
userId | number | null → User | Null for cast accounts not linked to a sendou.ink user. |
tournamentId | number → Tournament | |
platform | StreamPlatform | |
account | string |
Used by 3 repository functions · 1 route
LiveStreamRepository insertTournamentStreamers
Relations (2)
erDiagram
direction LR
Tournament ||--o{ TournamentStreamer : "tournamentId"
User |o--o{ TournamentStreamer : "userId"TournamentTeam
Rows typed by TournamentTeam
| Column | Type | Description |
|---|---|---|
createdAt | Generated<number> | |
id | GeneratedAlways<number> | |
inviteCode | string | |
name | string | |
prefersNotToHost | Generated<DBBoolean> | |
droppedOut | Generated<DBBoolean> | |
seed | number | null | |
startingBracketIdx | number | null | For formats that have many starting brackets, where should the team start? |
activeRosterUserIds | JSONColumnTypeNullable<number[]> | |
tournamentId | number → Tournament | |
teamId | number | null → AllTeam | Optional link to a sendou.ink team, for its avatar & name. |
avatarImgId | number | null → UnvalidatedUserSubmittedImage | |
isLooking | Generated<DBBoolean> | The team is shown on the tournament's LFG page. |
isPlaceholder | Generated<DBBoolean> | Temporary team created automatically when an unregistered user joins the tournament's LFG. - A registered team joining the LFG reuses itself, only toggling |
lfgNote | string | null | |
chatRoomId | number | null → ChatRoom | |
abDivision | number | null | A/B division assignment for bipartite round robin brackets. |
tournamentTeamHistoryId | number | null → TournamentTeamHistory | The team's {@link TournamentTeamHistory} row, created lazily on its first audited event. |
Used by 67 repository functions · 77 routes
CalendarRepository findAllBetweenTwoTimestampsupdate
ChatRepository findAllOpenRoomIdsByUserId
FriendRepository findByUserIdWithActivity
ScannerIngestRepository tournamentActivityAt
PlayerStatRepository findSeasonTournamentRunsByUserId
TeamRepository findResultPlacementsByIdfindResultsById
TournamentAuditLogRepository insertupdateTeamHistoryName
TournamentRepository findByIdfindStreamsByTournamentIdfindParticipatedUserIdsByIdfindTeamsFullByTournamentIdfindParticipantStreamAccountsfindLatestFinalizedLeagueParticipantsfindRelatedUsersByTournamentIdsfindAllForShowcasefindShowcaseCountsByIdfindPendingCheckInsStartingBetweenfindFriendCodesByTournamentIdupdateProgressionupdateTeamSeeds
TournamentTeamRepository findAllByChatRoomIdssetActiveRosterupdateOwnMemberInGameNameForNonStartedinsertupsertRegistrationupdateupdateStartingBracketsupdateAbDivisionsdropOutundoDropOutjoindeleteByIdfindAllRegistrationsByUserIdsfindInviteCodeByIdfindAllChatRoomIdsByIdsisPickupAvatarImgIdfindByInviteCode
BracketRepository insertBracket
TournamentMatchVodRepository findVodsByTournamentId
TournamentLFGRepository startLookinginsertPlaceholderTeamfindLookingTeamsByTournamentIdfindSubGroupsmergeTeamsupdateTeamNoteleaveLfgfindAllSubsByTournamentId
TournamentMatchRepository findAllResultsByTournamentIdfindByTournamentTeamIdfindScheduledByUserIdsfindScheduledByUserIdfindScheduledBetween
TournamentOrganizationRepository findEventsByMonthfindAllOrganizedTournamentTeamCountsfindPaginatedEventsBySeriescountActiveParticipants
TrophyRepository findTournamentsByTrophyIdfindWinsByOwnerfindAllBackfillableTournamentsinsertTournamentOwnersbackfill
UserRepository findWidgetsByUserIdfindResultsByUserIdcountResultsByUserId
//admin/voice/api/chat/rooms/api/chat/rooms/:id/api/chat/rooms/:id/messages/api/chat/rooms/:id/read/api/layout/api/status/api/voice/rooms/:id/api/voice/webhook/calendar/calendar.ics/calendar/:id/calendar/new/events/friends/ingest/org/:slug/org/:slug/stats/q/looking/q/match/:id/refresh-caches/scrims/scrims/:id/scrims/new/seed/sse/:connectionId/topics/t/:customUrl/t/:customUrl/results/t/:customUrl/schedule/to/:id/to/:id/to/:id/admin/to/:id/admin/to/:id/admin/audit/to/:id/admin/brackets/to/:id/admin/import-teams/to/:id/admin/registration/:tid?/to/:id/admin/seeds/to/:id/admin/staff/to/:id/admin/stream/to/:id/brackets/to/:id/brackets/finalize/to/:id/info/to/:id/join/to/:id/looking/to/:id/matches/to/:id/matches/:mid/to/:id/register/to/:id/results/to/:id/rules/to/:id/streams/to/:id/teams/to/:id/teams/:tid/to/:id/teams/:tid/comps/tournament-match/:id/tournament/:id/tournament/:id/brackets/:bidx/tournament/:id/brackets/:bidx/standings/tournament/:id/seeds/tournament/:id/starting-brackets/tournament/:id/streams/tournament/:id/teams/tournament/:id/teams/:teamId/add-member/tournament/:id/teams/:teamId/remove-member/tournament/:id/teams/:teamId/update-member-ign/tournament/:id/teams/upsert/trophies/:id/trophies/:id/backfill/:seriesId/trophies/:id/tournaments/trophies/:id/wins/:userId/trophies/new/u/:identifier/u/:identifier/edit/u/:identifier/results/u/:identifier/results/highlights/u/:identifier/seasons/summary-graphic
Relations (15)
erDiagram
direction LR
UnvalidatedUserSubmittedImage |o--o{ TournamentTeam : "avatarImgId"
ChatRoom |o--o| TournamentTeam : "chatRoomId"
AllTeam |o--o{ TournamentTeam : "teamId"
Tournament ||--o{ TournamentTeam : "tournamentId"
TournamentTeamHistory |o--o{ TournamentTeam : "tournamentTeamHistoryId"
TournamentTeam |o--o{ MapPoolMap : "tournamentTeamId"
TournamentTeam ||--o{ TournamentBracketProgressionOverride : "tournamentTeamId"
TournamentTeam ||--o{ TournamentLFGLike : "likerTeamId"
TournamentTeam ||--o{ TournamentLFGLike : "targetTeamId"
TournamentTeam ||--o{ TournamentMatchGameResult : "winnerTeamId"
TournamentTeam |o--o{ TournamentMatchGameResultParticipant : "tournamentTeamId"
TournamentTeam ||--o{ TournamentMatchScheduleProposal : "tournamentTeamId"
TournamentTeam ||--o{ TournamentResult : "tournamentTeamId"
TournamentTeam ||--o{ TournamentTeamCheckIn : "tournamentTeamId"
TournamentTeam ||--o{ TournamentTeamMember : "tournamentTeamId"Referenced by MapPoolMap.tournamentTeamId, TournamentBracketProgressionOverride.tournamentTeamId, TournamentLFGLike.likerTeamId, TournamentLFGLike.targetTeamId, TournamentMatchGameResult.winnerTeamId, TournamentMatchGameResultParticipant.tournamentTeamId, TournamentMatchScheduleProposal.tournamentTeamId, TournamentResult.tournamentTeamId, TournamentTeamCheckIn.tournamentTeamId, TournamentTeamMember.tournamentTeamId
TournamentTeamCheckIn
Rows typed by TournamentTeamCheckIn
| Column | Type | Description |
|---|---|---|
checkedInAt | number | |
bracketIdx | number | null | Which bracket checked in for. If missing is check in for the whole event. |
tournamentTeamId | number → TournamentTeam | |
isCheckOut | Generated<DBBoolean> | Indicates that this bracket defaults to checked in and this team has been explicitly checked out from it |
Used by 12 repository functions · 47 routes
CalendarRepository findAllBetweenTwoTimestampsupdate
TournamentRepository findByIdfindTeamsFullByTournamentIdfindAllForShowcasefindShowcaseCountsByIdfindPendingCheckInsStartingBetweenupdateProgression
TournamentTeamRepository checkIncheckOutdropOut
TournamentOrganizationRepository countActiveParticipants
//api/layout/api/status/calendar/calendar.ics/calendar/:id/calendar/new/events/org/:slug/stats/refresh-caches/seed/to/:id/to/:id/to/:id/admin/to/:id/admin/to/:id/admin/audit/to/:id/admin/brackets/to/:id/admin/import-teams/to/:id/admin/registration/:tid?/to/:id/admin/seeds/to/:id/admin/staff/to/:id/admin/stream/to/:id/brackets/to/:id/brackets/finalize/to/:id/info/to/:id/join/to/:id/looking/to/:id/matches/to/:id/matches/:mid/to/:id/register/to/:id/results/to/:id/rules/to/:id/streams/to/:id/teams/to/:id/teams/:tid/to/:id/teams/:tid/comps/tournament-match/:id/tournament/:id/tournament/:id/brackets/:bidx/tournament/:id/brackets/:bidx/standings/tournament/:id/seeds/tournament/:id/starting-brackets/tournament/:id/teams/tournament/:id/teams/:teamId/add-member/tournament/:id/teams/:teamId/remove-member/tournament/:id/teams/:teamId/update-member-ign/tournament/:id/teams/upsert
Relations (1)
erDiagram
direction LR
TournamentTeam ||--o{ TournamentTeamCheckIn : "tournamentTeamId"TournamentTeamHistory
Stable shadow of a tournament team's identity that survives the team's hard-deletion, so the audit log can still resolve its name.
Rows typed by TournamentTeamHistory
| Column | Type | Description |
|---|---|---|
id | GeneratedAlways<number> | Surrogate key. Audit log rows reference this so a reused |
tournamentTeamId | number | Mirrors the original |
tournamentId | number → Tournament | |
name | string |
Used by 4 repository functions · 11 routes
TournamentAuditLogRepository insertupdateTeamHistoryNamefindByTournamentIdfindTeamsByTournamentId
/to/:id/admin/to/:id/admin/to/:id/admin/audit/to/:id/admin/registration/:tid?/to/:id/brackets/to/:id/join/to/:id/register/tournament/:id/teams/:teamId/add-member/tournament/:id/teams/:teamId/remove-member/tournament/:id/teams/:teamId/update-member-ign/tournament/:id/teams/upsert
Relations (3)
erDiagram
direction LR
Tournament ||--o{ TournamentTeamHistory : "tournamentId"
TournamentTeamHistory |o--o{ TournamentAuditLog : "tournamentTeamHistoryId"
TournamentTeamHistory |o--o{ TournamentTeam : "tournamentTeamHistoryId"Referenced by TournamentAuditLog.tournamentTeamHistoryId, TournamentTeam.tournamentTeamHistoryId
TournamentTeamMember
Rows typed by TournamentTeamMember
| Column | Type | Description |
|---|---|---|
createdAt | Generated<number> | |
inGameName | string | null | |
tournamentTeamId | number → TournamentTeam | |
userId | number → User | |
role | Generated<"OWNER" | "MANAGER" | "REGULAR"> | |
isStayAsSub | Generated<DBBoolean> | |
isSub | Generated<DBBoolean> | Set when the member was added to the roster after registration closed. |
isOrganizerAdded | Generated<DBBoolean> | Set when the member was added to the roster by the tournament organizer instead of joining on their own. |
isLooking | Generated<DBBoolean> | Denormalized from TournamentTeam.isLooking |
Used by 48 repository functions · 64 routes
CalendarRepository findAllBetweenTwoTimestamps
ChatRepository findAllOpenRoomIdsByUserId
FriendRepository findByUserIdWithActivity
ScannerIngestRepository gamesPlayedByUserInTournamentgamesPlayedByUserSincecastedGamesInTournamentgamesInTournamentMatchestournamentActivityAt
TournamentRepository findByIdfindStreamsByTournamentIdfindParticipatedUserIdsByIdfindTeamsFullByTournamentIdfindParticipantStreamAccountsfindRelatedUsersByTournamentIdsfindAllForShowcasefindShowcaseCountsByIdfindPendingCheckInsStartingBetweenfindFriendCodesByTournamentIdupdateTeamSeeds
TournamentTeamRepository findAllByChatRoomIdsfindAllMembersByTeamIdsupdateMemberInGameNameupdateOwnMemberInGameNameForNonStartedinsertupsertRegistrationjoindeleteByIdisOrganizerAddedMemberleavefindAllRegistrationsByUserIds
TournamentMatchVodRepository findVodsByTournamentIdfindAllForDownloadByTournamentId
TournamentLFGRepository startLookinginsertPlaceholderTeamfindLookingTeamsByTournamentIdfindSubGroupsmergeTeamsupdateMemberRoleupdateOwnStayAsSubleaveLfgfindAllSubsByTournamentId
TournamentMatchRepository findMatchByIdfindAllResultsByTournamentIdfindByTournamentTeamIdfindScheduledByUserIdsfindScheduledByUserIdfindScheduledBetween
//admin/admin/voice/api/chat/rooms/api/chat/rooms/:id/api/chat/rooms/:id/messages/api/chat/rooms/:id/read/api/layout/api/status/api/voice/rooms/:id/api/voice/webhook/calendar/calendar.ics/calendar/:id/calendar/new/events/friends/ingest/q/looking/q/match/:id/refresh-caches/scrims/scrims/:id/scrims/new/seed/sse/:connectionId/topics/t/:customUrl/schedule/to/:id/to/:id/to/:id/admin/to/:id/admin/to/:id/admin/audit/to/:id/admin/brackets/to/:id/admin/import-teams/to/:id/admin/registration/:tid?/to/:id/admin/seeds/to/:id/admin/staff/to/:id/admin/stream/to/:id/brackets/to/:id/brackets/finalize/to/:id/info/to/:id/join/to/:id/looking/to/:id/matches/to/:id/matches/:mid/to/:id/register/to/:id/results/to/:id/rules/to/:id/streams/to/:id/teams/to/:id/teams/:tid/to/:id/teams/:tid/comps/tournament-match/:id/tournament/:id/brackets/:bidx/tournament/:id/brackets/:bidx/standings/tournament/:id/seeds/tournament/:id/starting-brackets/tournament/:id/streams/tournament/:id/teams/tournament/:id/teams/:teamId/add-member/tournament/:id/teams/:teamId/remove-member/tournament/:id/teams/:teamId/update-member-ign/tournament/:id/teams/upsert/u/:identifier/edit
Relations (2)
erDiagram
direction LR
TournamentTeam ||--o{ TournamentTeamMember : "tournamentTeamId"
User ||--o{ TournamentTeamMember : "userId"Trophy
Rows typed by Trophy
| Column | Type | Description |
|---|---|---|
id | GeneratedAlways<number> | |
name | string | |
model | string | |
code | Generated<string | null> | Identifies special trophies, null for regular trophies. |
organizationId | number | null → TournamentOrganization | |
creatorId | number | null → User | |
managerId | number | null → User |
Used by 22 repository functions · 29 routes
CalendarRepository findAllBetweenTwoTimestampsfindById
TournamentRepository findAllForShowcase
TrophyRepository allfindByOrganizationIdfindByOrganizationIdsfindByOwnerUserIdfindByOwnerUserIdIncludingHiddenfindByIdisAwardableByOrganizationexistsByNamefindAllXpfindCodeByIdfindAllForEditinginsertTournamentOwnersbackfillsyncSpecialTrophiesfindPendingByIdallPendingpendingBySubmitteraddApproval
//admin/api/layout/calendar/calendar.ics/calendar/:id/calendar/:id/report-winners/calendar/new/events/org/:slug/player/:id/to/:id/admin/to/:id/admin/to/:id/admin/registration/:tid?/to/:id/brackets/to/:id/brackets/finalize/to/:id/join/to/:id/looking/to/:id/register/tournament/:id/teams/:teamId/add-member/tournament/:id/teams/:teamId/remove-member/tournament/:id/teams/upsert/trophies/trophies/:id/trophies/:id/backfill/:seriesId/trophies/:id/placements/:userId/trophies/new/u/:identifier/u/:identifier/edit
Relations (7)
erDiagram
direction LR
User |o--o{ Trophy : "creatorId"
User |o--o{ Trophy : "managerId"
TournamentOrganization |o--o{ Trophy : "organizationId"
Trophy |o--o{ CalendarEvent : "trophyId"
Trophy |o--o{ PendingTrophy : "targetTrophyId"
Trophy ||--o{ SpecialTrophyOwner : "trophyId"
Trophy ||--o{ TrophyOwner : "trophyId"Referenced by CalendarEvent.trophyId, PendingTrophy.targetTrophyId, SpecialTrophyOwner.trophyId, TrophyOwner.trophyId
TrophyOwner
Rows typed by TrophyOwner
| Column | Type | Description |
|---|---|---|
trophyId | number → Trophy | |
userId | number → User | |
tournamentId | number → Tournament | |
tier | number | null |
Used by 7 repository functions · 8 routes
TrophyRepository findByOwnerUserIdfindByOwnerUserIdIncludingHiddenfindByIdfindWinsByOwnerinsertTournamentOwnersbackfill
/admin/to/:id/brackets/finalize/trophies/:id/trophies/:id/backfill/:seriesId/trophies/:id/wins/:userId/trophies/new/u/:identifier/u/:identifier/edit
Relations (3)
erDiagram
direction LR
Tournament ||--o{ TrophyOwner : "tournamentId"
Trophy ||--o{ TrophyOwner : "trophyId"
User ||--o{ TrophyOwner : "userId"TrustRelationship
Indicates a user trusts another. Allows direct adding to groups/teams without invite links.
Rows typed by TrustRelationship
| Column | Type | Description |
|---|---|---|
trustGiverUserId | number → User | |
trustReceiverUserId | number → User | |
lastUsedAt | number |
No repository function or route queries it.
Relations (2)
erDiagram
direction LR
User ||--o{ TrustRelationship : "trustGiverUserId"
User ||--o{ TrustRelationship : "trustReceiverUserId"UnvalidatedUserSubmittedImage
Table backing the UserSubmittedImage view. Includes images awaiting validation.
Rows typed by UnvalidatedUserSubmittedImage
| Column | Type | Description |
|---|---|---|
id | GeneratedAlways<number> | |
submitterUserId | number → User | |
url | string | |
validatedAt | number | null | When was the image validated? If |
Used by 42 repository functions · 132 routes
CalendarRepository findAllBetweenTwoTimestampsinsertupdate
ImageRepository findByIddeleteByIdcountUnvalidatedArtcountAllUnvalidatedfindAllUnvalidatedcountUnvalidatedBySubmitterUserIdvalidateByIdinsert
ScrimPostRepository findByIdfindAllRelevantfindAcceptedScrimsBetweenTwoTimestampsfindPendingOverlapsForUsersfindUserScrims
PlayerStatRepository findSeasonTournamentRunsByUserId
SQMatchRepository findSeasonResultsByUserId
TeamRepository findByCustomUrlfindResultsByIdupdate
TournamentRepository findByIdfindAllForShowcasefindPendingCheckInsStartingBetweensearchByName
TournamentTeamRepository findAllByChatRoomIds
TournamentMatchRepository findAllByChatRoomIdsfindScheduledByUserId
TournamentOrganizationRepository findEventsByMonthfindPaginatedEventsBySeriesfindAllEventsBySeriesupdate
TrophyRepository findTournamentsByTrophyIdfindWinsByOwnerfindAllBackfillableTournaments
UserCardRepository updateOwnCard
UserRepository findWidgetsByUserIdfindResultsByUserIdreplaceSyncedAvatarupdateOwnProfile
//admin/admin/streams/admin/voice/api/api/chat/rooms/api/chat/rooms/:id/api/chat/rooms/:id/mentions/seen/api/chat/rooms/:id/messages/api/chat/rooms/:id/read/api/layout/api/status/api/voice/rooms/:id/api/voice/telemetry/api/voice/webhook/art/new/associations/associations/new/auth/auth/callback/auth/create-link/auth/impersonate/auth/impersonate/stop/auth/logout/auth/refresh/badges/:id/edit/calendar/calendar.ics/calendar/:id/calendar/:id/report-winners/calendar/new/end-season/events/friends/ingest/leaderboards/lfg/lfg/new/notifications/seen/notifications/subscribe/org/:slug/org/:slug/edit/org/new/patrons/player/:id/plus/suggestions/plus/suggestions/comment/:tier/:userId/plus/suggestions/new/plus/voting/q/q/looking/q/match/:id/q/preparing/q/ready/refresh-caches/run-routine/scrims/scrims/:id/scrims/new/search/seed/set-plus-voting-active/settings/sidenav/sse/:connectionId/topics/t/:customUrl/t/:customUrl/t/:customUrl/edit/t/:customUrl/join/t/:customUrl/results/t/:customUrl/roster/t/:customUrl/schedule/t/new/theme/to/:id/to/:id/to/:id/admin/to/:id/admin/to/:id/admin/audit/to/:id/admin/brackets/to/:id/admin/import-teams/to/:id/admin/registration/:tid?/to/:id/admin/seeds/to/:id/admin/staff/to/:id/admin/stream/to/:id/brackets/to/:id/brackets/finalize/to/:id/info/to/:id/join/to/:id/looking/to/:id/matches/to/:id/matches/:mid/to/:id/register/to/:id/results/to/:id/rules/to/:id/streams/to/:id/teams/to/:id/teams/:tid/to/:id/teams/:tid/comps/to/search/tournament-match/:id/tournament/:id/brackets/:bidx/tournament/:id/brackets/:bidx/standings/tournament/:id/seeds/tournament/:id/starting-brackets/tournament/:id/teams/tournament/:id/teams/:teamId/add-member/tournament/:id/teams/:teamId/remove-member/tournament/:id/teams/:teamId/update-member-ign/tournament/:id/teams/upsert/trophies/:id/trophies/:id/backfill/:seriesId/trophies/:id/tournaments/trophies/:id/wins/:userId/trophies/new/u/:identifier/u/:identifier/admin/u/:identifier/art/u/:identifier/builds/u/:identifier/builds/new/u/:identifier/edit/u/:identifier/edit-widgets/u/:identifier/results/u/:identifier/results/highlights/u/:identifier/seasons/u/:identifier/seasons/summary-graphic/upload/admin/user-card/:id/note/user-card/edit/user-report/:id/vods/:id/vods/new
Relations (11)
erDiagram
direction LR
User ||--o{ UnvalidatedUserSubmittedImage : "submitterUserId"
UnvalidatedUserSubmittedImage |o--o{ AllTeam : "avatarImgId"
UnvalidatedUserSubmittedImage |o--o{ AllTeam : "bannerImgId"
UnvalidatedUserSubmittedImage ||--o{ Art : "imgId"
UnvalidatedUserSubmittedImage |o--o{ CalendarEvent : "avatarImgId"
UnvalidatedUserSubmittedImage |o--o{ ExternalStream : "avatarImgId"
UnvalidatedUserSubmittedImage |o--o{ TournamentOrganization : "avatarImgId"
UnvalidatedUserSubmittedImage |o--o{ TournamentTeam : "avatarImgId"
UnvalidatedUserSubmittedImage |o--o{ User : "bannerImgId"
UnvalidatedUserSubmittedImage |o--o{ User : "customAvatarImgId"
UnvalidatedUserSubmittedImage |o--o{ User : "syncedAvatarImgId"Referenced by AllTeam.avatarImgId, AllTeam.bannerImgId, Art.imgId, CalendarEvent.avatarImgId, ExternalStream.avatarImgId, TournamentOrganization.avatarImgId, TournamentTeam.avatarImgId, User.bannerImgId, User.customAvatarImgId, User.syncedAvatarImgId
UnvalidatedVideo
Table backing the Video view. Includes videos awaiting validation.
Rows typed by UnvalidatedVideo
| Column | Type | Description |
|---|---|---|
eventId | number | null → CalendarEvent | |
id | GeneratedAlways<number> | |
submitterUserId | number → User | |
title | string | |
type | (typeof videoMatchTypes)[number] | |
validatedAt | number | null | |
youtubePublishedAt | number | When the video was published on YouTube. Day precision only, stored as noon UTC of that day. |
youtubeId | string |
Relations (3)
erDiagram
direction LR
CalendarEvent |o--o{ UnvalidatedVideo : "eventId"
User ||--o{ UnvalidatedVideo : "submitterUserId"
UnvalidatedVideo ||--o{ VideoMatch : "videoId"Referenced by VideoMatch.videoId
User
Rows typed by User
| Column | Type | Description |
|---|---|---|
banned | Generated<number | null> | 1 = permabanned, timestamp = ban active till then |
bannedReason | string | null | |
shortBio | string | null | Shown on user card |
commissionsOpen | Generated<DBBoolean> | |
commissionsOpenedAt | number | null | |
commissionText | string | null | |
country | string | null | |
customTheme | JSONColumnTypeNullable<CustomTheme> | |
customUrl | string | null | |
discordAvatar | string | null | Hash of the Discord avatar |
customAvatarImgId | number | null → UnvalidatedUserSubmittedImage | Avatar uploaded by the user, shown over |
syncedAvatarImgId | number | null → UnvalidatedUserSubmittedImage | Avatar copied from the account the user logs in with. |
discordId | string | |
discordName | string | |
customName | string | null | |
username | ColumnType<string, never, never> | coalesce(customName, discordName) |
tournamentName | string | null | Name the user is shown under in tournaments, set by organizers of established organizations. |
discordUniqueName | string | null | |
favoriteTrophyIds | JSONColumnTypeNullable<number[]> | |
hiddenTrophyIds | JSONColumnTypeNullable<number[]> | |
id | GeneratedAlways<number> | |
inGameName | string | null | |
isArtist | Generated<DBBoolean> | |
isVideoAdder | Generated<DBBoolean> | |
isTournamentOrganizer | Generated<DBBoolean> | |
isApiAccesser | Generated<DBBoolean> | |
languages | JSONColumnTypeNullable<UnifiedLanguageCode[]> | |
pronouns | JSONColumnTypeNullable<Pronouns> | |
patronStartedAt | number | null | |
patronTier | number | null | |
patronExpiresAt | number | null | |
twitch | string | null | |
bsky | string | null | |
vc | Generated<UserVoiceChat> | |
youtubeId | string | null | |
youtubeName | string | null | |
mapModePreferences | JSONColumnTypeNullable<UserMapModePreferences> | |
weaponPool | JSONColumnTypeNullable<WeaponPoolEntry[]> | |
plusSkippedForSeasonNth | number | null | |
noScreen | Generated<DBBoolean> | |
buildSorting | JSONColumnTypeNullable<BuildSort[]> | |
preferences | JSONColumnTypeNullable<UserPreferences> | |
createdAt | number | null | Can be null because we did not always save this. |
joinOrder | number | null | |
bannerPresetImg | string | null | User card banner preset, raw text (not JSON): a hex code ("#8b0000") or a stage id ("16"). |
bannerImgId | number | null → UnvalidatedUserSubmittedImage | Supporter-uploaded user card banner (UserSubmittedImage id). Takes precedence over |
hiddenCardStats | JSONColumnTypeNullable<Array<HideableUserCardStat>> | Card stat types the user has chosen to hide from their card. |
div | string | null | Div in the latest finished LUTI (e.g. "2" or "X"). Must have been in a team that did not drop and the user played at least one match (got result as well) |
divSeason | number | null | LUTI season |
unverifiedPeakXP | JSONColumnTypeNullable<PeakXP> | Peak XP as indicated by the user. Should have either |
xpDivision | XRankPlacementRegion | null | Division the user card's XP is taken from. |
Used by 179 repository functions · 139 routes
AdminRepository migratemakeVideoAdderByUserIdmakeArtistByUserIdmakeTournamentOrganizerByUserIdmakeApiAccesserByUserIdforcePatronfindAllBannedUsersbanUserunbanUser
ApiRepository findAllApiTokens
ArtRepository findShowcaseArtsfindShowcaseArtsByTagfindRecentlyUploadedArtsfindArtsByUserId
AssociationRepository findByIdfindByMemberUserIdfindByInviteCodeinsert
AvailabilityRepository findScheduleVisibleUserIds
BadgeRepository findAllfindByIdfindByOwnerUserId
BuildRepository findPageByWeaponId
CalendarRepository findByIdfindResultsByEventIdfindTopThreeResultsByEventIds
ChatRepository findAllMessagesByRoomIdfindMessageByIdfindAllParticipantsByUserIds
FriendRepository findByUserIdWithActivityfindPendingSentRequestsfindPendingReceivedRequestsfindFriendRequestByIdAndReceiverfindMutualFriendsfindFriendsByUserId
ImageRepository findAllUnvalidated
LeaderboardRepository findTeamLeaderboardBySeasonfindAllXPLeaderboardfindModeXPLeaderboardfindWeaponXPLeaderboardfindUserSPLeaderboard
LFGRepository findBoardPagefindVisibleByIdfindAllOwn
LiveStreamRepository findXRankStreams
MatchProfileRepository findSettingsByUserIdfindMapModePreferencesByUserIdfindWeaponPoolByUserIdupdateOwnMatchProfile
NotificationRepository findUnseenSubscriptionsByNotificationId
PlusSuggestionRepository findAllByMonth
PlusVotingRepository findResultsByMonthYearfindAllUsersForVoting
ScannerIngestRepository gamesPlayedByUserInTournamentgamesPlayedByUserSincecastedGamesInTournamentgamesInTournamentMatchesgamesInGroupMatchsendouqGamesPlayedByUserSince
ScrimPickupRosterRepository findAllOwnRecent
ScrimPostRepository findByIdfindAllRelevantfindAcceptedScrimsBetweenTwoTimestampsfindPendingOverlapsForUsersfindUserScrims
SQGroupRepository findMapModePreferencesByGroupIdfindCurrentGroupsfindAllLikesByGroupIdfindAllSuggestionsByGroupIdfindFriendsAndTeammatesfindAllMapModePreferencesBySeasonNth
PlayerStatRepository findSeasonMatesEnemiesByUserIdfindSeasonBestSetsByUserId
SQMatchRepository findByIdfindSeasonResultsByUserIdfindSeasonCanceledMatchesByUserIdinsertcancelMatchrequestCancelMatchacceptCancelMatchrefuseCancelMatchreportMapWinnerresolveUnfinishedMatchundoMatchReportundoMapReport
QStreamsRepository findAllActiveMatchPlayers
TeamRepository searchByNamefindByCustomUrlfindResultsByIdfindAllByMemberUserIdswitchOwnMainTeamdeleteByIdinsertOwnMembershiphandleMemberLeavingupdateRoster
XRankPlacementRepository findPlacementsOfMonthfindPlacementsByPlayerIdfindPlacementsByUserId
TournamentAuditLogRepository findByTournamentId
TournamentRepository findByIdfindStreamsByTournamentIdfindTeamsFullByTournamentIdfindParticipantStreamAccountsfindAllForShowcasefindTopThreeResultsByTournamentIdsupdateTeamSeeds
TournamentTeamRepository insertupsertRegistrationjoin
TournamentMatchVodRepository findVodsByTournamentId
TournamentLFGRepository findLookingTeamsByTournamentIdfindSubGroupsmergeTeams
TournamentMatchRepository findMatchByIdfindByTournamentTeamIdfindScheduleProposalsByMatchId
TournamentOrganizationRepository findBySlugfindEventsByMonthfindPaginatedEventsBySeriesfindAllBannedUsersByOrganizationId
TrophyRepository findByOwnerUserIdfindByOwnerUserIdIncludingHiddenfindByIdfindWinsByOwnerfindAllBackfillableTournamentsfindPendingByIdallPendingpendingBySubmitter
UserCardRepository findAllByUserIdsfindAllByUserIdsCachedfindCardEditExtrasByUserIdfindVerifiedXpByUserIdupdateOwnCard
UserRepository findIdByIdentifierfindPageUserByIdentifierfindCountriesByUserIdsfindDiscordIdsByUserIdsfindBuildFieldsByUserIdfindLayoutDataByIdfindProfileByUserIdfindStoredWidgetsByUserIdfindWidgetsByUserIdfindByCustomUrlfindByFriendCodefindUsernameByIdfindLeanByIdfindModInfoByIdfindAllPatronsfindAllPatronsForFooterfindAllPlusServerMembersexistingUserIdsfindResultsByUserIdsearchsearchExactfindFriendCodesByUserIdfindInGameNameByUserIdfindPatronStartedAtByUserIdfindDivByUserIdfindJoinOrderByUserIdfindCommissionsByUserIdupsertreplaceSyncedAvatarupdateOwnProfileupdateManyDivsupdateOwnCustomThemeupdateOwnPreferencesupdateOwnBuildSortingupdatePatronDataanyUserPrefersNoScreenfindSocialLinksByUserIdfindIdsByStreamAccounts
UserReportRepository findAllByReportedUserId
VodRepository findByUserIdfindVodsfindVodById
VoiceRepository findPlayerAdoptionSincefindVoiceChatPreferencesfindLatestClientErrorsfindLatestFeedbackComments
//admin/admin/voice/analyzer/api/api/chat/rooms/api/chat/rooms/:id/api/chat/rooms/:id/messages/api/layout/api/status/api/voice/rooms/:id/art/art/new/associations/associations/new/auth/callback/auth/create-link/badges/badges/:id/badges/:id/edit/builds/builds/:slug/calendar/calendar/:id/calendar/:id/report-winners/calendar/new/events/friends/friends-for-adding/ingest/leaderboards/lfg/lfg/new/object-damage-calculator/org/:id/org/:slug/org/:slug/edit/org/:slug/stats/org/new/patrons/patrons-list/player/:id/plus/list/plus/suggestions/plus/suggestions/comment/:tier/:userId/plus/suggestions/new/plus/voting/plus/voting/results/q/q/looking/q/match/:id/q/preparing/q/ready/q/streams/refresh-caches/scrims/scrims/:id/scrims/new/search/seed/sendouq/active-match/:userId/sendouq/match/:matchId/settings/short/:customUrl/suspended/t/:customUrl/t/:customUrl/t/:customUrl/edit/t/:customUrl/join/t/:customUrl/results/t/:customUrl/roster/t/:customUrl/schedule/t/new/to/:id/to/:id/to/:id/admin/to/:id/admin/to/:id/admin/audit/to/:id/admin/brackets/to/:id/admin/import-teams/to/:id/admin/registration/:tid?/to/:id/admin/seeds/to/:id/admin/staff/to/:id/admin/stream/to/:id/brackets/to/:id/brackets/finalize/to/:id/info/to/:id/join/to/:id/looking/to/:id/matches/to/:id/matches/:mid/to/:id/register/to/:id/results/to/:id/rules/to/:id/streams/to/:id/teams/to/:id/teams/:tid/to/:id/teams/:tid/comps/tournament-match/:id/tournament/:id/brackets/:bidx/tournament/:id/brackets/:bidx/standings/tournament/:id/seeds/tournament/:id/starting-brackets/tournament/:id/streams/tournament/:id/teams/tournament/:id/teams/:teamId/add-member/tournament/:id/teams/:teamId/remove-member/tournament/:id/teams/:teamId/update-member-ign/tournament/:id/teams/upsert/trophies/:id/trophies/:id/backfill/:seriesId/trophies/:id/placements/:userId/trophies/:id/wins/:userId/trophies/new/u/:identifier/u/:identifier/u/:identifier/admin/u/:identifier/art/u/:identifier/builds/u/:identifier/edit/u/:identifier/edit-widgets/u/:identifier/results/u/:identifier/results/highlights/u/:identifier/seasons/u/:identifier/seasons/u/:identifier/seasons/stats/u/:identifier/seasons/summary-graphic/u/:identifier/vods/upload/admin/user-card/:id/friendship/user-card/edit/user-report/:id/user/:identifier/user/:identifier/ids/user/:userId/active-match/vods/vods/:id/vods/new/xsearch
Relations (110)
Referenced by AllTeamMember.userId, ApiToken.userId, Art.authorId, ArtTag.authorId, ArtUserMetadata.userId, AssociationMember.userId, AvailabilityWeek.userId, Badge.authorId, BadgeManager.userId, BanLog.bannedByUserId, BanLog.userId, Build.ownerId, CalendarEvent.authorId, CalendarEventResultPlayer.userId, ChatMessage.authorUserId, ChatMessageReadIndicator.userId, FriendRequest.receiverId, FriendRequest.senderId, Friendship.userOneId, Friendship.userTwoId, GroupLike.createdByUserId, GroupMatch.cancelAcceptedByUserId, GroupMatch.cancelRequestedByUserId, GroupMatch.confirmedByUserId, GroupMatchCancelReport.authorUserId, GroupMatchCancelReportPlayer.userId, GroupMatchContinueVote.userId, GroupMatchMap.reportedByUserId, GroupMember.addedByUserId, GroupMember.userId, GroupReadyCheckConfirmation.userId, GroupSuggestion.createdByUserId, IngestedMatch.povUserId, IngestedMatch.submitterUserId, LeaderboardTeamSkip.skippedByUserId, LFGPost.authorId, LiveStream.userId, LogInLink.userId, MapResult.userId, ModAuditLog.userId, ModNote.authorId, ModNote.userId, NotificationUser.userId, NotificationUserSubscription.userId, PendingTrophy.creatorId, PendingTrophy.declinedByUserId, PendingTrophy.managerId, PendingTrophy.submitterUserId, PendingTrophyApproval.userId, PlayerResult.otherUserId, PlayerResult.ownerUserId, PlusSuggestion.authorId, PlusSuggestion.suggestedId, PlusTier.userId, PlusVote.authorId, PlusVote.votedId, PrivateUserNote.authorId, PrivateUserNote.targetId, ReportedWeapon.userId, SavedCalendarEvent.userId, ScrimMap.reportedByUserId, ScrimPickupRoster.userId, ScrimPickupRosterUser.userId, ScrimPost.canceledByUserId, ScrimPostRequestUser.userId, ScrimPostUser.userId, SeedingSkill.userId, Skill.userId, SkillTeamUser.userId, SpecialTrophyOwner.userId, SplatoonPlayer.userId, TeamEvent.authorId, TeamEventMember.userId, TenStarWeapon.userId, TournamentAuditLog.actorUserId, TournamentAuditLog.subjectUserId, TournamentBadgeOwner.userId, TournamentMatchGameResult.reporterId, TournamentMatchGameResultParticipant.userId, TournamentMatchPickBanEvent.authorId, TournamentMatchScheduleProposal.authorId, TournamentMatchVod.userId, TournamentOrganizationBannedUser.userId, TournamentOrganizationMember.userId, TournamentResult.userId, TournamentStaff.userId, TournamentStreamer.userId, TournamentTeamMember.userId, Trophy.creatorId, Trophy.managerId, TrophyOwner.userId, TrustRelationship.trustGiverUserId, TrustRelationship.trustReceiverUserId, UnvalidatedUserSubmittedImage.submitterUserId, UnvalidatedVideo.submitterUserId, UserFriendCode.submitterUserId, UserFriendCode.userId, UserReport.reportedUserId, UserReport.reporterUserId, UserResultHighlight.userId, UserWeaponPool.userId, UserWidget.userId, VideoMatchPlayer.playerUserId, VoiceClientError.userId, VoiceFeedback.userId, VoiceSession.userId, VoiceSettings.updatedByUserId
UserFriendCode
Rows typed by UserFriendCode
| Column | Type | Description |
|---|---|---|
friendCode | string | |
userId | number → User | |
submitterUserId | number → User | |
createdAt | Generated<number> |
Used by 19 repository functions · 32 routes
SQMatchRepository findByIdcancelMatchrequestCancelMatchacceptCancelMatchrefuseCancelMatchreportMapWinnerresolveUnfinishedMatchundoMatchReportundoMapReport
TournamentRepository findFriendCodesByTournamentId
UserCardRepository findAllByUserIdsfindAllByUserIdsCached
UserRepository findByFriendCodefindLeanByIdfindCurrentFriendCodeByUserIdfindFriendCodesByUserIdfindAllCurrentFriendCodesinsertFriendCode
/admin/lfg/plus/suggestions/plus/suggestions/new/plus/voting/q/q/looking/q/match/:id/q/preparing/q/ready/q/streams/scrims/scrims/:id/scrims/new/sendouq/match/:matchId/to/:id/to/:id/admin/registration/:tid?/to/:id/admin/seeds/to/:id/join/to/:id/looking/to/:id/matches/:mid/to/:id/register/to/:id/streams/tournament/:id/teams/tournament/:id/teams/:teamId/add-member/tournament/:id/teams/upsert/trophies/:id/wins/:userId/u/:identifier/u/:identifier/admin/u/:identifier/edit/user-card/edit/user-report/:id
Relations (2)
erDiagram
direction LR
User ||--o{ UserFriendCode : "submitterUserId"
User ||--o{ UserFriendCode : "userId"UserReport
Rows typed by UserReport
| Column | Type | Description |
|---|---|---|
id | GeneratedAlways<number> | |
reportedUserId | number → User | |
reporterUserId | number → User | |
category | UserReportCategory | |
description | string | |
matchId | number | null → GroupMatch | |
createdAt | Generated<number> |
Used by 4 repository functions · 3 routes
UserReportRepository upsertcountRecentByReportedUserIdfindAllByReportedUserId
Relations (3)
erDiagram
direction LR
GroupMatch |o--o{ UserReport : "matchId"
User ||--o{ UserReport : "reportedUserId"
User ||--o{ UserReport : "reporterUserId"UserResultHighlight
Rows typed by UserResultHighlight
| Column | Type | Description |
|---|---|---|
teamId | number → CalendarEventResultTeam | |
userId | number → User |
Used by 5 repository functions · 3 routes
UserRepository findWidgetsByUserIdfindResultsByUserIdcountResultsByUserIdhasHighlightedResultsByUserIdupdateOwnResultHighlights
/u/:identifier/u/:identifier/results/u/:identifier/results/highlights
Relations (2)
erDiagram
direction LR
CalendarEventResultTeam ||--o{ UserResultHighlight : "teamId"
User ||--o{ UserResultHighlight : "userId"UserSearch
FTS5 trigram index over User's searchable columns (external content table, kept in sync with triggers). Only meant for reading: filter with match and join rowid to User.id.
Rows typed by UserSearch
| Column | Type | Description |
|---|---|---|
rowid | GeneratedAlways<number> | |
username | GeneratedAlways<string | null> | |
inGameName | GeneratedAlways<string | null> | |
discordUniqueName | GeneratedAlways<string | null> | |
customUrl | GeneratedAlways<string | null> |
UserSubmittedImage
VIEW over UnvalidatedUserSubmittedImage, excludes images awaiting validation. Insert/update via UnvalidatedUserSubmittedImage.
View of UnvalidatedUserSubmittedImage
Rows typed by UserSubmittedImage
| Column | Type | Description |
|---|---|---|
id | GeneratedAlways<number> | |
submitterUserId | number | null | |
url | string | |
validatedAt | number | null | Never |
Used by 105 repository functions · 119 routes
ExternalStreamRepository findAllfindAllForSidebar
ArtRepository findShowcaseArtsfindShowcaseArtsByTagfindRecentlyUploadedArtsfindArtsByUserId
AssociationRepository findByIdfindByMemberUserIdfindByInviteCode
AvailabilityRepository findAllUpcomingTeamEventsByUserId
BadgeRepository findAllfindById
BuildRepository findPageByWeaponId
CalendarRepository findByIdfindResultsByEventIdfindTopThreeResultsByEventIds
ChatRepository findAllMessagesByRoomIdfindMessageByIdfindAllParticipantsByUserIds
FriendRepository findByUserIdWithActivityfindPendingSentRequestsfindPendingReceivedRequestsfindMutualFriendsfindFriendsByUserId
LeaderboardRepository findTeamLeaderboardBySeasonfindAllXPLeaderboardfindModeXPLeaderboardfindWeaponXPLeaderboardfindUserSPLeaderboard
LFGRepository findBoardPagefindVisibleByIdfindAllOwn
LiveStreamRepository findXRankStreams
PlusSuggestionRepository findAllByMonth
PlusVotingRepository findResultsByMonthYearfindAllUsersForVoting
ScrimPickupRosterRepository findAllOwnRecent
ScrimPostRepository findByIdfindAllRelevantfindAcceptedScrimsBetweenTwoTimestampsfindPendingOverlapsForUsersfindUserScrims
SQGroupRepository findCurrentGroupsfindFriendsAndTeammates
PlayerStatRepository findSeasonMatesEnemiesByUserId
SQMatchRepository findByIdfindSeasonResultsByUserIdcancelMatchrequestCancelMatchacceptCancelMatchrefuseCancelMatchreportMapWinnerresolveUnfinishedMatchundoMatchReportundoMapReport
QStreamsRepository findAllActiveMatchPlayers
TeamRepository searchByNamefindAllMemberOfByUserIdfindByCustomUrlfindResultsByIdfindAllByMemberUserIdswitchOwnMainTeamdeleteByIdinsertOwnMembershiphandleMemberLeavingupdateRoster
TournamentAuditLogRepository findByTournamentId
TournamentRepository findByIdfindStreamsByTournamentIdfindTeamsFullByTournamentIdfindAllForShowcasefindTopThreeResultsByTournamentIds
TournamentMatchVodRepository findVodsByTournamentId
TournamentLFGRepository findLookingTeamsByTournamentIdfindSubGroups
TournamentMatchRepository findMatchByIdfindByTournamentTeamIdfindScheduleProposalsByMatchId
TournamentOrganizationRepository findBySlugfindByUserIdsearchByNamefindOneByIdfindEventsByMonthfindPaginatedEventsBySeriesfindAllBannedUsersByOrganizationId
TrophyRepository findByIdfindWinsByOwnerfindAllBackfillableTournaments
UserCardRepository findAllByUserIdsfindAllByUserIdsCachedfindCardEditExtrasByUserId
UserRepository findLayoutDataByIdfindProfileByUserIdfindWidgetsByUserIdfindByFriendCodefindLeanByIdfindModInfoByIdfindResultsByUserIdsearchsearchExact
VodRepository findByUserIdfindVodsfindVodById
VoiceRepository findLatestClientErrorsfindLatestFeedbackComments
//admin/admin/streams/admin/voice/api/api/chat/rooms/api/chat/rooms/:id/api/chat/rooms/:id/messages/api/layout/api/status/art/art/new/associations/badges/badges/:id/badges/:id/edit/builds/:slug/calendar/:id/calendar/:id/report-winners/calendar/new/events/friends/friends-for-adding/leaderboards/lfg/lfg/new/org/:id/org/:slug/org/:slug/edit/org/:slug/stats/org/new/plus/suggestions/plus/suggestions/comment/:tier/:userId/plus/suggestions/new/plus/voting/plus/voting/results/q/q/looking/q/match/:id/q/preparing/q/ready/q/streams/refresh-caches/scrims/scrims/:id/scrims/new/search/seed/sendouq/active-match/:userId/sendouq/match/:matchId/settings/t/:customUrl/t/:customUrl/t/:customUrl/edit/t/:customUrl/join/t/:customUrl/results/t/:customUrl/roster/t/:customUrl/schedule/t/new/team/:id/to/:id/to/:id/to/:id/admin/to/:id/admin/to/:id/admin/audit/to/:id/admin/brackets/to/:id/admin/import-teams/to/:id/admin/registration/:tid?/to/:id/admin/seeds/to/:id/admin/staff/to/:id/admin/stream/to/:id/brackets/to/:id/brackets/finalize/to/:id/info/to/:id/join/to/:id/looking/to/:id/matches/to/:id/matches/:mid/to/:id/register/to/:id/results/to/:id/rules/to/:id/streams/to/:id/teams/to/:id/teams/:tid/to/:id/teams/:tid/comps/tournament-match/:id/tournament/:id/tournament/:id/brackets/:bidx/tournament/:id/brackets/:bidx/standings/tournament/:id/seeds/tournament/:id/starting-brackets/tournament/:id/teams/tournament/:id/teams/:teamId/add-member/tournament/:id/teams/:teamId/remove-member/tournament/:id/teams/:teamId/update-member-ign/tournament/:id/teams/upsert/trophies/:id/trophies/:id/backfill/:seriesId/trophies/:id/wins/:userId/trophies/new/u/:identifier/u/:identifier/u/:identifier/admin/u/:identifier/art/u/:identifier/edit/u/:identifier/results/u/:identifier/results/highlights/u/:identifier/seasons/u/:identifier/seasons/u/:identifier/seasons/stats/u/:identifier/seasons/summary-graphic/u/:identifier/vods/user-card/:id/friendship/user-card/edit/user-report/:id/user/:userId/active-match/vods/vods/:id/vods/new
UserWeaponPool
Rows typed by UserWeaponPool
| Column | Type | Description |
|---|---|---|
userId | number → User | |
sortOrder | number | |
weaponSplId | MainWeaponId | |
isFavorite | Generated<DBBoolean> |
Used by 20 repository functions · 33 routes
LFGRepository findBoardPagefindVisibleByIdfindAllOwn
MatchProfileRepository findSettingsByUserIdfindWeaponPoolByUserIdupdateOwnMatchProfile
SQGroupRepository findCurrentGroups
SQMatchRepository findByIdcancelMatchrequestCancelMatchacceptCancelMatchrefuseCancelMatchreportMapWinnerresolveUnfinishedMatchundoMatchReportundoMapReport
TeamRepository findByCustomUrl
TournamentLFGRepository findLookingTeamsByTournamentIdfindSubGroups
UserRepository findBuildFieldsByUserId
//analyzer/api/layout/api/status/builds/friends/lfg/lfg/new/object-damage-calculator/q/q/looking/q/match/:id/q/preparing/q/ready/refresh-caches/seed/sendouq/active-match/:userId/sendouq/match/:matchId/settings/t/:customUrl/t/:customUrl/t/:customUrl/edit/t/:customUrl/join/t/:customUrl/results/t/:customUrl/roster/t/:customUrl/schedule/t/new/to/:id/looking/to/:id/matches/:mid/u/:identifier/u/:identifier/builds/user/:identifier/user/:userId/active-match
Relations (1)
erDiagram
direction LR
User ||--o{ UserWeaponPool : "userId"UserWidget
Rows typed by UserWidget
| Column | Type | Description |
|---|---|---|
userId | number → User | |
index | number | |
widget | JSONColumnType<StoredWidget> |
Used by 4 repository functions · 3 routes
PlusVotingRepository findAllUsersForVoting
UserRepository upsertWidgetsfindStoredWidgetsByUserIdfindWidgetsByUserId
Relations (1)
erDiagram
direction LR
User ||--o{ UserWidget : "userId"Video
VIEW over UnvalidatedVideo, excludes videos awaiting validation. Insert/update via UnvalidatedVideo.
View of UnvalidatedVideo
Rows typed by Video
| Column | Type | Description |
|---|---|---|
eventId | number | null | |
id | GeneratedAlways<number> | |
submitterUserId | number | |
title | string | |
type | (typeof videoMatchTypes)[number] | |
validatedAt | number | null | Never |
youtubePublishedAt | number | When the video was published on YouTube. Day precision only, stored as noon UTC of that day. |
youtubeId | string |
Used by 4 repository functions · 5 routes
VideoMatch
Rows typed by VideoMatch
| Column | Type | Description |
|---|---|---|
id | GeneratedAlways<number> | |
mode | ModeShort | |
stageId | StageId | |
startsAt | number | |
videoId | number → UnvalidatedVideo |
Used by 7 repository functions · 7 routes
UserRepository findLayoutDataById
VodRepository findByUserIdfindVodscountVodsfindVodByIdupdateinsert
/u/:identifier/u/:identifier/u/:identifier/admin/u/:identifier/vods/vods/vods/:id/vods/new
Relations (2)
erDiagram
direction LR
UnvalidatedVideo ||--o{ VideoMatch : "videoId"
VideoMatch ||--o{ VideoMatchPlayer : "videoMatchId"Referenced by VideoMatchPlayer.videoMatchId
VideoMatchPlayer
Rows typed by VideoMatchPlayer
| Column | Type | Description |
|---|---|---|
player | number | |
playerName | string | null | |
playerUserId | number | null → User | |
videoMatchId | number → VideoMatch | |
weaponSplId | number |
Used by 7 repository functions · 7 routes
UserRepository findLayoutDataById
VodRepository findByUserIdfindVodscountVodsfindVodByIdupdateinsert
/u/:identifier/u/:identifier/u/:identifier/admin/u/:identifier/vods/vods/vods/:id/vods/new
Relations (2)
erDiagram
direction LR
User |o--o{ VideoMatchPlayer : "playerUserId"
VideoMatch ||--o{ VideoMatchPlayer : "videoMatchId"VoiceClientError
Rows typed by VoiceClientError
| Column | Type | Description |
|---|---|---|
id | GeneratedAlways<number> | |
voiceSessionId | number | null → VoiceSession | |
userId | number → User | |
kind | VoiceClientErrorKind | |
detail | string | null | |
platform | VoicePlatform | |
createdAt | Generated<number> |
Used by 4 repository functions · 2 routes
VoiceRepository countClientErrorsSincefindLatestClientErrorsinsertOwnClientErrordeleteOlderThan
Relations (2)
erDiagram
direction LR
User ||--o{ VoiceClientError : "userId"
VoiceSession |o--o{ VoiceClientError : "voiceSessionId"VoiceFeedback
Rows typed by VoiceFeedback
| Column | Type | Description |
|---|---|---|
id | GeneratedAlways<number> | |
voiceSessionId | number → VoiceSession | |
userId | number → User | |
rating | number | 1-5 |
comment | string | null | |
createdAt | Generated<number> |
Used by 4 repository functions · 3 routes
VoiceRepository hasFeedbackSincecountRatingsSincefindLatestFeedbackCommentsinsertOwnFeedback
Relations (2)
erDiagram
direction LR
User ||--o{ VoiceFeedback : "userId"
VoiceSession ||--o| VoiceFeedback : "voiceSessionId"VoiceSession
Rows typed by VoiceSession
| Column | Type | Description |
|---|---|---|
id | GeneratedAlways<number> | |
roomId | number | null → ChatRoom |
|
roomType | ChatRoomType | |
userId | number → User | |
platform | VoicePlatform | |
eligibleMemberCount | number | Members of the room who could have joined voice when this session started based on voice chat settings. We need these to check for adoption. |
vcPreference | UserVoiceChat | The joiner's own voice chat setting ({@link User.vc}) when they joined. |
dailySessionId | string | null | |
createdAt | Generated<number> | |
connectedAt | number | null | |
leftAt | number | null | |
durationSeconds | number | null | Billed seconds in the call as reported by Daily, |
leaveReason | VoiceLeaveReason | null | |
networkQualityState | VoiceNetworkQualityState | null | |
lowQualitySeconds | Generated<number> | |
talkSeconds | Generated<number> | |
inputMode | VoiceInputMode | null |
Used by 17 repository functions · 5 routes
VoiceRepository sumParticipantMinutesSincehasBeenKickedfindOwnSessionByIdfindDailyAdoptionSincefindPlayerAdoptionSincefindVoiceChatPreferenceStatsSincefindPlatformStatsSincecountLeaveReasonsSincefindLatestFeedbackCommentsinsertOwnSessionmarkOwnSessionConnectedupdateOwnSessionSummarymarkOwnSessionLeftmarkSessionsLefthasOtherConnectedSessionupdateFromLeftWebhookdeleteOlderThan
/admin/voice/api/voice/rooms/:id/api/voice/telemetry/api/voice/webhook/q/looking
Relations (4)
erDiagram
direction LR
ChatRoom |o--o{ VoiceSession : "roomId"
User ||--o{ VoiceSession : "userId"
VoiceSession |o--o{ VoiceClientError : "voiceSessionId"
VoiceSession ||--o| VoiceFeedback : "voiceSessionId"Referenced by VoiceClientError.voiceSessionId, VoiceFeedback.voiceSessionId
VoiceSettings
Rows typed by VoiceSettings
| Column | Type | Description |
|---|---|---|
id | GeneratedAlways<number> | |
isDisabled | Generated<DBBoolean> | Manual kill switch. |
updatedAt | number | null | |
updatedByUserId | number | null → User |
Used by 2 repository functions · 2 routes
Relations (1)
erDiagram
direction LR
User |o--o{ VoiceSettings : "updatedByUserId"XRankPlacement
Rows typed by XRankPlacement
| Column | Type | Description |
|---|---|---|
badges | string | |
bannerSplId | number | |
id | GeneratedAlways<number> | |
mode | ModeShort | |
month | number | |
name | string | |
nameDiscriminator | string | |
playerId | number → SplatoonPlayer | |
power | number | |
rank | number | |
region | XRankPlacementRegion | |
title | string | |
weaponSplId | MainWeaponId | |
year | number |
Used by 22 repository functions · 24 routes
BuildRepository insertupdaterecalculateAllSortValues
LeaderboardRepository findAllXPLeaderboardfindModeXPLeaderboardfindWeaponXPLeaderboard
XRankPlacementRepository insertManydeleteAllByMonthYearfindPlacementsOfMonthfindPlacementsByPlayerIdfindPlacementsByUserIdfindAllMonthYearsfindPeaksByUserIdrefreshAllPeakXprefreshTenStarWeapons
TrophyRepository findByOwnerUserIdfindByOwnerUserIdIncludingHiddenfindXpWeaponCountsByIdsyncSpecialTrophies
UserCardRepository findAllByUserIdsfindAllByUserIdsCachedfindVerifiedXpByUserId
/admin/leaderboards/lfg/player/:id/plus/suggestions/plus/voting/q/looking/q/match/:id/q/ready/q/streams/scrims/scrims/:id/to/:id/admin/seeds/to/:id/looking/to/:id/matches/:mid/to/:id/streams/trophies/:id/trophies/:id/placements/:userId/trophies/:id/wins/:userId/u/:identifier/u/:identifier/builds/new/u/:identifier/edit/user-card/edit/xsearch
Relations (1)
erDiagram
direction LR
SplatoonPlayer ||--o{ XRankPlacement : "playerId"JSONColumnTypeNullableapp/utils/kysely.server.ts:409export type JSONColumnTypeNullable< SelectType extends object | string | number | null, > = ColumnType<SelectType | null, string | null, string | null>;
CustomThemeapp/db/tables-json.ts:28export type CustomTheme = Omit<Record<CustomThemeVar, number>, "--_chat-h"> & { "--_chat-h": number | null; };
UserMapModePreferencesapp/db/tables-json.ts:35export interface UserMapModePreferences { modes: Array<{ mode: ModeShort; /** Users opinion on the mode, `undefined` means neutral */ preference?: Preference; }>; pool: Array<{ mode: ModeShort; stages: StageId[]; }>; }
DBBooleanapp/db/tables.ts:94In SQLite booleans are presented as 0 (false) and 1 (true)
export type DBBoolean = 0 | 1;
MemberRoleapp/features/team/team-constants.ts:27export type MemberRole = (typeof TEAM_MEMBER_ROLES)[number]; export const TEAM_MEMBER_ROLES = [ "CAPTAIN", "CO_CAPTAIN", "FRONTLINE", "SLAYER", "SKIRMISHER", "SUPPORT", "MIDLINE", "BACKLINE", "FLEX", "SUB", "COACH", "CHEERLEADER", ] as const;
MemberRoleTypeapp/features/team/team-constants.ts:30Classifies how a team member's customRole should be treated.
export type MemberRoleType = "PLAYER" | "OTHER";
ApiTokenTypeapp/features/api/api-types.ts:1export type ApiTokenType = "read" | "write";
ModeShortapp/modules/in-game-lists/types.ts:11export type ModeShort = (typeof modesShort)[number]; export const modesShort = ["TW", "SZ", "TC", "RM", "CB"] as const;
BuildAbilitiesTupleapp/modules/in-game-lists/types.ts:29export type BuildAbilitiesTuple = [ head: [main: Ability, s1: Ability, s2: Ability, s3: Ability], clothes: [main: Ability, s1: Ability, s2: Ability, s3: Ability], shoes: [main: Ability, s1: Ability, s2: Ability, s3: Ability], ];
Abilityapp/modules/in-game-lists/types.ts:21export type Ability = (typeof abilities)[number]["name"]; export const abilities = [ { name: "ISM", type: "STACKABLE", abilityChunkTypesRequired: [] }, { name: "ISS", type: "STACKABLE", abilityChunkTypesRequired: [] }, { name: "IRU", type: "STACKABLE", abilityChunkTypesRequired: [] }, { name: "RSU", type: "STACKABLE", abilityChunkTypesRequired: [] }, { name: "SSU", type: "STACKABLE", abilityChunkTypesRequired: [] }, { name: "SCU", type: "STACKABLE", abilityChunkTypesRequired: [] }, { name: "SS", type: "STACKABLE", abilityChunkTypesRequired: [] }, { name: "SPU", type: "STACKABLE", abilityChunkTypesRequired: [] }, { name: "QR", type: "STACKABLE", abilityChunkTypesRequired: [] }, { name: "QSJ", type: "STACKABLE", abilityChunkTypesRequired: [] }, { name: "BRU", type: "STACKABLE", abilityChunkTypesRequired: [] }, { name: "RES", type: "STACKABLE", abilityChunkTypesRequired: [] }, { name: "SRU", type: "STACKABLE", abilityChunkTypesRequired: [] }, // …
MainWeaponIdapp/modules/in-game-lists/types.ts:25export type MainWeaponId = (typeof mainWeaponIds)[number]; export const mainWeaponIds = weaponCategories .flatMap((category) => category.weaponIds) .sort((a, b) => a - b);
CalendarEventTagapp/features/calendar/calendar-types.ts:8export type CalendarEventTag = keyof typeof tags; export const tags = { SPECIAL: { color: "#CE93D8", }, ART: { color: "#C158F6", }, MONEY: { color: "#96F29D", }, REGION: { color: "#FF8C8C", }, LOW: { // …
PersistedSystemMessageTypeapp/features/chat/chat-types.ts:33export type PersistedSystemMessageType = Extract< SystemMessageType, | "SCORE_REPORTED" | "SCORE_CONFIRMED" | "SCORE_DISPUTED" | "CANCEL_REPORTED" | "CANCEL_CONFIRMED" | "CANCEL_REFUSED" | "USER_LEFT" | "MAP_REPLAYED" | "MAP_PICKED" | "MAP_BANNED" | "MODE_PICKED" | "MODE_BANNED" // …
ChatRoomTypeapp/features/chat/chat-types.ts:5export type ChatRoomType = | "SQ_GROUP" | "SQ_MATCH" | "TOURNAMENT_MATCH" | "TOURNAMENT_TEAM" | "SCRIM";
TierNameapp/features/mmr/mmr-constants.ts:65export type TierName = (typeof TIERS)[number]["name"]; export const TIERS = [ { name: "LEVIATHAN", percentile: 5, }, { name: "DIAMOND", percentile: 10, }, { name: "PLATINUM", percentile: 15, }, { // …
DBTournamentMaplistSourceapp/modules/tournament-map-list-generator/types.ts:29{@link TournamentMaplistSource} as stored: a source type or the picking team's id as a string. See serializeMaplistSource/parseMaplistSource.
export type DBTournamentMaplistSource = | (typeof sourceTypes)[number] // the team id, kept plain `string` so it survives Kysely's JSON helpers rewriting `${number}` to `number` | (string & {}); export const sourceTypes = [ "DEFAULT", "RANDOM", "BOTH", "TO", "COUNTERPICK", "ROLL", ] as const;
StageIdapp/modules/in-game-lists/types.ts:15export type StageId = (typeof stageIds)[number]; export const stageIds = [ 0, // Scorch Gorge 1, // Eeltail Alley 2, // Hagglefish Market 3, // Undertow Spillway 4, // Mincemeat Metalworks 5, // Hammerhead Bridge 6, // Museum d'Alfonsino 7, // Mahi-Mahi Resort 8, // Inkblot Art Academy 9, // Sturgeon Shipyard 10, // MakoMart 11, // Wahoo World 12, // Flounder Heights // …
ScannerMatchapp/features/scanner/core/scanner-match.ts:111export interface ScannerMatch { /** whole seconds into the video/stream the match starts at */ startsAt: number | null; /** whole seconds into the video/stream the match was last seen at */ endsAt: number | null; /** wall-clock ms: a replay scoreboard's recording time, else the closing scoreboard's detection time; null on VoD scans */ playedAt: number | null; lobby: ScannerLobby | null; mode: ModeShort | null; stage: StageId | null; /** * the "Score:" banner game scores (0-100) in `teams` order from a * results/replay screen; a knockout's winner reports 100. Null when unseen. */ // …
SkillTeamIdentifierapp/features/mmr/mmr-utils.ts:77The four user ids of a full team, ascending and joined by -. Identifies a team across matches.
export type SkillTeamIdentifier = `${number}-${number}-${number}-${number}`;
LFGTypeapp/features/lfg/lfg-constants.ts:12export type LFGType = (typeof LFG_TYPES)[number]; export const LFG_TYPES = [ "PLAYER_FOR_TEAM", "PLAYER_FOR_COACH", "TEAM_FOR_PLAYER", "TEAM_FOR_COACH", "TEAM_FOR_SCRIM", "COACH_FOR_TEAM", ] as const;
UnifiedLanguageCodeapp/modules/i18n/config.ts:152export type UnifiedLanguageCode = (typeof languagesUnified)[number]["code"]; export const languagesUnified = [ { code: "da", name: "Dansk", }, { code: "de", name: "Deutsch", }, { code: "en", name: "English", }, { // …
StreamPlatformapp/features/live-streams/live-streams-constants.ts:3export type StreamPlatform = (typeof STREAM_PLATFORMS)[number]; export const STREAM_PLATFORMS = ["TWITCH", "YOUTUBE"] as const;
Notificationapp/features/notifications/notifications-types.ts:1export type Notification = | NotificationItem< "SQ_ADDED_TO_GROUP", { adderUsername: string; } > | NotificationItem<"SQ_READY_CHECK"> | NotificationItem< "SQ_NEW_MATCH", { matchId: number; } > // …
NotificationSubscriptionapp/db/tables-json.ts:216export interface NotificationSubscription { endpoint: string; keys: { auth: string; p256dh: string; }; }
AssociationVisibilityapp/features/associations/associations-types.ts:3export interface AssociationVisibility { forAssociation: AssociationIdentifier; notFoundInstructions?: Array<{ at: number; /** null = public */ forAssociation: AssociationIdentifier | null; }>; }
PeakXPapp/db/tables-json.ts:74export interface PeakXP { overall: number; takoroka: number | null; tentatek: number | null; }
SplatoonRotationTypeapp/features/splatoon-rotations/splatoon-rotations-constants.ts:3export type SplatoonRotationType = (typeof SPLATOON_ROTATION_TYPES)[number]; export const SPLATOON_ROTATION_TYPES = ["SERIES", "OPEN", "X"] as const;
RankedModeShortapp/modules/in-game-lists/types.ts:13export type RankedModeShort = Exclude<ModeShort, "TW">;
TournamentSettingsapp/db/tables-json.ts:80export interface TournamentSettings { bracketProgression: Progression.ParsedBracket[]; /** @deprecated use bracketProgression instead */ teamsPerGroup?: number; /** @deprecated use bracketProgression instead */ thirdPlaceMatch?: boolean; isRanked?: boolean; enableNoScreenToggle?: boolean; /** Enable the subs tab, default true */ enableSubs?: boolean; requireInGameNames?: boolean; isInvitational?: boolean; /** Can teams add subs on their own while tournament is in progress? */ autonomousSubs?: boolean; // …
TournamentMapPickingStyleapp/features/tournament/tournament-constants.ts:54AUTO = teams pick map pools ahead and each round's map list is made automatically, TO = the TO picks the maps.
export type TournamentMapPickingStyle = "TO" | "AUTO";
PreparedMapsapp/db/tables-json.ts:141export interface PreparedMaps { authorId: number; createdAt: number; /** Keyed by the local round ids of the bracket preview the maps were picked against; groups share one map list per round number. */ maps: Array< TournamentRoundMaps & { roundId: number; section: TournamentRoundSection | null; /** Leagues: when the round's sets are playable from, so sibling divisions start with the same times. */ isPlayableAt?: number | null; } >; eliminationTeamCount?: number; }
CastAccountapp/db/tables-json.ts:119Official cast channel of a tournament.
export interface CastAccount extends StreamAccount { /** Shown in place of `account`, which for YouTube is a channel id. */ name: string; }
CastedMatchesInfoapp/db/tables-json.ts:126export interface CastedMatchesInfo { /** Matches locked because they are pending to be casted */ lockedMatches: CastedMatch[]; castedMatches: CastedMatch[]; castedMatchHistory?: Array<CastedMatch & { timestamp: number }>; }
SeedingSnapshotapp/db/tables-json.ts:133export interface SeedingSnapshot { savedAt: number; teams: Array<{ teamId: number; members: Array<{ userId: number; username: string }>; }>; }
TournamentTierNumberapp/features/tournament/core/tiering.ts:49export type TournamentTierNumber = (typeof TIER_TO_NUMBER)[TournamentTier]; export const TIER_TO_NUMBER = { X: 1, "S+": 2, S: 3, "A+": 4, A: 5, "B+": 6, B: 7, "C+": 8, C: 9, } as const;
TournamentAuditLogTypeapp/features/tournament/tournament-constants.ts:78export type TournamentAuditLogType = (typeof TOURNAMENT_AUDIT_LOG_TYPES)[number]; export const TOURNAMENT_AUDIT_LOG_TYPES = [ "MEMBER_ADDED", "MEMBER_REMOVED", "TEAM_REGISTERED", "TEAM_UNREGISTERED", "TEAM_CHECKED_IN", "TEAM_CHECKED_OUT", "TEAM_DROPPED_OUT", "TEAM_DROP_OUT_UNDONE", "UPDATE_IN_GAME_NAME", "UPDATE_TOURNAMENT_NAME", ] as const;
TournamentAuditLogMetadataapp/db/tables-json.ts:205export interface TournamentAuditLogMetadata { bracketIdx?: number; /** The new in-game name, for `UPDATE_IN_GAME_NAME` events. */ inGameName?: string; /** The new tournament name, for `UPDATE_TOURNAMENT_NAME` events. `null` = it was cleared. */ tournamentName?: string | null; }
ParticipantResultapp/features/tournament-bracket/core/engine/types.ts:62export interface ParticipantResult { /** `null` = to be determined (source match unfinished). */ id: number | null; /** Seed position this slot was filled from. */ position?: number; score?: number; /** KO win count this set, aggregated on hydrate. */ totalKos?: number; }
Sideapp/features/tournament-bracket/core/engine/types.ts:9No draw side: draws are impossible in our formats.
export type Side = "opponent1" | "opponent2";
TournamentOrganizationRoleapp/features/tournament-organization/tournament-organization-constants.ts:22export type TournamentOrganizationRole = (typeof TOURNAMENT_ORGANIZATION_ROLES)[number]; export const TOURNAMENT_ORGANIZATION_ROLES = [ "ADMIN", "MEMBER", "ORGANIZER", "STREAMER", ] as const;
WinLossParticipationArrayapp/db/tables-json.ts:214E.g. ["W", "L", null] = won the first set, lost the second, did not play the third.
export type WinLossParticipationArray = Array<"W" | "L" | null>;
TournamentRoundSectionapp/features/tournament/tournament-constants.ts:51export type TournamentRoundSection = (typeof TOURNAMENT_ROUND_SECTIONS)[number]; export const TOURNAMENT_ROUND_SECTIONS = [ "winners", "losers", "finals", ] as const;
TournamentRoundMapsapp/db/tables-json.ts:156export interface TournamentRoundMaps { list?: Array<{ mode: ModeShort; stageId: StageId }> | null; /** Fixed mode of each slot of a team picked round with a mode pattern, the maps still come from the teams' picks. `count + 2` long for "BAN_2". */ modes?: ModeShort[] | null; count: number; type: "BEST_OF" | "PLAY_ALL"; pickBan?: PickBan.Type | null; customFlow?: CustomPickBanFlow | null; }
TournamentStaffRoleapp/features/tournament/tournament-constants.ts:63export type TournamentStaffRole = (typeof TOURNAMENT_STAFF_ROLES)[number]; export const TOURNAMENT_STAFF_ROLES = ["ORGANIZER", "STREAMER"] as const;
StageSettingsapp/features/tournament-bracket/core/engine/types.ts:36Same shape as what is persisted in TournamentStage.settings.
export interface StageSettings { /** Number of groups in a round robin or swiss stage, or in a single or double elimination stage split into groups. */ groupCount?: number; /** Elimination rounds not created, see `SkippedRounds`. */ skippedRounds?: SkippableRound[]; /** Number of rounds in a swiss stage. */ roundCount?: number; /** Bipartite round-robin: teams split into A/B divisions, every match pairs an A team with a B team. */ hasAbDivisions?: boolean; /** // …
TOURNAMENT_STAGE_TYPESapp/features/tournament/tournament-constants.ts:37export const TOURNAMENT_STAGE_TYPES = [ "single_elimination", "double_elimination", "round_robin", "swiss", ] as const;
videoMatchTypesapp/features/vods/vods-constants.ts:2Types UnvalidatedVideo.type.
export const videoMatchTypes = [ "TOURNAMENT", "CAST", "SCRIM", "MATCHMAKING", "SENDOUQ", ] as const;
Pronounsapp/db/tables-json.ts:69export type Pronouns = { subject: SubjectPronoun; object: ObjectPronoun; };
UserVoiceChatapp/db/tables.ts:1249export type UserVoiceChat = "YES" | "NO" | "LISTEN_ONLY";
WeaponPoolEntryapp/db/tables-json.ts:47export interface WeaponPoolEntry { weaponSplId: MainWeaponId; isFavorite: DBBoolean; }
BuildSortapp/features/user-page/user-page-constants.ts:81export type BuildSort = (typeof BUILD_SORT_IDENTIFIERS)[number]; export const BUILD_SORT_IDENTIFIERS = [ "UPDATED_AT", "TOP_500", "WEAPON_POOL", "WEAPON_IN_GAME_ORDER", "ALPHABETICAL_TITLE", "MODE", "HEADGEAR_ID", "CLOTHES_ID", "SHOES_ID", "PUBLIC_BUILD", "PRIVATE_BUILD", ] as const;
UserPreferencesapp/db/tables-json.ts:52export interface UserPreferences { disableBuildAbilitySorting?: boolean; disallowScrimPickupsFromUntrusted?: boolean; defaultCalendarFilters?: CalendarFilters; defaultScrimsFilters?: ScrimFilters; /** "auto" (default) = browser default */ clockFormat?: "24h" | "12h" | "auto"; /** Hides recent tournament results and scores until revealed */ spoilerFreeMode?: boolean; weaponReportDefaultOpen?: boolean; voicePushToTalk?: boolean; /** Start of the week the schedule sidebar nudge was last dismissed for, so it stays gone until the horizon rolls over. */ scheduleNudgeDismissedWeekStartsAt?: number; /** Who may see the user's schedule. Missing = everyone. Once set it is an allow-list, so a team joined later stays hidden until added. */ // …
HideableUserCardStatapp/features/user-card/user-card-types.ts:65export type HideableUserCardStat = Extract<UserCardStat["type"], "XP" | "DIV">;
XRankPlacementRegionapp/features/top-search/top-search-types.ts:2WEST = Tentatek division, JPN = Takoroka division.
export type XRankPlacementRegion = "WEST" | "JPN";
UserReportCategoryapp/features/user-report/user-report-constants.ts:17export type UserReportCategory = (typeof USER_REPORT_CATEGORIES)[number]; export const USER_REPORT_CATEGORIES = [ "INAPPROPRIATE_CONTENT", "ALTING", "HARASSMENT", "CHEATING", "OTHER", ] as const;
StoredWidgetapp/features/user-page/core/widgets/types.ts:16export type StoredWidget = { [K in WidgetUnion as K["id"]]: { id: K["id"]; } & (ExtractSchema<K> extends never ? { settings?: never } : { settings: v.InferOutput<ExtractSchema<K>> }); }[WidgetUnion["id"]];
VoiceClientErrorKindapp/features/voice/voice-constants.ts:44export type VoiceClientErrorKind = (typeof VOICE_CLIENT_ERROR_KINDS)[number]; export const VOICE_CLIENT_ERROR_KINDS = [ "MIC_DENIED", "MIC_NOT_FOUND", "AUTOPLAY_BLOCKED", "JOIN_FAILED", ] as const;
VoicePlatformapp/features/voice/voice-constants.ts:25export type VoicePlatform = (typeof VOICE_PLATFORMS)[number]; export const VOICE_PLATFORMS = ["DESKTOP", "ANDROID", "IOS"] as const;
VoiceLeaveReasonapp/features/voice/voice-constants.ts:36export type VoiceLeaveReason = (typeof VOICE_LEAVE_REASONS)[number]; export const VOICE_LEAVE_REASONS = [ "LEFT", "PAGE_CLOSED", "KICKED", "EJECTED", "TOKEN_EXPIRED", "CONNECTION_LOST", "REPLACED", ] as const;
VoiceNetworkQualityStateapp/features/voice/voice-constants.ts:56export type VoiceNetworkQualityState = (typeof VOICE_NETWORK_QUALITY_STATES)[number]; export const VOICE_NETWORK_QUALITY_STATES = [ "good", "warning", "bad", "unknown", ] as const;
VoiceInputModeapp/features/voice/voice-constants.ts:47export type VoiceInputMode = (typeof VOICE_INPUT_MODES)[number]; export const VOICE_INPUT_MODES = ["PUSH_TO_TALK", "OPEN_MIC"] as const;