website refactor
This commit is contained in:
@@ -5,7 +5,7 @@
|
||||
* Aggregate root for managing league finances and transactions.
|
||||
*/
|
||||
|
||||
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';
|
||||
@@ -21,15 +21,15 @@ export interface LeagueWalletProps {
|
||||
createdAt: Date;
|
||||
}
|
||||
|
||||
export class LeagueWallet implements Entity<LeagueWalletId> {
|
||||
readonly id: LeagueWalletId;
|
||||
export class LeagueWallet extends Entity<LeagueWalletId> {
|
||||
readonly leagueId: LeagueId;
|
||||
readonly balance: Money;
|
||||
readonly transactionIds: TransactionId[];
|
||||
readonly createdAt: Date;
|
||||
|
||||
private constructor(props: LeagueWalletProps) {
|
||||
this.id = props.id;
|
||||
super(props.id);
|
||||
|
||||
this.leagueId = props.leagueId;
|
||||
this.balance = props.balance;
|
||||
this.transactionIds = props.transactionIds;
|
||||
|
||||
Reference in New Issue
Block a user