using ScadaLink.Commons.Types.Enums;

namespace ScadaLink.Commons.Messages.RemoteQuery;

/// <summary>
/// Response containing parked store-and-forward messages from a site.
/// </summary>
public record ParkedMessageEntry(
    string MessageId,
    string TargetSystem,
    string MethodName,
    string ErrorMessage,
    int AttemptCount,
    DateTimeOffset OriginalTimestamp,
    DateTimeOffset LastAttemptTimestamp,
    int MaxAttempts = 0,
    StoreAndForwardCategory Category = StoreAndForwardCategory.ExternalSystem,
    string? OriginInstance = null);

public record ParkedMessageQueryResponse(
    string CorrelationId,
    string SiteId,
    IReadOnlyList<ParkedMessageEntry> Messages,
    int TotalCount,
    int PageNumber,
    int PageSize,
    bool Success,
    string? ErrorMessage,
    DateTimeOffset Timestamp);
