namespace ZB.MOM.WW.ScadaBridge.Commons.Messages.RemoteQuery; /// /// A single event log entry returned from a site query. /// /// /// The event's primary key: a GUID string minted by the recording site node. /// /// This was a long autoincrement id until LocalDb Phase 1. Site pairs now /// replicate site_events with last-writer-wins on this key, so a /// server-minted integer would have both nodes issuing the same ids for unrelated /// events and silently overwriting each other on sync. Consumers must treat it as /// an opaque identifier — it carries no ordering. /// /// public record EventLogEntry( string Id, DateTimeOffset Timestamp, string EventType, string Severity, string? InstanceId, string Source, string Message, string? Details); /// /// Response containing paginated event log entries from a site. /// /// /// Opaque keyset-pagination cursor: pass it back verbatim on the next request to /// continue after the last returned row, or to start from the /// beginning. Encodes timestamp and id together, because GUID ids do not /// sort chronologically and timestamps alone are not unique. Do not parse it. /// public record EventLogQueryResponse( string CorrelationId, string SiteId, IReadOnlyList Entries, string? ContinuationToken, bool HasMore, bool Success, string? ErrorMessage, DateTimeOffset Timestamp);