import { Type } from 'class-transformer'; import { ArrayMaxSize, IsArray, IsBoolean, IsNotEmpty, IsNumber, IsOptional, IsString, MaxLength, Min, } from 'class-validator'; export class CreateInstrumentDto { @IsString() @IsNotEmpty() @MaxLength(120) title!: string; @IsOptional() @IsString() @MaxLength(2000) description?: string; @Type(() => Number) @IsNumber() @Min(0) price!: number; @IsOptional() @IsString() @MaxLength(8) currency?: string; @Type(() => Number) @IsNumber() @Min(0) quantity!: number; @IsOptional() @IsArray() @ArrayMaxSize(5) @IsString({ each: true }) imageUrls?: string[]; @IsOptional() @Type(() => Boolean) @IsBoolean() isActive?: boolean; }