import { NotificationType } from '../enums/notification-type.enum';

export class SendNotificationDto {

  // Event type — must be one of the valid NotificationType values
  // e.g. NotificationType.PROPOSAL_SIGNED, NotificationType.AUDIT_ROW_CANCELLED
  type: NotificationType;

  title: string;
  body: string;

  target_role_ids?: number[];

  target_user_ids?: number[];

  reference_id?: number;

  reference_type?: string;

  is_urgent?: boolean;

  requires_action?: boolean;

  // ─── 🆕 NEW: optional deep-link / payload / email / WhatsApp ───────

  // Deep-link URL for the bell-icon dropdown (e.g. '/audit-schedules/25')
  link_url?: string;

  // Free-form payload — frontend can read for richer in-app rendering
  payload?: Record<string, any>;

  // If provided, NotificationsService will also send an email via MailsService
  // to each resolved user (using their .email column).
  email_subject?: string;
  email_html?: string;

  // If provided, NotificationsService will also send WhatsApp via WhatsappService
  // to each resolved user's phone_number (E.164).
  whatsapp_message?: string;
}