using Flypaper.Core.Models; namespace Flypaper.Storage.Queries; public sealed record CatchRecord( long Id, DateTime StartedAt, DateTime EndedAt, double DurationSeconds, long BytesSent, TrapOutcome Outcome, string Ip, string? CountryCode, string? Country, string? City, long? Asn, string? Provider, string? Target, string? UserAgent); public sealed record CatchFilter( DateTime? Since = null, DateTime? Until = null, string? Country = null, string? Provider = null, string? Ip = null, string? TargetContains = null, int Limit = 50); public sealed record CatchStats( int Catches, int Rejected, int UniqueIps, double TotalHoldSeconds, double AverageHoldSeconds, CatchRecord? Longest); public enum TopDimension { Ips, Countries, Providers, Targets, UserAgents } public sealed record TopItem(string Key, string? Label, int Catches, double TotalHoldSeconds); public sealed record IpProfile( string Ip, string? CountryCode, string? Country, string? City, long? Asn, string? Provider, int Catches, int Rejected, double TotalHoldSeconds, long TotalBytesSent, DateTime? FirstSeen, DateTime? LastSeen, IReadOnlyList Events, int EventsOmitted);