37 lines
678 B
TypeScript
37 lines
678 B
TypeScript
/**
|
|
* Domain Entity: Wallet
|
|
*/
|
|
|
|
export interface Wallet {
|
|
id: string;
|
|
leagueId: string;
|
|
balance: number;
|
|
totalRevenue: number;
|
|
totalPlatformFees: number;
|
|
totalWithdrawn: number;
|
|
currency: string;
|
|
createdAt: Date;
|
|
}
|
|
|
|
export enum TransactionType {
|
|
DEPOSIT = 'deposit',
|
|
WITHDRAWAL = 'withdrawal',
|
|
PLATFORM_FEE = 'platform_fee',
|
|
}
|
|
|
|
export enum ReferenceType {
|
|
SPONSORSHIP = 'sponsorship',
|
|
MEMBERSHIP_FEE = 'membership_fee',
|
|
PRIZE = 'prize',
|
|
}
|
|
|
|
export interface Transaction {
|
|
id: string;
|
|
walletId: string;
|
|
type: TransactionType;
|
|
amount: number;
|
|
description: string;
|
|
referenceId?: string;
|
|
referenceType?: ReferenceType;
|
|
createdAt: Date;
|
|
} |