import { Type } from "class-transformer"; import { IsEmail, IsInt, IsNotEmpty, IsOptional, IsPositive, IsString, } from "class-validator"; export class CreateCustomerDto { @IsString() @IsNotEmpty() first_name: string; @IsString() @IsNotEmpty() last_name: string; @IsEmail() @IsOptional() email: string; @Type(() => Number) @IsInt() @IsPositive() phone_number: number; @IsString() @IsOptional() residence?: string; @IsInt() @IsNotEmpty() invoice_id: number; }