diff --git a/services/Directory/FilterLists.Directory.Infrastructure/Persistence/Queries/Entities/FilterList.cs b/services/Directory/FilterLists.Directory.Infrastructure/Persistence/Queries/Entities/FilterList.cs index b01e3a486..8c19feb18 100644 --- a/services/Directory/FilterLists.Directory.Infrastructure/Persistence/Queries/Entities/FilterList.cs +++ b/services/Directory/FilterLists.Directory.Infrastructure/Persistence/Queries/Entities/FilterList.cs @@ -8,8 +8,8 @@ public record FilterList public int Id { get; init; } public string Name { get; init; } = null!; public string? Description { get; init; } - public int? LicenseId { get; init; } - public License? License { get; } + public int LicenseId { get; init; } + public License License { get; } = null!; public IReadOnlyCollection FilterListSyntaxes { get; } = new HashSet(); public IReadOnlyCollection FilterListLanguages { get; } = new HashSet(); public IReadOnlyCollection FilterListTags { get; } = new HashSet(); @@ -38,6 +38,8 @@ public virtual void Configure(EntityTypeBuilder builder) { builder.HasIndex(f => f.Name) .IsUnique(); + builder.Property(f => f.LicenseId) + .HasDefaultValue(5); builder.HasDataJsonFile(); } }