website refactor
This commit is contained in:
@@ -4,7 +4,7 @@
|
||||
* Represents a prize awarded to a driver for a specific position in a season.
|
||||
*/
|
||||
|
||||
import type { Entity } from '@core/shared/domain/Entity';
|
||||
import { Entity } from '@core/shared/domain/Entity';
|
||||
import { RacingDomainInvariantError, RacingDomainValidationError } from '../../errors/RacingDomainError';
|
||||
|
||||
import type { Money } from '../../value-objects/Money';
|
||||
@@ -27,8 +27,7 @@ export interface PrizeProps {
|
||||
description: string | undefined;
|
||||
}
|
||||
|
||||
export class Prize implements Entity<PrizeId> {
|
||||
readonly id: PrizeId;
|
||||
export class Prize extends Entity<PrizeId> {
|
||||
readonly seasonId: SeasonId;
|
||||
readonly position: Position;
|
||||
readonly amount: Money;
|
||||
@@ -40,7 +39,8 @@ export class Prize implements Entity<PrizeId> {
|
||||
readonly description: string | undefined;
|
||||
|
||||
private constructor(props: PrizeProps) {
|
||||
this.id = props.id;
|
||||
super(props.id);
|
||||
|
||||
this.seasonId = props.seasonId;
|
||||
this.position = props.position;
|
||||
this.amount = props.amount;
|
||||
|
||||
Reference in New Issue
Block a user