import { Column, Entity, Index, PrimaryColumn } from 'typeorm';

@Entity({ name: 'payments_wallets' })
export class PaymentsWalletOrmEntity {
  @PrimaryColumn({ type: 'text' })
  id!: string;

  @Index({ unique: true })
  @Column({ type: 'text' })
  leagueId!: string;

  @Column({ type: 'double precision', default: 0 })
  balance!: number;

  @Column({ type: 'double precision', default: 0 })
  totalRevenue!: number;

  @Column({ type: 'double precision', default: 0 })
  totalPlatformFees!: number;

  @Column({ type: 'double precision', default: 0 })
  totalWithdrawn!: number;

  @Column({ type: 'text' })
  currency!: string;

  @Column({ type: 'timestamptz' })
  createdAt!: Date;
}
