mirror of
https://github.com/collinbarrett/FilterLists.git
synced 2026-03-11 09:04:27 +00:00
fix(dir): 🐛 make nav props public init for EF query filters to work
This commit is contained in:
parent
5b5b458661
commit
18d6788bc7
17 changed files with 37 additions and 37 deletions
|
|
@ -5,7 +5,7 @@ namespace FilterLists.Directory.Infrastructure.Persistence.Queries.Entities;
|
|||
|
||||
public abstract record AggregateRoot
|
||||
{
|
||||
// TODO: change 'set' to 'private init' when no longer seeding from json
|
||||
// TODO: change 'set' to 'init' when no longer seeding from json
|
||||
public bool IsApproved { get; set; }
|
||||
}
|
||||
|
||||
|
|
|
|||
|
|
@ -8,9 +8,9 @@ namespace FilterLists.Directory.Infrastructure.Persistence.Queries.Entities;
|
|||
public record Dependent
|
||||
{
|
||||
public int DependencyFilterListId { get; init; }
|
||||
public FilterList DependencyFilterList { get; } = null!;
|
||||
public FilterList DependencyFilterList { get; init; } = null!;
|
||||
public int DependentFilterListId { get; init; }
|
||||
public FilterList DependentFilterList { get; } = null!;
|
||||
public FilterList DependentFilterList { get; init; } = null!;
|
||||
}
|
||||
|
||||
internal class DependentTypeConfiguration : IEntityTypeConfiguration<Dependent>
|
||||
|
|
|
|||
|
|
@ -9,11 +9,11 @@ public record FilterList : AggregateRoot
|
|||
public string Name { get; init; } = null!;
|
||||
public string? Description { get; init; }
|
||||
public int LicenseId { get; init; }
|
||||
public License License { get; } = null!;
|
||||
public IReadOnlyCollection<FilterListSyntax> FilterListSyntaxes { get; } = new HashSet<FilterListSyntax>();
|
||||
public IReadOnlyCollection<FilterListLanguage> FilterListLanguages { get; } = new HashSet<FilterListLanguage>();
|
||||
public IReadOnlyCollection<FilterListTag> FilterListTags { get; } = new HashSet<FilterListTag>();
|
||||
public IReadOnlyCollection<FilterListViewUrl> ViewUrls { get; } = new HashSet<FilterListViewUrl>();
|
||||
public License License { get; init; } = null!;
|
||||
public IReadOnlyCollection<FilterListSyntax> FilterListSyntaxes { get; init; } = new HashSet<FilterListSyntax>();
|
||||
public IReadOnlyCollection<FilterListLanguage> FilterListLanguages { get; init; } = new HashSet<FilterListLanguage>();
|
||||
public IReadOnlyCollection<FilterListTag> FilterListTags { get; init; } = new HashSet<FilterListTag>();
|
||||
public IReadOnlyCollection<FilterListViewUrl> ViewUrls { get; init; } = new HashSet<FilterListViewUrl>();
|
||||
public Uri? HomeUrl { get; init; }
|
||||
public Uri? OnionUrl { get; init; }
|
||||
public Uri? PolicyUrl { get; init; }
|
||||
|
|
@ -23,13 +23,13 @@ public record FilterList : AggregateRoot
|
|||
public Uri? ChatUrl { get; init; }
|
||||
public string? EmailAddress { get; init; }
|
||||
public Uri? DonateUrl { get; init; }
|
||||
public IReadOnlyCollection<FilterListMaintainer> FilterListMaintainers { get; } = new HashSet<FilterListMaintainer>();
|
||||
public IReadOnlyCollection<Fork> UpstreamFilterLists { get; } = new HashSet<Fork>();
|
||||
public IReadOnlyCollection<Fork> ForkFilterLists { get; } = new HashSet<Fork>();
|
||||
public IReadOnlyCollection<Merge> IncludedInFilterLists { get; } = new HashSet<Merge>();
|
||||
public IReadOnlyCollection<Merge> IncludesFilterLists { get; } = new HashSet<Merge>();
|
||||
public IReadOnlyCollection<Dependent> DependencyFilterLists { get; } = new HashSet<Dependent>();
|
||||
public IReadOnlyCollection<Dependent> DependentFilterLists { get; } = new HashSet<Dependent>();
|
||||
public IReadOnlyCollection<FilterListMaintainer> FilterListMaintainers { get; init; } = new HashSet<FilterListMaintainer>();
|
||||
public IReadOnlyCollection<Fork> UpstreamFilterLists { get; init; } = new HashSet<Fork>();
|
||||
public IReadOnlyCollection<Fork> ForkFilterLists { get; init; } = new HashSet<Fork>();
|
||||
public IReadOnlyCollection<Merge> IncludedInFilterLists { get; init; } = new HashSet<Merge>();
|
||||
public IReadOnlyCollection<Merge> IncludesFilterLists { get; init; } = new HashSet<Merge>();
|
||||
public IReadOnlyCollection<Dependent> DependencyFilterLists { get; init; } = new HashSet<Dependent>();
|
||||
public IReadOnlyCollection<Dependent> DependentFilterLists { get; init; } = new HashSet<Dependent>();
|
||||
}
|
||||
|
||||
internal class FilterListTypeConfiguration : AggregateRootTypeConfiguration<FilterList>
|
||||
|
|
|
|||
|
|
@ -8,9 +8,9 @@ namespace FilterLists.Directory.Infrastructure.Persistence.Queries.Entities;
|
|||
public record FilterListLanguage
|
||||
{
|
||||
public int FilterListId { get; init; }
|
||||
public FilterList FilterList { get; } = null!;
|
||||
public FilterList FilterList { get; init; } = null!;
|
||||
public string Iso6391 { get; init; } = null!;
|
||||
public Language Language { get; } = null!;
|
||||
public Language Language { get; init; } = null!;
|
||||
}
|
||||
|
||||
internal class FilterListLanguageTypeConfiguration : IEntityTypeConfiguration<FilterListLanguage>
|
||||
|
|
|
|||
|
|
@ -8,9 +8,9 @@ namespace FilterLists.Directory.Infrastructure.Persistence.Queries.Entities;
|
|||
public record FilterListMaintainer
|
||||
{
|
||||
public int FilterListId { get; init; }
|
||||
public FilterList FilterList { get; } = null!;
|
||||
public FilterList FilterList { get; init; } = null!;
|
||||
public int MaintainerId { get; init; }
|
||||
public Maintainer Maintainer { get; } = null!;
|
||||
public Maintainer Maintainer { get; init; } = null!;
|
||||
}
|
||||
|
||||
internal class FilterListMaintainerTypeConfiguration : IEntityTypeConfiguration<FilterListMaintainer>
|
||||
|
|
|
|||
|
|
@ -8,9 +8,9 @@ namespace FilterLists.Directory.Infrastructure.Persistence.Queries.Entities;
|
|||
public record FilterListSyntax
|
||||
{
|
||||
public int FilterListId { get; init; }
|
||||
public FilterList FilterList { get; } = null!;
|
||||
public FilterList FilterList { get; init; } = null!;
|
||||
public int SyntaxId { get; init; }
|
||||
public Syntax Syntax { get; } = null!;
|
||||
public Syntax Syntax { get; init; } = null!;
|
||||
}
|
||||
|
||||
internal class FilterListSyntaxTypeConfiguration : IEntityTypeConfiguration<FilterListSyntax>
|
||||
|
|
|
|||
|
|
@ -8,9 +8,9 @@ namespace FilterLists.Directory.Infrastructure.Persistence.Queries.Entities;
|
|||
public record FilterListTag
|
||||
{
|
||||
public int FilterListId { get; init; }
|
||||
public FilterList FilterList { get; } = null!;
|
||||
public FilterList FilterList { get; init; } = null!;
|
||||
public int TagId { get; init; }
|
||||
public Tag Tag { get; } = null!;
|
||||
public Tag Tag { get; init; } = null!;
|
||||
}
|
||||
|
||||
internal class FilterListTagTypeConfiguration : IEntityTypeConfiguration<FilterListTag>
|
||||
|
|
|
|||
|
|
@ -9,7 +9,7 @@ public record FilterListViewUrl
|
|||
{
|
||||
public int Id { get; init; }
|
||||
public int FilterListId { get; init; }
|
||||
public FilterList FilterList { get; } = null!;
|
||||
public FilterList FilterList { get; init; } = null!;
|
||||
public short SegmentNumber { get; init; }
|
||||
public short Primariness { get; init; }
|
||||
public Uri Url { get; init; } = null!;
|
||||
|
|
|
|||
|
|
@ -8,9 +8,9 @@ namespace FilterLists.Directory.Infrastructure.Persistence.Queries.Entities;
|
|||
public record Fork
|
||||
{
|
||||
public int UpstreamFilterListId { get; init; }
|
||||
public FilterList UpstreamFilterList { get; } = null!;
|
||||
public FilterList UpstreamFilterList { get; init; } = null!;
|
||||
public int ForkFilterListId { get; init; }
|
||||
public FilterList ForkFilterList { get; } = null!;
|
||||
public FilterList ForkFilterList { get; init; } = null!;
|
||||
}
|
||||
|
||||
internal class ForkTypeConfiguration : IEntityTypeConfiguration<Fork>
|
||||
|
|
|
|||
|
|
@ -7,7 +7,7 @@ public record Language : AggregateRoot
|
|||
{
|
||||
public string Iso6391 { get; init; } = null!;
|
||||
public string Name { get; init; } = null!;
|
||||
public IReadOnlyCollection<FilterListLanguage> FilterListLanguages { get; } = new HashSet<FilterListLanguage>();
|
||||
public IReadOnlyCollection<FilterListLanguage> FilterListLanguages { get; init; } = new HashSet<FilterListLanguage>();
|
||||
}
|
||||
|
||||
internal class LanguageTypeConfiguration : AggregateRootTypeConfiguration<Language>
|
||||
|
|
|
|||
|
|
@ -11,7 +11,7 @@ public record License : AggregateRoot
|
|||
public bool PermitsModification { get; init; }
|
||||
public bool PermitsDistribution { get; init; }
|
||||
public bool PermitsCommercialUse { get; init; }
|
||||
public IReadOnlyCollection<FilterList> FilterLists { get; } = new HashSet<FilterList>();
|
||||
public IReadOnlyCollection<FilterList> FilterLists { get; init; } = new HashSet<FilterList>();
|
||||
}
|
||||
|
||||
internal class LicenseTypeConfiguration : AggregateRootTypeConfiguration<License>
|
||||
|
|
|
|||
|
|
@ -10,7 +10,7 @@ public record Maintainer : AggregateRoot
|
|||
public Uri? Url { get; init; }
|
||||
public string? EmailAddress { get; init; }
|
||||
public string? TwitterHandle { get; init; }
|
||||
public IReadOnlyCollection<FilterListMaintainer> FilterListMaintainers { get; } = new HashSet<FilterListMaintainer>();
|
||||
public IReadOnlyCollection<FilterListMaintainer> FilterListMaintainers { get; init; } = new HashSet<FilterListMaintainer>();
|
||||
}
|
||||
|
||||
internal class MaintainerTypeConfiguration : AggregateRootTypeConfiguration<Maintainer>
|
||||
|
|
|
|||
|
|
@ -8,9 +8,9 @@ namespace FilterLists.Directory.Infrastructure.Persistence.Queries.Entities;
|
|||
public record Merge
|
||||
{
|
||||
public int IncludedInFilterListId { get; init; }
|
||||
public FilterList IncludedInFilterList { get; } = null!;
|
||||
public FilterList IncludedInFilterList { get; init; } = null!;
|
||||
public int IncludesFilterListId { get; init; }
|
||||
public FilterList IncludesFilterList { get; } = null!;
|
||||
public FilterList IncludesFilterList { get; init; } = null!;
|
||||
}
|
||||
|
||||
internal class MergeTypeConfiguration : IEntityTypeConfiguration<Merge>
|
||||
|
|
|
|||
|
|
@ -11,7 +11,7 @@ public record Software : AggregateRoot
|
|||
public Uri? HomeUrl { get; init; }
|
||||
public Uri? DownloadUrl { get; init; }
|
||||
public bool SupportsAbpUrlScheme { get; init; }
|
||||
public IReadOnlyCollection<SoftwareSyntax> SoftwareSyntaxes { get; } = new HashSet<SoftwareSyntax>();
|
||||
public IReadOnlyCollection<SoftwareSyntax> SoftwareSyntaxes { get; init; } = new HashSet<SoftwareSyntax>();
|
||||
}
|
||||
|
||||
internal class SoftwareTypeConfiguration : AggregateRootTypeConfiguration<Software>
|
||||
|
|
|
|||
|
|
@ -8,9 +8,9 @@ namespace FilterLists.Directory.Infrastructure.Persistence.Queries.Entities;
|
|||
public record SoftwareSyntax
|
||||
{
|
||||
public int SoftwareId { get; init; }
|
||||
public Software Software { get; } = null!;
|
||||
public Software Software { get; init; } = null!;
|
||||
public int SyntaxId { get; init; }
|
||||
public Syntax Syntax { get; } = null!;
|
||||
public Syntax Syntax { get; init; } = null!;
|
||||
}
|
||||
|
||||
internal class SoftwareSyntaxTypeConfiguration : IEntityTypeConfiguration<SoftwareSyntax>
|
||||
|
|
|
|||
|
|
@ -9,8 +9,8 @@ public record Syntax : AggregateRoot
|
|||
public string Name { get; init; } = null!;
|
||||
public string? Description { get; init; }
|
||||
public Uri? Url { get; init; }
|
||||
public IReadOnlyCollection<FilterListSyntax> FilterListSyntaxes { get; } = new HashSet<FilterListSyntax>();
|
||||
public IReadOnlyCollection<SoftwareSyntax> SoftwareSyntaxes { get; } = new HashSet<SoftwareSyntax>();
|
||||
public IReadOnlyCollection<FilterListSyntax> FilterListSyntaxes { get; init; } = new HashSet<FilterListSyntax>();
|
||||
public IReadOnlyCollection<SoftwareSyntax> SoftwareSyntaxes { get; init; } = new HashSet<SoftwareSyntax>();
|
||||
}
|
||||
|
||||
internal class SyntaxTypeConfiguration : AggregateRootTypeConfiguration<Syntax>
|
||||
|
|
|
|||
|
|
@ -8,7 +8,7 @@ public record Tag : AggregateRoot
|
|||
public int Id { get; init; }
|
||||
public string Name { get; init; } = null!;
|
||||
public string? Description { get; init; }
|
||||
public IReadOnlyCollection<FilterListTag> FilterListTags { get; } = new HashSet<FilterListTag>();
|
||||
public IReadOnlyCollection<FilterListTag> FilterListTags { get; init; } = new HashSet<FilterListTag>();
|
||||
}
|
||||
|
||||
internal class TagTypeConfiguration : AggregateRootTypeConfiguration<Tag>
|
||||
|
|
|
|||
Loading…
Reference in a new issue