import {
  Entity,
  PrimaryGeneratedColumn,
  Column,
  CreateDateColumn,
} from 'typeorm';
// import { JobPosts } from '../../job-posts/entities/job-posts.entity';

@Entity('job_views')
export class JobViews {
  @PrimaryGeneratedColumn()
  id: number;

  @Column({ name: 'job_post_id' })
  jobPostId: number;

  @Column({ name: 'viewer_id', nullable: true })
  viewerId: number;

  @CreateDateColumn({ name: 'viewed_at' })
  viewedAt: Date;

  // @ManyToOne(() => JobPosts, { onDelete: 'CASCADE' })
  // @JoinColumn({ name: 'job_post_id' })
  // jobPost: JobPosts;
}
