import { ApiProperty, ApiPropertyOptional } from '@nestjs/swagger'; import { Type } from 'class-transformer'; import { IsDate, IsNotEmpty, IsOptional, IsString } from 'class-validator'; export class CreateCustomerDto { @ApiProperty() @IsNotEmpty() @IsString() email!: string; @ApiProperty() @IsNotEmpty() @IsString() firstName!: string; @ApiProperty() @IsNotEmpty() @IsString() lastName!: string; @ApiPropertyOptional() @IsOptional() @IsString() phone?: string | null; @ApiPropertyOptional() @IsOptional() @IsDate() @Type(() => Date) createdAt?: Date; }