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

/**
 * 试卷中所有试题
 */
@Entity()
export class QuestionsForCourse {
  @PrimaryGeneratedColumn('increment')
  id: number;
  @Column({ name: 'course_id', comment: '实体对应的课程ID' })
  courseId: number;

  @Column({ name: 'question_id', comment: '试题ID（对应Question表）' })
  questionId: number;

  @Column({ comment: '该题分值' })
  score: number;

  @Column({ comment: '题类型' })
  type: number;

  @Column({ name: 'is_fixed', comment: '固定选题、随机选题' })
  isFixed: number;

  @Column({ name: 'del_flag', default: 0, comment: '是否删除？软删除' })
  delFlag: number;
}
