Большая пачка обновлений

This commit is contained in:
2025-04-21 08:36:46 +04:00
parent be8963a073
commit beb61b7449
39 changed files with 1068 additions and 301 deletions
+14 -1
View File
@@ -38,7 +38,6 @@ public partial class Pf2eDbContext
.HasPostgresEnum<EntityRarity>()
.HasPostgresEnum<AliasType>()
.HasPostgresEnum<TraitType>()
.HasPostgresEnum<ActionType>()
.HasPostgresEnum<ActionCategory>()
.HasPostgresEnum<Size>()
.HasPostgresEnum<AncestryVision>()
@@ -171,6 +170,20 @@ public partial class Pf2eDbContext
.OnDelete(DeleteBehavior.Cascade);
});
// Archetype
modelBuilder.Entity<Archetype>(entity =>
{
BindEntity(entity);
entity.HasOne(a => a.DedicationFeat).WithOne()
.HasForeignKey<Archetype>(a => a.DedicationFeatId)
.OnDelete(DeleteBehavior.Cascade);
entity.HasMany(a => a.Feats).WithOne(f => f.Archetype)
.HasForeignKey(f => f.ArchetypeId)
.OnDelete(DeleteBehavior.Cascade);
});
// Background
modelBuilder.Entity<Background>(entity =>
{