using Meezi.Core.Enums;

namespace Meezi.Core.Entities;

/// <summary>Audit log for inbound delivery platform webhooks (debugging & dead-letter).</summary>
public class WebhookLog : BaseEntity
{
    public string? CafeId { get; set; }
    public DeliveryPlatform Platform { get; set; }
    public string RawBody { get; set; } = string.Empty;
    public string? SignatureHeader { get; set; }
    public bool SignatureValid { get; set; }
    public bool Processed { get; set; }
    public bool Success { get; set; }
    public string? ErrorMessage { get; set; }
    public int AttemptCount { get; set; }
    public string? ExternalOrderId { get; set; }
    public string? MeeziOrderId { get; set; }
    public DateTime? ProcessedAt { get; set; }

    public Cafe? Cafe { get; set; }
}
