website refactor
This commit is contained in:
@@ -2,12 +2,12 @@
|
||||
* Domain Entity: Team
|
||||
*
|
||||
* Represents a racing team in the GridPilot platform.
|
||||
* Implements the shared IEntity<string> contract and encapsulates
|
||||
* Implements the shared Entity<string> contract and encapsulates
|
||||
* basic invariants around identity and core properties.
|
||||
*/
|
||||
|
||||
import { MediaReference } from '@core/domain/media/MediaReference';
|
||||
import type { Entity } from '@core/shared/domain/Entity';
|
||||
import { Entity } from '@core/shared/domain/Entity';
|
||||
import { RacingDomainValidationError } from '../errors/RacingDomainError';
|
||||
import { TeamCreatedAt } from '../value-objects/TeamCreatedAt';
|
||||
import { TeamDescription } from '../value-objects/TeamDescription';
|
||||
@@ -16,8 +16,7 @@ import { TeamTag } from '../value-objects/TeamTag';
|
||||
import { DriverId } from './DriverId';
|
||||
import { LeagueId } from './LeagueId';
|
||||
|
||||
export class Team implements Entity<string> {
|
||||
readonly id: string;
|
||||
export class Team extends Entity<string> {
|
||||
readonly name: TeamName;
|
||||
readonly tag: TeamTag;
|
||||
readonly description: TeamDescription;
|
||||
@@ -40,7 +39,8 @@ export class Team implements Entity<string> {
|
||||
createdAt: TeamCreatedAt;
|
||||
logoRef: MediaReference;
|
||||
}) {
|
||||
this.id = props.id;
|
||||
super(props.id);
|
||||
|
||||
this.name = props.name;
|
||||
this.tag = props.tag;
|
||||
this.description = props.description;
|
||||
|
||||
Reference in New Issue
Block a user