targo-backend/src/modules/customers/dtos/create-customer.dto.ts
2025-07-22 08:11:08 -04:00

37 lines
571 B
TypeScript

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;
}