Продолжение

This commit is contained in:
2025-04-21 18:02:45 +04:00
parent beb61b7449
commit 35b571eb57
17 changed files with 388 additions and 227 deletions
+6 -3
View File
@@ -9,6 +9,7 @@ using Pf2eModel.Model.Common;
using Pf2eModel.Model.Enum;
using Pf2eModel.Model.Structure;
using Pf2eModel.Model.Structure.AncestryRelation;
using Pf2eModel.Model.Structure.ArchetypeRelation;
using Pf2eModel.Model.Structure.BackgroundRelation;
using Pf2eModel.Model.Structure.ClassRelation;
using Pf2eModel.Model.Structure.DeityRelation;
@@ -179,9 +180,11 @@ public partial class Pf2eDbContext
.HasForeignKey<Archetype>(a => a.DedicationFeatId)
.OnDelete(DeleteBehavior.Cascade);
entity.HasMany(a => a.Feats).WithOne(f => f.Archetype)
.HasForeignKey(f => f.ArchetypeId)
.OnDelete(DeleteBehavior.Cascade);
entity.HasMany(a => a.Feats).WithMany(f => f.Archetypes)
.UsingEntity<ArchetypeFeats>(
l => l.HasOne<Feat>().WithMany().HasForeignKey(af => af.FeatId),
r => r.HasOne<Archetype>().WithMany().HasForeignKey(af => af.ArchetypeId)
);
});
// Background