Schema
A Schedule
can essentially be described as a “folder” for games. This deviates somewhat from how other systems categorize games using “sub-seasons”, but it’s more or less the same concept with a somewhat confusing name and additional structure.
...
Property | Type | Values | Example |
---|---|---|---|
Name
| text | Female U15A Playoffs | Female U15A Playoffs |
Season
| enum |
| 2021-22 |
Office
| fk to Office | (from db) | 785 (PCAHA Female) |
Type
| enum |
| Playoffs |
Division1
| enum |
| U15 |
Gender1
| enum |
| Female |
Category1
| enum |
| A |
Start Date
| date | 2022-01-31 | |
End Date
| date | 2022-03-06 |
...
2 Worth noting that when designing schedules, an assumption made was that associations could have multiple tournaments for a single division. In practice, this doesn’t seem to be the case, but this design would allow for this. e.g., Kamloops could have a U13C tournament at the start and end of the season, but in practice they’ll have a U13C tournament in the fall and a U15C tournament in the winter, if not concurrently. Downside of this design is you have to create two separate schedules in this scenario, so you can’t link to a single page for an event like this.
3 These are hardcoded enum values and will need to be aligned with SID soon to allow flexibility for multi-sports.
Relations
Office
A schedule belongs to a single Office. An office does not have any concept of division/gender/category, which generally is defined by a schedule or team belonging to the office, and further enforced by permissions which may be limited in this way.
...
Note: the office and schedule type may have an impact on assigning. Rules can be configured to assign tournaments by the schedule office (tournaments are typically assigned by the host association) and another rule can be configured to schedule league games based on the arena office. This is a whole design doc in itself.
Teams
A schedule is essentially the table above, and it also has a many-to-many relation with Teams through ScheduleTeam
s. This is presented on the teams tab of the schedule page, which is the second step when creating a schedule.
...
When adding a team, any team within the tenant may be added, the user is not limited by the schedule attributes and there is nothing stopping them from adding a U9C team to a U15A schedule if they really wanted.
Games
A game belongs to a single schedule, and it’s stats affect that schedule.
...
When entering a game, the list of teams is limited to the teams related to the schedule. The venue is currently not limited, but it theoretically could be limited based on the arena office relations.
Scoresheet
A scoresheet has a 1:1 relation with a game. Nothing special to note here wrt scheduling.
Stats
Stats belong to either a game or a schedule and need to be queried through a schedule. Currently game stats are not publicly exposed.
...