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

/**
 * 考试试题结果存储
 */
@Entity()
export class ExamQuestionsResult extends IncrementIdEntity {
  @Column({ name: 'history_id', comment: '考试记录Id' })
  historyId: number;

  @Column({ name: 'question_id', comment: '试题ID' })
  questionId: number;

  @Column({ name: 'question_score', comment: '该题分值' })
  questionScore: number;

  @Column({ comment: '我的得分' })
  score: number;

  @Column({ name: 'mistake_score', comment: '错题得分', default: 0 })
  mistakeScore: number;

  @Column({ name: 'user_answer', comment: '我的答案' })
  userAnswer: string;

  @Column({ comment: '老师的评语', default: null, type: 'longtext' })
  comment: string;
}
