/**
 * Domain Entity: Payment
 */

export enum PaymentType {
  SPONSORSHIP = 'sponsorship',
  MEMBERSHIP_FEE = 'membership_fee',
}

export enum PayerType {
  SPONSOR = 'sponsor',
  DRIVER = 'driver',
}

export enum PaymentStatus {
  PENDING = 'pending',
  COMPLETED = 'completed',
  FAILED = 'failed',
  REFUNDED = 'refunded',
}

export interface Payment {
  id: string;
  type: PaymentType;
  amount: number;
  platformFee: number;
  netAmount: number;
  payerId: string;
  payerType: PayerType;
  leagueId: string;
  seasonId?: string;
  status: PaymentStatus;
  createdAt: Date;
  completedAt?: Date;
}