using PowderCoating.Core.Enums;

namespace PowderCoating.Application.DTOs.Notification;

public class NotificationLogDto
{
    public int Id { get; set; }
    public NotificationChannel Channel { get; set; }
    public string ChannelDisplay => Channel == NotificationChannel.Email ? "Email" : "SMS";
    public NotificationType NotificationType { get; set; }
    public string NotificationTypeDisplay => NotificationType switch
    {
        NotificationType.AdminEmail => "Admin Email",
        NotificationType.QuoteSent => "Quote Sent",
        NotificationType.QuoteApproved => "Quote Approved",
        NotificationType.JobStatusChanged => "Job Status Changed",
        NotificationType.JobReadyForPickup => "Ready for Pickup",
        NotificationType.JobCompleted => "Job Completed",
        NotificationType.SmsConsentConfirmation => "SMS Consent Confirmation",
        _ => NotificationType.ToString()
    };
    public NotificationStatus Status { get; set; }
    public string StatusDisplay => Status switch
    {
        NotificationStatus.Sent => "Sent",
        NotificationStatus.Failed => "Failed",
        NotificationStatus.Skipped => "Skipped",
        _ => Status.ToString()
    };
    public string RecipientName { get; set; } = string.Empty;
    public string Recipient { get; set; } = string.Empty;
    public string? Subject { get; set; }
    public string Message { get; set; } = string.Empty;
    public string? ErrorMessage { get; set; }
    public DateTime SentAt { get; set; }
    public int? CustomerId { get; set; }
    public int? JobId { get; set; }
    public int? QuoteId { get; set; }
    public string? JobNumber { get; set; }
    public string? QuoteNumber { get; set; }
    public string? CustomerName { get; set; }
}
