import { ApiProperty } from '@nestjs/swagger'; import { ArrayMinSize, IsArray, IsInt, Min } from 'class-validator'; export class SubmitQuizDto { @ApiProperty({ description: 'Selected option index for each quiz question', type: [Number], example: [0, 2, 1], }) @IsArray() @ArrayMinSize(1) @IsInt({ each: true }) @Min(0, { each: true }) answers: number[]; }