using Marathon.Domain.ValueObjects; namespace Marathon.Domain.Entities; /// /// A sports league or tournament within a country and sport. /// public sealed record League( string Id, SportCode Sport, string Country, string NameRu, string NameEn, string Category) { public string Id { get; } = string.IsNullOrWhiteSpace(Id) ? throw new ArgumentException("League Id must not be empty.", nameof(Id)) : Id; public SportCode Sport { get; } = Sport ?? throw new ArgumentNullException(nameof(Sport)); public string Country { get; } = string.IsNullOrWhiteSpace(Country) ? throw new ArgumentException("Country must not be empty.", nameof(Country)) : Country; public string NameRu { get; } = string.IsNullOrWhiteSpace(NameRu) ? throw new ArgumentException("NameRu must not be empty.", nameof(NameRu)) : NameRu; public string NameEn { get; } = string.IsNullOrWhiteSpace(NameEn) ? throw new ArgumentException("NameEn must not be empty.", nameof(NameEn)) : NameEn; public string Category { get; } = Category ?? string.Empty; }