using ScadaLink.Commons.Types.Enums;

namespace ScadaLink.Commons.Types.Audit;

/// <summary>
/// Filter predicate for <see cref="ScadaLink.Commons.Interfaces.Repositories.IAuditLogRepository.QueryAsync"/>.
/// Any field left <c>null</c> means "do not constrain on that column". Time bounds
/// are half-open in the spec sense — <see cref="FromUtc"/> is inclusive and
/// <see cref="ToUtc"/> is inclusive of the upper bound; the repository SQL uses
/// <c>&gt;=</c> / <c>&lt;=</c> respectively. All filter fields are AND-combined.
/// </summary>
public sealed record AuditLogQueryFilter(
    AuditChannel? Channel = null,
    AuditKind? Kind = null,
    AuditStatus? Status = null,
    string? SourceSiteId = null,
    string? Target = null,
    string? Actor = null,
    Guid? CorrelationId = null,
    DateTime? FromUtc = null,
    DateTime? ToUtc = null);
