import { IncrementIdEntity } from 'src/common/entities/increment-id.entity';
import { Column, Entity } from 'typeorm';

/**
 * 在线考试历史
 */
@Entity()
export class OnlineExamHistory extends IncrementIdEntity {
  @Column({ name: 'online_exam_id', comment: '对应在线考试ID' })
  onlineExamId: number;

  @Column({ name: 'exam_id', comment: '发布的考试ID' })
  examId: number;

  @Column({ name: 'exam_paper_id', comment: '考试对应试卷ID' })
  examPaperId: number;

  @Column({ name: 'exam_duration', comment: '考试用时' })
  examDuration: number;

  @Column({
    name: 'report_time',
    comment: '考试交卷时间',
    type: 'bigint',
    default: null,
  })
  reportTime: number;

  @Column({
    name: 'end_timestamp',
    comment: '考试结束的时间戳',
    type: 'bigint',
    default: null,
  })
  endTimestamp: number;

  @Column({ name: 'is_anonymous', comment: '是否匿名判卷', default: 0 })
  isAnonymous: number;
  @Column({
    name: 'is_practice_exam',
    comment: '是否为模拟考试 （0、1）',
    default: 0,
  })
  isPracticeExam: number;

  @Column({ name: 'is_grade_paper', comment: '是否已判卷', default: 0 })
  isGradePaper: number;
}
