Продолжение

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
@@ -21,7 +21,7 @@ namespace Pf2eModel.Migrations
.HasAnnotation("ProductVersion", "9.0.4")
.HasAnnotation("Relational:MaxIdentifierLength", 63);
NpgsqlModelBuilderExtensions.HasPostgresEnum(modelBuilder, "action_category", new[] { "unknown", "offensive", "defensive", "interaction", "familiar", "army_tactic", "army_war_action", "kingdom_activity", "kingdom_feat", "kingdom_feature" });
NpgsqlModelBuilderExtensions.HasPostgresEnum(modelBuilder, "action_category", new[] { "unknown", "archetype", "class-feature", "class-feat", "offensive", "defensive", "interaction", "familiar", "army_tactic", "army_war_action", "kingdom_activity", "kingdom_feat", "kingdom_feature" });
NpgsqlModelBuilderExtensions.HasPostgresEnum(modelBuilder, "alias_type", new[] { "legacy", "english", "legacy_english", "hobby", "other" });
NpgsqlModelBuilderExtensions.HasPostgresEnum(modelBuilder, "ancestry_vision", new[] { "normal", "low-light-vision", "dark-vision" });
NpgsqlModelBuilderExtensions.HasPostgresEnum(modelBuilder, "attribute_values", new[] { "free", "str", "dex", "con", "int", "wis", "cha" });
@@ -33,14 +33,14 @@ namespace Pf2eModel.Migrations
NpgsqlModelBuilderExtensions.HasPostgresEnum(modelBuilder, "entity_rarity", new[] { "common", "uncommon", "rare", "unique" });
NpgsqlModelBuilderExtensions.HasPostgresEnum(modelBuilder, "entity_type", new[] { "unknown", "trait", "action", "ancestry", "archetype", "background", "backpack", "campaign_feature", "class", "condition", "deity", "feat", "heritage", "spell", "language" });
NpgsqlModelBuilderExtensions.HasPostgresEnum(modelBuilder, "feat_action_type", new[] { "passive", "action", "reaction", "free" });
NpgsqlModelBuilderExtensions.HasPostgresEnum(modelBuilder, "feat_category", new[] { "ancestryfeature", "classfeature", "calling", "class", "skill", "general", "ancestry", "bonus", "deityboon", "curse", "pfsboon", "campaign_feature" });
NpgsqlModelBuilderExtensions.HasPostgresEnum(modelBuilder, "feat_category", new[] { "uncategorized", "ancestry-feature", "class-feature", "calling", "class", "skill", "general", "ancestry", "bonus", "deityboon", "curse", "pfsboon", "campaign-feature" });
NpgsqlModelBuilderExtensions.HasPostgresEnum(modelBuilder, "size", new[] { "tiny", "small", "medium", "large" });
NpgsqlModelBuilderExtensions.HasPostgresEnum(modelBuilder, "source_category", new[] { "rulebook", "adventure-path", "lost-omens", "adventures", "comics", "blog-posts", "society" });
NpgsqlModelBuilderExtensions.HasPostgresEnum(modelBuilder, "spell_area_type", new[] { "burst", "emanation", "cone", "line", "square", "cube", "cylinder" });
NpgsqlModelBuilderExtensions.HasPostgresEnum(modelBuilder, "spell_damage_category", new[] { "persistent", "splash" });
NpgsqlModelBuilderExtensions.HasPostgresEnum(modelBuilder, "spell_damage_kinds", new[] { "damage", "healing", "any" });
NpgsqlModelBuilderExtensions.HasPostgresEnum(modelBuilder, "training_stage", new[] { "untrained", "trained", "expert", "master", "legendary" });
NpgsqlModelBuilderExtensions.HasPostgresEnum(modelBuilder, "trait_type", new[] { "regular", "tradition" });
NpgsqlModelBuilderExtensions.HasPostgresEnum(modelBuilder, "trait_type", new[] { "regular", "class", "tradition" });
NpgsqlModelBuilderExtensions.UseIdentityByDefaultColumns(modelBuilder);
modelBuilder.Entity("DeityTraining", b =>
@@ -619,7 +619,7 @@ namespace Pf2eModel.Migrations
.HasColumnName("id")
.HasColumnOrder(1);
b.Property<int>("DedicationFeatId")
b.Property<int?>("DedicationFeatId")
.HasColumnType("integer")
.HasColumnName("dedication_feat_id")
.HasColumnOrder(3);
@@ -635,13 +635,32 @@ namespace Pf2eModel.Migrations
.HasColumnOrder(2);
b.HasKey("Id")
.HasName("pk_archetype");
.HasName("pk_archetypes");
b.HasIndex("DedicationFeatId")
.IsUnique()
.HasDatabaseName("ix_archetype_dedication_feat_id");
.HasDatabaseName("ix_archetypes_dedication_feat_id");
b.ToTable("archetype", (string)null);
b.ToTable("archetypes", (string)null);
});
modelBuilder.Entity("Pf2eModel.Model.Structure.ArchetypeRelation.ArchetypeFeats", b =>
{
b.Property<int>("ArchetypeId")
.HasColumnType("integer")
.HasColumnName("archetype_id");
b.Property<int>("FeatId")
.HasColumnType("integer")
.HasColumnName("feat_id");
b.HasKey("ArchetypeId", "FeatId")
.HasName("pk_archetype_feats");
b.HasIndex("FeatId")
.HasDatabaseName("ix_archetype_feats_feat_id");
b.ToTable("archetype_feats", (string)null);
});
modelBuilder.Entity("Pf2eModel.Model.Structure.Background", b =>
@@ -1088,11 +1107,6 @@ namespace Pf2eModel.Migrations
.HasColumnName("actions")
.HasColumnOrder(5);
b.Property<int>("ArchetypeId")
.HasColumnType("integer")
.HasColumnName("archetype_id")
.HasColumnOrder(10);
b.Property<ActionCategory>("Category")
.HasColumnType("action_category")
.HasColumnName("category")
@@ -1101,7 +1115,7 @@ namespace Pf2eModel.Migrations
b.Property<string>("Extra")
.HasColumnType("text")
.HasColumnName("extra")
.HasColumnOrder(11);
.HasColumnOrder(10);
b.Property<bool>("IsFreeAction")
.HasColumnType("boolean")
@@ -1131,9 +1145,6 @@ namespace Pf2eModel.Migrations
b.HasKey("Id")
.HasName("pk_feats");
b.HasIndex("ArchetypeId")
.HasDatabaseName("ix_feats_archetype_id");
b.ToTable("feats", (string)null);
});
@@ -1672,21 +1683,37 @@ namespace Pf2eModel.Migrations
.WithOne()
.HasForeignKey("Pf2eModel.Model.Structure.Archetype", "DedicationFeatId")
.OnDelete(DeleteBehavior.Cascade)
.IsRequired()
.HasConstraintName("fk_archetype_feats_dedication_feat_id");
.HasConstraintName("fk_archetypes_feats_dedication_feat_id");
b.HasOne("Pf2eModel.Model.Base.Entity", "Entity")
.WithOne()
.HasForeignKey("Pf2eModel.Model.Structure.Archetype", "Id")
.OnDelete(DeleteBehavior.Cascade)
.IsRequired()
.HasConstraintName("fk_archetype_entities_id");
.HasConstraintName("fk_archetypes_entities_id");
b.Navigation("DedicationFeat");
b.Navigation("Entity");
});
modelBuilder.Entity("Pf2eModel.Model.Structure.ArchetypeRelation.ArchetypeFeats", b =>
{
b.HasOne("Pf2eModel.Model.Structure.Archetype", null)
.WithMany()
.HasForeignKey("ArchetypeId")
.OnDelete(DeleteBehavior.Cascade)
.IsRequired()
.HasConstraintName("fk_archetype_feats_archetypes_archetype_id");
b.HasOne("Pf2eModel.Model.Structure.Feat", null)
.WithMany()
.HasForeignKey("FeatId")
.OnDelete(DeleteBehavior.Cascade)
.IsRequired()
.HasConstraintName("fk_archetype_feats_feats_feat_id");
});
modelBuilder.Entity("Pf2eModel.Model.Structure.Background", b =>
{
b.HasOne("Pf2eModel.Model.Base.Entity", "Entity")
@@ -1900,13 +1927,6 @@ namespace Pf2eModel.Migrations
modelBuilder.Entity("Pf2eModel.Model.Structure.Feat", b =>
{
b.HasOne("Pf2eModel.Model.Structure.Archetype", "Archetype")
.WithMany("Feats")
.HasForeignKey("ArchetypeId")
.OnDelete(DeleteBehavior.Cascade)
.IsRequired()
.HasConstraintName("fk_feats_archetype_archetype_id");
b.HasOne("Pf2eModel.Model.Base.Entity", "Entity")
.WithOne()
.HasForeignKey("Pf2eModel.Model.Structure.Feat", "Id")
@@ -1914,8 +1934,6 @@ namespace Pf2eModel.Migrations
.IsRequired()
.HasConstraintName("fk_feats_entities_id");
b.Navigation("Archetype");
b.Navigation("Entity");
});
@@ -2068,11 +2086,6 @@ namespace Pf2eModel.Migrations
b.Navigation("Heritages");
});
modelBuilder.Entity("Pf2eModel.Model.Structure.Archetype", b =>
{
b.Navigation("Feats");
});
modelBuilder.Entity("Pf2eModel.Model.Structure.Background", b =>
{
b.Navigation("BackgroundBoosts");