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

@Entity('jobs_post_tag')
export class JobsPostTag {
  @PrimaryGeneratedColumn()
  id: number;

  @Column({ type: 'int', nullable: false })
  job_post_id: number;

  @Column({ type: 'int', nullable: false })
  tag_id: number;

  @Column({
    type: 'timestamp',
    nullable: false,
    default: () => 'CURRENT_TIMESTAMP',
  })
  created_at: Date;

  @Column({
    type: 'timestamp',
    nullable: false,
    default: () => 'CURRENT_TIMESTAMP',
    onUpdate: 'CURRENT_TIMESTAMP',
  })
  updated_at: Date;
}
