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

/**
 * 试卷表
 */
@Entity()
export class ExamPaper extends IncrementIdEntity {
  @Column({ comment: '试卷名称' })
  title: string;

  @Column({ name: 'paper_desc', comment: '试卷描述' })
  paperDesc: string;

  @Column({ name: 'paper_duration', comment: '答题时长' })
  paperDuration: number;

  @Column({ name: 'total_score', comment: '总分' })
  totalScore: number;

  @Column({ name: 'question_count', comment: '试题数' })
  questionCount: number;

  @Column({ name: 'pass_percent', comment: '及格分占总分百分比' })
  passPercent: number;

  @Column({ name: 'classify_id', comment: '试卷分类' })
  classifyId: number;

  @Column({
    name: 'questions_is_random_sort',
    comment: '试题是否乱序',
    default: 0,
  })
  questionsIsRandomSort: number;

  @Column({
    name: 'options_is_random_sort',
    comment: '选项是否乱序',
    default: 0,
  })
  optionsIsRandomSort: number;

  @Column({ comment: '试卷状态（0关闭，1开启）default', default: 0 })
  status: number;

  @Column({ comment: '分享试卷（0关闭，1开启）default', default: 0 })
  share: number;

  @Column({ name: 'is_practice_exam', comment: '是否为模拟考试', default: 0 })
  isPracticeExam: number;
}
