import {
  Entity,
  PrimaryGeneratedColumn,
  Column,
  CreateDateColumn,
  ManyToOne,
  JoinColumn,
} from 'typeorm';
import { QuestionBank } from '../../question_bank/entities/question_bank.entity';

@Entity('question_revision_log')
export class QuestionRevisionLog {
  @PrimaryGeneratedColumn()
  id: number;

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

  @Column({ type: 'json' })
  prev_snapshot: any;

  @Column({ type: 'json', nullable: true })
  new_snapshot: any;

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

  @CreateDateColumn()
  created_at: Date;
}
