website refactor
This commit is contained in:
@@ -4,7 +4,7 @@
|
||||
* Represents the scoring configuration for a league season.
|
||||
*/
|
||||
|
||||
import type { Entity } from '@core/shared/domain/Entity';
|
||||
import { Entity } from '@core/shared/domain/Entity';
|
||||
import { RacingDomainValidationError } from '../errors/RacingDomainError';
|
||||
import type { ChampionshipConfig } from '../types/ChampionshipConfig';
|
||||
import { LeagueScoringConfigId } from './LeagueScoringConfigId';
|
||||
@@ -25,8 +25,7 @@ export interface LeagueScoringConfigRehydrateProps {
|
||||
championships: ChampionshipConfig[];
|
||||
}
|
||||
|
||||
export class LeagueScoringConfig implements Entity<LeagueScoringConfigId> {
|
||||
readonly id: LeagueScoringConfigId;
|
||||
export class LeagueScoringConfig extends Entity<LeagueScoringConfigId> {
|
||||
readonly seasonId: SeasonId;
|
||||
readonly scoringPresetId: ScoringPresetId | undefined;
|
||||
readonly championships: ChampionshipConfig[];
|
||||
@@ -37,7 +36,8 @@ export class LeagueScoringConfig implements Entity<LeagueScoringConfigId> {
|
||||
scoringPresetId?: ScoringPresetId;
|
||||
championships: ChampionshipConfig[];
|
||||
}) {
|
||||
this.id = props.id;
|
||||
super(props.id);
|
||||
|
||||
this.seasonId = props.seasonId;
|
||||
this.scoringPresetId = props.scoringPresetId;
|
||||
this.championships = props.championships;
|
||||
|
||||
Reference in New Issue
Block a user