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

@Entity('sar_reports')
export class SarReport {
  @PrimaryGeneratedColumn('uuid') id: string;
  @Column({ name: 'alert_id', type: 'uuid' }) alertId: string;
  @Column({ name: 'user_id', type: 'uuid' }) userId: string;
  @Column({ name: 'report_type', type: 'varchar', length: 50 }) reportType: string;
  @Column({ type: 'text' }) narrative: string;
  @Column({ name: 'filing_status', type: 'varchar', length: 20, default: 'draft' }) filingStatus: string;
  @Column({ name: 'filed_at', type: 'timestamptz', nullable: true }) filedAt: Date | null;
  @Column({ name: 'fincen_reference', type: 'varchar', length: 100, nullable: true }) fincenReference: string | null;
  @CreateDateColumn({ name: 'created_at', type: 'timestamptz' }) createdAt: Date;
}
