mirror of
https://github.com/collinbarrett/FilterLists.git
synced 2026-03-11 09:04:27 +00:00
fix(dr): 🐛 fk name
This commit is contained in:
parent
09214b914f
commit
891678f8d4
2 changed files with 6 additions and 2 deletions
|
|
@ -1,6 +1,7 @@
|
|||
using FilterLists.Directory.Domain.Aggregates.Changes;
|
||||
using Microsoft.EntityFrameworkCore;
|
||||
using Microsoft.EntityFrameworkCore.Metadata.Builders;
|
||||
using Change = FilterLists.Directory.Infrastructure.Persistence.Queries.Entities.Change;
|
||||
|
||||
namespace FilterLists.Directory.Infrastructure.Persistence.Commands.EntityTypeConfigurations;
|
||||
|
||||
|
|
@ -8,6 +9,11 @@ internal class FilterListChangeTypeConfiguration : IEntityTypeConfiguration<Filt
|
|||
{
|
||||
public virtual void Configure(EntityTypeBuilder<FilterListChange> builder)
|
||||
{
|
||||
builder.Property<int>(nameof(Change.FilterListId));
|
||||
builder.HasOne(c => c.Current)
|
||||
.WithMany(f => f.Changes)
|
||||
.HasForeignKey(nameof(Change.FilterListId));
|
||||
|
||||
// TODO: share by configuring IChange<TAggregate>
|
||||
// TODO: serialize/deserialize json via value converter
|
||||
builder.Ignore(c => c.Before);
|
||||
|
|
|
|||
|
|
@ -9,8 +9,6 @@ internal class FilterListTypeConfiguration : IEntityTypeConfiguration<FilterList
|
|||
public virtual void Configure(EntityTypeBuilder<FilterList> builder)
|
||||
{
|
||||
builder.Property<int>(nameof(Queries.Entities.FilterList.Id));
|
||||
builder.HasMany(f => f.Changes)
|
||||
.WithOne(c => c.Current);
|
||||
builder.Navigation(f => f.Changes)
|
||||
.AutoInclude();
|
||||
builder.Navigation(f => f.ViewUrls)
|
||||
|
|
|
|||
Loading…
Reference in a new issue