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

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

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

  @Column({ type: 'text', nullable: true })
  seasonId!: string | null;

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

  @Column({ type: 'double precision' })
  amount!: number;

  @Column({ type: 'boolean' })
  enabled!: boolean;

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

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