MatchRoom entity represents a head-to-head match in the elimination stage of the tournament. Each match has two teams, a referee, and tracks the pick/ban phase and match results.
Class Definition
Namespace:ss.Internal.Management.Server.AutoRef
Table: match_rooms
Source: /home/daytona/workspace/source/ss.Integrated.Management.Server/Database/Models.cs:125
Properties
The unique identifier for the match (e.g., “A1”, “C2”, “GF1”).Column:
id (Primary Key)Foreign key reference to the Round that governs this match’s rules and map pool.Column:
round_idRelationship: Many-to-one with RoundForeign key to the User representing the red team.Column:
team_red_idRelationship: Many-to-one with UserForeign key to the User representing the blue team.Column:
team_blue_idRelationship: Many-to-one with UserThe ID of the referee assigned to manage this match. Nullable if no referee is assigned yet.Column:
referee_idRelationship: Many-to-one with RefereeInfoThe scheduled start time for the match in UTC. Nullable if not yet scheduled.Column:
start_timeThe actual end time of the match in UTC. Set when the match concludes.Column:
end_timeJSON-stored list of maps banned during the pick/ban phase.Each entry records which team banned which map slot.Column:
banned_mapsStorage: JSON arrayJSON-stored list of maps picked during the match.Each entry records which team picked the map, and optionally which team won it.Column:
picked_mapsStorage: JSON arrayThe numerical ID of the Bancho Match History.Used to construct the URL:
https://osu.ppy.sh/community/matches/{MpLinkId}Column: mp_link_idNavigation Properties
Navigation property to the Round entity that defines this match’s rules.
Navigation property to the User representing the red team.
Navigation property to the User representing the blue team.
Navigation property to the RefereeInfo entity assigned to manage this match.
JSON-Stored Fields
RoundChoice Structure
BothBannedMaps and PickedMaps use the RoundChoice type:
Usage Examples
Creating a Match
Recording Picks and Bans
Querying with Relationships
Related Models
- Round - Defines the rules and map pool
- User - Team participants
- RefereeInfo - Match referee
- ScoreResults - Individual map scores