using Microsoft.Extensions.Logging; namespace MailSharp.MailClient.Models; public class LogEntry { public int Id { get; set; } public DateTime Timestamp { get; set; } public LogLevel Level { get; set; } public string Category { get; set; } = ""; public string Message { get; set; } = ""; public string? Exception { get; set; } public int? EventId { get; set; } // Pulled out of ScopeData (when present) into its own indexed field so filtering by account in // the Maintenance log viewer doesn't need to scan/deserialize every ScopeData dictionary. public int? AccountId { get; set; } // Flattened BeginScope() values (accountId, folder, durationMs, ...) - keys/values are always // stringified since scope state can be any shape (anonymous objects, dictionaries, tuples) and // LiteDB needs a stable, queryable document shape rather than arbitrary nested state. public Dictionary ScopeData { get; set; } = []; }