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

@Entity('job_applications')
export class JobApplications {
  @PrimaryGeneratedColumn()
  id: number;

  @Column()
  job_post_id: number;

  @Column()
  seeker_id: number;

  @Column({ nullable: true })
  cover_letter: string;

  @Column({
    type: 'enum',
    enum: ['Applied', 'Shortlisted', 'Interview', 'Hired', 'Rejected'],
    default: 'Applied',
  })
  status: string;

  @Column({ nullable: true })
  resume_id: number;

  @CreateDateColumn()
  applied_at: Date;
}
