import { ApiPropertyOptional } from '@nestjs/swagger';
import {
  IsOptional,
  IsInt,
  Min,
  Max,
  IsDateString,
  IsString,
  MaxLength,
} from 'class-validator';

/**
 * DTO for updating a skill matrix entry
 */
export class UpdateSkillEntryDto {
  @ApiPropertyOptional({
    description: 'Skill level (0-4): 0=None, 1=Basic, 2=Independent, 3=Expert, 4=Trainer',
    example: 3,
    minimum: 0,
    maximum: 4,
  })
  @IsOptional()
  @IsInt()
  @Min(0)
  @Max(4)
  level?: number;

  @ApiPropertyOptional({
    description: 'Assessment notes',
    example: 'Promoted to expert level after successful training completion',
    maxLength: 1000,
  })
  @IsOptional()
  @IsString()
  @MaxLength(1000)
  notes?: string;

  @ApiPropertyOptional({
    description: 'Date for next review',
    example: '2024-12-15',
  })
  @IsOptional()
  @IsDateString()
  nextReview?: string;
}
