...
Accumulation properties specify when the Sanction
is applicable and behaviour properties specify what the resulting Suspension
will be defined as.
Any sanction within the same sanction group counts as an offence. Ex. the second sanction you get within the group results in Offence #2.
Blue properties to be added with automation.
Property | Type | Description |
---|---|---|
id | uuid | |
seasonId | stringSeason | 2024-25 |
name | string | With i18n |
code | string | Usually the rule number or an accumulation code |
officeId | id | |
parentId | id | Optional - To override parent sanctions |
sectionId | id | Physical Fouls |
externalId | uuid | For syncing with Spordle ID |
Accumulation | ||
positionGroups | enum[] | Optional - Applicable to players or bench staff |
accumulationCount | number | Priority precedence order for accumulations |
SanctionRuleOption
List of rule options that may trigger a sanction
Property | Type | Description |
---|---|---|
id | uuid | |
sanctionId | id | |
optionId | id |
SanctionOffense
Number of match or days require to serve
Property | Type | Description |
---|---|---|
id | uuid | |
sanctionId | id | |
offense | number | 1, 2, 3 |
Behaviour | ||
|
|
|
totalGames | number |
Total games required |
to serve (null → indefinite) | ||
endTotalGames | number | Optional - Total games required to serve when end of game or overtime |
(will hardcode to last 10 minutes for now) (undefined → fall back to totalGames, null → indefinite) | ||
injuryTotalGames | number | Optional - Total games required to serve when penalty has an injury (undefined → fall back to totalGames, null → indefinite) |
Accumulation | ||
positionGroups | enum[] | Optional - Applicable to players or bench staff |
accumulationCount | Default to 1 | |
|
|
|
|
|
|
|
|
|
SanctionMember
List of infractions that may trigger a sanction
Property
Description
id
uuid
sanctionId
id
infractionId
id
Settings Models
OfficeBreak
...
Property | Type | Description |
---|---|---|
id | uuid | |
seasonId | enum | |
type | enum | Sanctions, Scheduling |
startDate | date | |
endDate | date | |
officeId | id | |
categoryIds | id[] | Optionally specify which categories it applies to |
SanctionRatio
BC Hockey defines a ratio generally, not per game, so it might be better to do the same. When games is undefined, it will serve as the default case and serve as a n:m ratio
Property | Type | Description |
---|---|---|
id | uuid | |
seasonId | enum | |
games | number | Optional - Number of games the accumulation requires |
days | number | Number of days |
officeId | id |
OfficeSettings
Office settings that affect general suspension behaviour
Property | Type | Description |
---|---|---|
| number | Number of minutes before the end of the game when Hockey Canada defines this as 10 minutes; QC defines this as 5 minutes |
suspensionActivation | enum |
...
Property | Type | Description |
---|---|---|
id | uuid | |
gameId | id | Game the suspension originated in |
participantId | id | Participant that was suspended |
teamId | id | Team that the participant is suspended in |
penaltyId | id | Penalty that resulted in the suspension |
positionGroup | enum | Position that this participant was suspended in. Player, Staff |
sanctionId | id | Sanction that was determined by the rulebook sanction rules |
sanctionOffenseId | id | Is this necessary? |
durationType | enum | Definite or Indefinite. This is required to be the same as the sanction duration |
requiredGames | number | Number of games required to complete the suspension. Optional when Indefinite duration type, but may be set with it |
expiry | date | Optional - Date when the suspension will expire if the games requirement isn’t met |
status | enum | Pending, Appealed, Active, Completed, Cancelled, Expired |
externalId | uuid | For syncing with Spordle ID |
Legacy suspension options (deprecated) | ||
| enum | Deprecated, replaced by sanctionId |
...
Implementation
Unhardcoding
Status | ||||
---|---|---|---|---|
|
...