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

export class CreateQuestionForPaperDto extends CreateDto {
  @ApiProperty({ description: '试卷Id' })
  @IsNotEmpty({ message: '试卷ID不能为空' })
  examPaperId: number;

  @ApiProperty({ description: '试题Id' })
  @IsNotEmpty({ message: '试题Id不能为空' })
  questionId: string;

  @ApiProperty({ description: '分值', default: 0 })
  @IsNotEmpty({ message: '分值不能为空' })
  score: number;

  @ApiProperty({ description: '试题类型', default: 0 })
  @IsNotEmpty({ message: '试题类型不能为空' })
  type: number;

  @ApiProperty({ description: '试题是否为随机抽取', default: 0 })
  @IsNotEmpty({ message: '试题是否为随机抽取不能为空' })
  isFixed: number;
}
