import { ApiProperty, ApiPropertyOptional } from "@nestjs/swagger";
import { IsNotEmpty, IsOptional, IsString, MaxLength } from "class-validator";

export class CreateTipoDanoDto {
  @ApiProperty({ description: "Nombre del tipo de daño" })
  @IsNotEmpty()
  @IsString()
  @MaxLength(100)
  nombre: string;

  @ApiPropertyOptional({ description: "Icono identificador" })
  @IsOptional()
  @IsString()
  @MaxLength(50)
  icono?: string;

  @ApiPropertyOptional({ description: "Color hexadecimal", default: "#ef4444" })
  @IsOptional()
  @IsString()
  @MaxLength(20)
  color?: string;
}
