import { IsString, IsNotEmpty, IsOptional, IsArray, IsInt, Min, Max, IsObject, IsBoolean, IsNumber, } from 'class-validator'; export class CreateTemplateDto { @IsString() @IsNotEmpty() name: string; @IsString() @IsOptional() description?: string; @IsArray() @IsString({ each: true }) @IsOptional() keywords?: string[]; @IsInt() @Min(1) @Max(20) @IsOptional() questionCount?: number = 5; @IsObject() @IsOptional() difficultyDistribution?: { standard: number; advanced: number; specialist: number; }; @IsString() @IsOptional() style?: string = 'technical'; @IsString() @IsOptional() knowledgeBaseId?: string; @IsString() @IsOptional() knowledgeGroupId?: string; @IsBoolean() @IsOptional() isActive?: boolean = true; @IsArray() @IsString({ each: true }) @IsOptional() linkedGroupIds?: string[]; @IsArray() @IsObject({ each: true }) @IsOptional() dimensions?: Array<{ name: string; label: string; weight: number }>; @IsObject() @IsOptional() weightConfig?: { prompt: number; other: number; }; @IsObject() @IsOptional() difficultyConfig?: { standard: number; advanced: number; specialist: number; }; @IsInt() @Min(1) @Max(20) @IsOptional() questionCountMin?: number; @IsInt() @Min(1) @Max(20) @IsOptional() questionCountMax?: number; @IsInt() @Min(0) @Max(100) @IsOptional() passingScore?: number; @IsInt() @Min(60) @Max(86400) totalTimeLimit?: number; @IsInt() @Min(30) @Max(3600) perQuestionTimeLimit?: number; }