namespace Nonemm.Storage; /// One running of a contest in the log: the entry categories, the sent exchange /// and the number every contact in it carries. public sealed record ContestInstance { public required int ContestNumber { get; init; } public required string ContestName { get; init; } public DateTime StartDate { get; init; } public string SentExchange { get; init; } = ""; public string SubType { get; init; } = ""; public string OperatorCategory { get; init; } = "SINGLE-OP"; public string BandCategory { get; init; } = "ALL"; public string PowerCategory { get; init; } = "HIGH"; public string ModeCategory { get; init; } = ""; /// N1MM rejects a contest whose overlay is empty, so an entry with no /// overlay says so with "N/A". public string OverlayCategory { get; init; } = "N/A"; public string StationCategory { get; init; } = ""; public string AssistedCategory { get; init; } = "NON-ASSISTED"; /// Whether the entry may use spots at all. N1MM's rule: an assisted or /// multi-operator entry, or a checklog, may; a single operator who has not /// said assisted may not. public bool IsAssisted => OperatorCategory.Contains("ASSISTED", StringComparison.OrdinalIgnoreCase) || OperatorCategory.Contains("MULTI", StringComparison.OrdinalIgnoreCase) || OperatorCategory.Contains("CHECKLOG", StringComparison.OrdinalIgnoreCase) || AssistedCategory.Equals("ASSISTED", StringComparison.OrdinalIgnoreCase); public string TransmitterCategory { get; init; } = "ONE"; public string TimeCategory { get; init; } = ""; public string Operators { get; init; } = ""; public string Soapbox { get; init; } = ""; public long ClaimedScore { get; init; } }