import { IsEnum, IsString, IsNotEmpty, IsOptional, IsEmail, IsNumber, IsBoolean, IsArray } from 'class-validator';
import { client_status } from '@prisma/client';

export class CreateClientDto {
    @IsString()
    @IsNotEmpty()
    name: string;

    @IsString()
    @IsOptional()
    companyName?: string;

    @IsString()
    @IsOptional()
    contactName?: string;

    @IsString()
    @IsNotEmpty()
    phone: string;

    @IsEmail()
    @IsOptional()
    email?: string;

    @IsString()
    @IsOptional()
    address?: string;

    @IsEnum(client_status)
    @IsOptional()
    status?: client_status;

    @IsString()
    @IsOptional()
    assignedTo?: string; // User ID

    @IsString()
    @IsOptional()
    landmark?: string;

    @IsNumber()
    @IsOptional()
    lat?: number;

    @IsNumber()
    @IsOptional()
    lng?: number;

    @IsNumber()
    @IsOptional()
    closingProbability?: number;

    @IsString()
    @IsOptional()
    expectedClosingTimeframe?: string;

    @IsBoolean()
    @IsOptional()
    isDemoDone?: boolean;

    @IsArray()
    @IsOptional()
    files?: any[];
}
