/**
 * Invoice Job DTO
 * 
 * Data Transfer Object for queuing invoice generation jobs
 * 
 * Context:
 * - 'regular': Post-payment invoice (online/offline determined from payment)
 * - 'proforma': Pre-payment invoice (for blessed seekers)
 */

import { IsNumber, IsBoolean, IsString, IsOptional, IsIn } from 'class-validator';
import { InvoiceContextEnum } from 'src/common/enum/invoice-context.enum';

export class QueueInvoiceDto {
  @IsNumber()
  registrationId: number;

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

  @IsString()
  @IsIn(['regular', 'proforma'])
  invoiceContext: InvoiceContextEnum;

  @IsBoolean()
  @IsOptional()
  sendEmail?: boolean; // Whether to send email after generation (default: true)

  @IsBoolean()
  @IsOptional()
  sendWhatsApp?: boolean; // Whether to send WhatsApp after generation (only for proforma)
}
