import { ApiProperty } from '@nestjs/swagger';
import { IsNotEmpty } from 'class-validator';
import { Question } from 'src/assessment-evaluation/entities/entities-question-manager/question.entity';
import { CreateDto } from 'src/common/dto/create.dto';

export class UpdateExamPaperDto extends CreateDto {
  @ApiProperty({ description: '试卷名称', required: false })
  title: string;

  @ApiProperty({ description: '试卷描述', required: false })
  paperDesc: string;

  @ApiProperty({ description: '答题时长', required: false })
  paperDuration: number;

  @ApiProperty({ description: '试卷总分', required: false })
  totalScore: number;

  @ApiProperty({ description: '试题数', required: false })
  questionCount: number;

  @ApiProperty({ description: '试卷分类', required: false })
  classifyId: number;

  @ApiProperty({ description: '及格分比例', required: false })
  passPercent: number;

  @ApiProperty({ description: '试题是否乱序', default: 0, required: false })
  questionsIsRandomSort: number;

  @ApiProperty({ description: '选项是否乱序', default: 0, required: false })
  optionsIsRandomSort: number;

  @ApiProperty({
    description: '试卷状态 0关闭 1开启',
    default: 0,
    required: false,
  })
  status: number;

  @ApiProperty({
    description: '分享试卷 0关闭 1开启',
    default: 0,
    required: false,
  })
  share: number;

  @ApiProperty({
    description: '是否为模拟考试 （0、1）',
    default: 0,
    required: false,
  })
  isPracticeExam: number;

  @ApiProperty({ description: '试卷中试题信息', default: 0, required: false })
  questionInfo: {
    fixdQuestions: Question[];
    randQuestions: Question[];
  };
}
