your message
This commit is contained in:
15
apps/api/src/enrollment/dto/submit-quiz.dto.ts
Normal file
15
apps/api/src/enrollment/dto/submit-quiz.dto.ts
Normal file
@ -0,0 +1,15 @@
|
||||
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[];
|
||||
}
|
||||
Reference in New Issue
Block a user