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

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

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

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

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

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

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

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

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

  @Column({ type: 'timestamptz', nullable: true })
  paidAt!: Date | null;
}
