import { Entity, Column, PrimaryGeneratedColumn, CreateDateColumn } from 'typeorm';

@Entity('ofac_screenings')
export class OfacScreening {
  @PrimaryGeneratedColumn('uuid') id: string;
  @Column({ name: 'user_id', type: 'uuid' }) userId: string;
  @Column({ name: 'screened_name', type: 'varchar', length: 200 }) screenedName: string;
  @Column({ name: 'match_score', type: 'numeric', precision: 5, scale: 2, default: '0' }) matchScore: string;
  @Column({ name: 'is_match', type: 'boolean', default: false }) isMatch: boolean;
  @Column({ type: 'jsonb', nullable: true }) details: Record<string, any> | null;
  @Column({ type: 'varchar', length: 50, default: 'clear' }) result: string;
  @CreateDateColumn({ name: 'screened_at', type: 'timestamptz' }) screenedAt: Date;
}
