import { IsString, IsOptional, IsBoolean } from 'class-validator'; import { ApiPropertyOptional } from '@nestjs/swagger'; export class UpdateUserDto { @ApiPropertyOptional({ description: "User's first name", example: 'John' }) @IsOptional() @IsString() firstName?: string; @ApiPropertyOptional({ description: "User's last name", example: 'Doe' }) @IsOptional() @IsString() lastName?: string; @ApiPropertyOptional({ description: "User's birth date (ISO)", example: '1990-01-01' }) @IsOptional() // keep as string here, caller should send ISO date; service will assign to Date @IsString() birthDate?: string; @ApiPropertyOptional({ description: "User's marriage date (ISO)", example: '2015-06-01' }) @IsOptional() @IsString() marriageDate?: string; @ApiPropertyOptional({ description: 'Gender flag (boolean)', example: true }) @IsOptional() @IsBoolean() gender?: boolean; @ApiPropertyOptional({ description: 'Avatar URL' }) @IsOptional() @IsString() avatarUrl?: string; }