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

export class CreateOpportunityDto {
    @IsNotEmpty()
    @IsString()
    title: string;

    @IsNotEmpty()
    @IsNumber()
    value: number;

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

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

    @IsOptional()
    @IsEnum(opportunity_stage)
    stage?: opportunity_stage;

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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