mirror of
https://github.com/collinbarrett/FilterLists.git
synced 2026-03-11 09:04:27 +00:00
refactor(dir): ♻ require a license and default to All Rights Reserved
This commit is contained in:
parent
9eaff93b50
commit
d0b3c1bbc2
1 changed files with 4 additions and 2 deletions
|
|
@ -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<FilterListSyntax> FilterListSyntaxes { get; } = new HashSet<FilterListSyntax>();
|
||||
public IReadOnlyCollection<FilterListLanguage> FilterListLanguages { get; } = new HashSet<FilterListLanguage>();
|
||||
public IReadOnlyCollection<FilterListTag> FilterListTags { get; } = new HashSet<FilterListTag>();
|
||||
|
|
@ -38,6 +38,8 @@ public virtual void Configure(EntityTypeBuilder<FilterList> builder)
|
|||
{
|
||||
builder.HasIndex(f => f.Name)
|
||||
.IsUnique();
|
||||
builder.Property(f => f.LicenseId)
|
||||
.HasDefaultValue(5);
|
||||
builder.HasDataJsonFile<FilterList>();
|
||||
}
|
||||
}
|
||||
|
|
|
|||
Loading…
Reference in a new issue