import { ApiProperty } from '@nestjs/swagger';
import { CreateDto } from 'src/common/dto/create.dto';

/**
 * 考试表
 */
export class UpdateExamDto extends CreateDto {
  @ApiProperty({ description: '考试名称' })
  title: string;

  @ApiProperty({ description: '考试分类' })
  classifyId: number;

  @ApiProperty({ description: '考试描述' })
  examDesc: string;

  @ApiProperty({ description: '考试开始时间' })
  examStartTime: Date;

  @ApiProperty({ description: '考试结束时间' })
  examEndTime: Date;

  @ApiProperty({ description: '考试时长', default: 120 })
  examDuration: number;

  @ApiProperty({ description: '考试机会', default: 1 })
  examTimes: number;

  @ApiProperty({ description: '及格分占比', default: 1 })
  passPercent: number;

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

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

  @ApiProperty({ description: '及格提示信息', default: '考试成功通过' })
  successTips: string;

  @ApiProperty({ description: '不及格提示信息', default: '您没有通过本次考试' })
  failedTips: string;

  @ApiProperty({ description: '等待人工评卷信息', default: '等待老师人工评分' })
  waitingTips: string;

  @ApiProperty({ description: '试卷ID', default: 0 })
  examPaperId: number;

  @ApiProperty({ description: '考试模式（0整卷，1逐题）', default: 0 })
  examMode: number;

  @ApiProperty({ description: '总分', default: 100 })
  totalScore: number;

  @ApiProperty({ description: '判卷方式（0机器 1人工）', default: 0 })
  gradePaperMode: number;

  @ApiProperty({ description: '是否匿名判卷', default: 'SYSTEM' })
  isAnonymous: number;

  @ApiProperty({ description: '判卷人Id', default: 'SYSTEM' })
  examinerId: string;

  @ApiProperty({ description: '参加方式（预留不做）', default: 'SYSTEM' })
  joinMode: number;

  @ApiProperty({ description: '参加考试口令6位', default: '123456' })
  joinPassword: string;

  // @Column({ comment: '试卷状态（0待开考，1已开考，2已结束等', default: 0 })
  // @IsNotEmpty({ message: '试卷状态不能为空' })
  // status: number;
}
