File
|
Optional
answers
|
Type : KnowledgeReviewAnswerDto[]
|
Decorators :
@Expose() @IsOptional() @IsArray() @ValidateNested({each: true}) @Type(undefined)
|
|
|
|
Optional
id
|
Type : number
|
Decorators :
@Expose() @IsOptional() @IsInt()
|
|
|
|
question_text
|
Type : string
|
Decorators :
@Expose() @IsString()
|
|
|
|
Optional
sort_order
|
Type : number
|
Decorators :
@Expose() @IsOptional() @IsInt()
|
|
|
import {Expose, Exclude, Type} from "class-transformer";
import { IsArray, IsInt, IsOptional, IsString, ValidateNested } from "class-validator";
import { KnowledgeReviewAnswerDto } from "./knowledge-review-answer.dto";
@Exclude()
export class KnowledgeReviewQuestionListDto {
@Expose()
@IsOptional()
@IsInt()
id?: number;
@Expose()
@IsString()
question_text!: string;
@Expose()
@IsOptional()
@IsInt()
sort_order?: number;
@Expose()
@IsOptional()
@IsArray()
@ValidateNested({ each: true })
@Type(() => KnowledgeReviewAnswerDto)
answers?: KnowledgeReviewAnswerDto[];
}