import {
  IsString,
  IsNotEmpty,
  IsOptional,
  IsArray,
  IsInt,
  Min,
  Max,
  IsObject,
  IsBoolean,
} 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;
}
