website refactor
This commit is contained in:
@@ -6,7 +6,7 @@
|
||||
*/
|
||||
|
||||
import { MediaReference } from '@core/domain/media/MediaReference';
|
||||
import type { Entity } from '@core/shared/domain/Entity';
|
||||
import { Entity } from '@core/shared/domain/Entity';
|
||||
import { RacingDomainInvariantError, RacingDomainValidationError } from '../errors/RacingDomainError';
|
||||
import { LeagueVisibility, LeagueVisibilityType } from '../value-objects/LeagueVisibility';
|
||||
import { MaxParticipants } from '../value-objects/MaxParticipants';
|
||||
@@ -91,8 +91,7 @@ export interface LeagueSettings {
|
||||
visibility?: LeagueVisibilityType;
|
||||
}
|
||||
|
||||
export class League implements Entity<LeagueId> {
|
||||
readonly id: LeagueId;
|
||||
export class League extends Entity<LeagueId> {
|
||||
readonly name: LeagueName;
|
||||
readonly description: LeagueDescription;
|
||||
readonly ownerId: LeagueOwnerId;
|
||||
@@ -119,7 +118,8 @@ export class League implements Entity<LeagueId> {
|
||||
visibility: LeagueVisibility;
|
||||
logoRef: MediaReference;
|
||||
}) {
|
||||
this.id = props.id;
|
||||
super(props.id);
|
||||
|
||||
this.name = props.name;
|
||||
this.description = props.description;
|
||||
this.ownerId = props.ownerId;
|
||||
|
||||
Reference in New Issue
Block a user