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

@Entity('recruiter_verifications')
export class RecruiterVerification {
  @PrimaryGeneratedColumn()
  id: number;

  @Column({ type: 'int' })
  user_id: number;

  @Column({ type: 'int' })
  company_id: number;

  @Column({ type: 'varchar', length: 50, nullable: true })
  cin_number: string;

  @Column({ type: 'varchar', length: 50, nullable: true })
  gst_number: string;

  @Column({
    type: 'enum',
    enum: ['pending', 'approved', 'rejected'],
    default: 'pending',
  })
  status: 'pending' | 'approved' | 'rejected';

  @Column({ type: 'text', nullable: true })
  remarks: string;

  @Column({ type: 'int', nullable: true })
  reviewed_by: number;

  @Column({ type: 'timestamp', nullable: true })
  reviewed_at: Date;

  @Column({ type: 'boolean', default: false })
  is_franchise_added: boolean;

  @Column({ type: 'int', nullable: true })
  franchise_id: number;

  @CreateDateColumn()
  created_at: Date;

  @UpdateDateColumn()
  updated_at: Date;
}
