using ZB.MOM.WW.ScadaBridge.Commons.Entities.Audit;
namespace ZB.MOM.WW.ScadaBridge.Commons.Messages.Management;
public record QueryAuditLogCommand(
string? User = null, string? EntityType = null, string? Action = null,
DateTimeOffset? From = null, DateTimeOffset? To = null,
int Page = 1, int PageSize = 50);
///
/// Result wrapper for .
///
///
/// This record exists specifically so the handler does not return the repository's
/// (IReadOnlyList<AuditLogEntry> Entries, int TotalCount) ValueTuple directly.
/// A ValueTuple exposes Item1/Item2 as public fields, and
/// serializes only properties unless
/// JsonSerializerOptions.IncludeFields is set — so a tuple result serialized to
/// the literal string {} and every audit-config query looked empty no
/// matter how many rows the query matched (deferred-work register row 46). Mirrors the
/// SecuredWriteListResult shape used by the other paged management query.
///
/// The page of configuration-change audit entries.
/// Total number of rows matching the filters (unpaged).
public record AuditLogQueryResult(IReadOnlyList Entries, int TotalCount);