using PowderCoating.Core.Enums;

namespace PowderCoating.Core.Entities;

public class NotificationLog : BaseEntity
{
    public NotificationChannel Channel { get; set; }
    public NotificationType NotificationType { get; set; }
    public NotificationStatus Status { get; set; }
    public string RecipientName { get; set; } = string.Empty;
    public string Recipient { get; set; } = string.Empty; // email address or phone number
    public string? Subject { get; set; }
    public string Message { get; set; } = string.Empty;
    public string? ErrorMessage { get; set; }
    public DateTime SentAt { get; set; }

    // Optional FK links
    public int? CustomerId { get; set; }
    public int? JobId { get; set; }
    public int? QuoteId { get; set; }
    public int? InvoiceId { get; set; }

    // Navigation properties
    public virtual Customer? Customer { get; set; }
    public virtual Job? Job { get; set; }
    public virtual Quote? Quote { get; set; }
    public virtual Invoice? Invoice { get; set; }
}
