import { IsArray, IsEnum, IsNotEmpty, IsNumber, IsOptional, IsString } from 'class-validator';

export class CreateQuoteDto {
    @IsString()
    @IsOptional()
    enquiryId?: string;

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

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

    @IsArray()
    @IsNotEmpty()
    items: any[];

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

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

    @IsOptional()
    @IsEnum(['DRAFT', 'SENT', 'ACCEPTED', 'REJECTED'])
    status?: 'DRAFT' | 'SENT' | 'ACCEPTED' | 'REJECTED';
}
