Перепроверка БД

This commit is contained in:
2025-06-01 22:27:24 +04:00
parent 75eba984b5
commit 3036442621
3 changed files with 391 additions and 237 deletions
@@ -13,7 +13,7 @@ using Pf2eModel.Model.Enum;
namespace Pf2eModel.Migrations namespace Pf2eModel.Migrations
{ {
[DbContext(typeof(Pf2eDbContext))] [DbContext(typeof(Pf2eDbContext))]
[Migration("20250601111002_1")] [Migration("20250601182634_1")]
partial class _1 partial class _1
{ {
/// <inheritdoc /> /// <inheritdoc />
@@ -36,7 +36,7 @@ namespace Pf2eModel.Migrations
NpgsqlModelBuilderExtensions.HasPostgresEnum(modelBuilder, "entity_rarity", new[] { "common", "rare", "uncommon", "unique" }); NpgsqlModelBuilderExtensions.HasPostgresEnum(modelBuilder, "entity_rarity", new[] { "common", "rare", "uncommon", "unique" });
NpgsqlModelBuilderExtensions.HasPostgresEnum(modelBuilder, "entity_type", new[] { "action", "ancestry", "archetype", "background", "backpack", "campaign_feature", "class", "condition", "deity", "feat", "heritage", "language", "ritual", "rule", "spell", "subclass", "subclass_group", "trait", "unknown" }); NpgsqlModelBuilderExtensions.HasPostgresEnum(modelBuilder, "entity_type", new[] { "action", "ancestry", "archetype", "background", "backpack", "campaign_feature", "class", "condition", "deity", "feat", "heritage", "language", "ritual", "rule", "spell", "subclass", "subclass_group", "trait", "unknown" });
NpgsqlModelBuilderExtensions.HasPostgresEnum(modelBuilder, "feat_category", new[] { "ancestry", "ancestry-feature", "archetype", "bonus", "calling", "campaign-feature", "class", "class-feature", "curse", "deityboon", "general", "pfsboon", "skill", "uncategorized" }); NpgsqlModelBuilderExtensions.HasPostgresEnum(modelBuilder, "feat_category", new[] { "ancestry", "ancestry-feature", "archetype", "bonus", "calling", "campaign-feature", "class", "class-feature", "curse", "deityboon", "general", "pfsboon", "skill", "uncategorized" });
NpgsqlModelBuilderExtensions.HasPostgresEnum(modelBuilder, "locale_type", new[] { "english", "hobby", "legacy", "legacy_english", "other", "russian" }); NpgsqlModelBuilderExtensions.HasPostgresEnum(modelBuilder, "locale_type", new[] { "english", "hobby", "other", "russian" });
NpgsqlModelBuilderExtensions.HasPostgresEnum(modelBuilder, "size_enum", new[] { "huge", "large", "medium", "small", "tiny" }); NpgsqlModelBuilderExtensions.HasPostgresEnum(modelBuilder, "size_enum", new[] { "huge", "large", "medium", "small", "tiny" });
NpgsqlModelBuilderExtensions.HasPostgresEnum(modelBuilder, "source_category", new[] { "adventure-path", "adventures", "blog-posts", "comics", "lost-omens", "rulebook", "society" }); NpgsqlModelBuilderExtensions.HasPostgresEnum(modelBuilder, "source_category", new[] { "adventure-path", "adventures", "blog-posts", "comics", "lost-omens", "rulebook", "society" });
NpgsqlModelBuilderExtensions.HasPostgresEnum(modelBuilder, "spell_area_type", new[] { "burst", "circle", "cone", "cube", "cuboid", "cylinder", "emanation", "line", "other", "square", "varies" }); NpgsqlModelBuilderExtensions.HasPostgresEnum(modelBuilder, "spell_area_type", new[] { "burst", "circle", "cone", "cube", "cuboid", "cylinder", "emanation", "line", "other", "square", "varies" });
@@ -401,7 +401,8 @@ namespace Pf2eModel.Migrations
.HasMaxLength(255) .HasMaxLength(255)
.HasColumnType("character varying(255)") .HasColumnType("character varying(255)")
.HasColumnName("external_id") .HasColumnName("external_id")
.HasColumnOrder(3); .HasColumnOrder(3)
.HasComment("Идентификатор элемента в ссылке");
b.Property<string>("Md5") b.Property<string>("Md5")
.IsRequired() .IsRequired()
@@ -618,17 +619,20 @@ namespace Pf2eModel.Migrations
b.Property<int>("AncestryId") b.Property<int>("AncestryId")
.HasColumnType("integer") .HasColumnType("integer")
.HasColumnName("ancestry_id") .HasColumnName("ancestry_id")
.HasColumnOrder(2); .HasColumnOrder(2)
.HasComment("Идентификатор родословной");
b.Property<bool>("Boost") b.Property<bool>("Boost")
.HasColumnType("boolean") .HasColumnType("boolean")
.HasColumnName("boost") .HasColumnName("boost")
.HasColumnOrder(3); .HasColumnOrder(3)
.HasComment("Флаг повышения/снижения");
b.Property<AttributeValues>("Value") b.Property<AttributeValues>("Value")
.HasColumnType("attribute_values") .HasColumnType("attribute_values")
.HasColumnName("value") .HasColumnName("value")
.HasColumnOrder(4); .HasColumnOrder(4)
.HasComment("Значение атрибута");
b.HasKey("Id") b.HasKey("Id")
.HasName("pk_ancestry_boosts"); .HasName("pk_ancestry_boosts");
@@ -644,17 +648,20 @@ namespace Pf2eModel.Migrations
b.Property<int>("AncestryId") b.Property<int>("AncestryId")
.HasColumnType("integer") .HasColumnType("integer")
.HasColumnName("ancestry_id") .HasColumnName("ancestry_id")
.HasColumnOrder(1); .HasColumnOrder(1)
.HasComment("Идентификатор родословной");
b.Property<int>("ItemId") b.Property<int>("ItemId")
.HasColumnType("integer") .HasColumnType("integer")
.HasColumnName("item_id") .HasColumnName("item_id")
.HasColumnOrder(2); .HasColumnOrder(2)
.HasComment("Идентификатор связанной сущности");
b.Property<int>("Level") b.Property<int>("Level")
.HasColumnType("integer") .HasColumnType("integer")
.HasColumnName("level") .HasColumnName("level")
.HasColumnOrder(3); .HasColumnOrder(3)
.HasComment("Уровень сущности в родословной");
b.HasKey("AncestryId", "ItemId") b.HasKey("AncestryId", "ItemId")
.HasName("pk_ancestry_items"); .HasName("pk_ancestry_items");
@@ -670,17 +677,20 @@ namespace Pf2eModel.Migrations
b.Property<int>("AncestryId") b.Property<int>("AncestryId")
.HasColumnType("integer") .HasColumnType("integer")
.HasColumnName("ancestry_id") .HasColumnName("ancestry_id")
.HasColumnOrder(1); .HasColumnOrder(1)
.HasComment("Идентификатор родословной");
b.Property<int>("LanguageId") b.Property<int>("LanguageId")
.HasColumnType("integer") .HasColumnType("integer")
.HasColumnName("language_id") .HasColumnName("language_id")
.HasColumnOrder(2); .HasColumnOrder(2)
.HasComment("Идентификатор связанного языка");
b.Property<bool>("IsAdditional") b.Property<bool>("IsAdditional")
.HasColumnType("boolean") .HasColumnType("boolean")
.HasColumnName("is_additional") .HasColumnName("is_additional")
.HasColumnOrder(3); .HasColumnOrder(3)
.HasComment("Флаг дополнительного");
b.HasKey("AncestryId", "LanguageId") b.HasKey("AncestryId", "LanguageId")
.HasName("pk_ancestry_languages"); .HasName("pk_ancestry_languages");
@@ -731,11 +741,13 @@ namespace Pf2eModel.Migrations
{ {
b.Property<int>("ArchetypeId") b.Property<int>("ArchetypeId")
.HasColumnType("integer") .HasColumnType("integer")
.HasColumnName("archetype_id"); .HasColumnName("archetype_id")
.HasComment("Идентификатор архетипа");
b.Property<int>("FeatId") b.Property<int>("FeatId")
.HasColumnType("integer") .HasColumnType("integer")
.HasColumnName("feat_id"); .HasColumnName("feat_id")
.HasComment("Идентификатор черты");
b.HasKey("ArchetypeId", "FeatId") b.HasKey("ArchetypeId", "FeatId")
.HasName("pk_archetype_feats"); .HasName("pk_archetype_feats");
@@ -766,19 +778,22 @@ namespace Pf2eModel.Migrations
.ValueGeneratedOnAdd() .ValueGeneratedOnAdd()
.HasColumnType("integer") .HasColumnType("integer")
.HasColumnName("id") .HasColumnName("id")
.HasColumnOrder(1); .HasColumnOrder(1)
.HasComment("Идентификатор");
NpgsqlPropertyBuilderExtensions.UseIdentityByDefaultColumn(b.Property<int>("Id")); NpgsqlPropertyBuilderExtensions.UseIdentityByDefaultColumn(b.Property<int>("Id"));
b.Property<AttributeValues>("Attribute") b.Property<AttributeValues>("Attribute")
.HasColumnType("attribute_values") .HasColumnType("attribute_values")
.HasColumnName("attribute") .HasColumnName("attribute")
.HasColumnOrder(3); .HasColumnOrder(3)
.HasComment("Атрибут");
b.Property<int>("BackgroundId") b.Property<int>("BackgroundId")
.HasColumnType("integer") .HasColumnType("integer")
.HasColumnName("background_id") .HasColumnName("background_id")
.HasColumnOrder(2); .HasColumnOrder(2)
.HasComment("Идентификатор предыстории");
b.HasKey("Id") b.HasKey("Id")
.HasName("pk_background_boosts"); .HasName("pk_background_boosts");
@@ -794,12 +809,14 @@ namespace Pf2eModel.Migrations
b.Property<int>("BackgroundId") b.Property<int>("BackgroundId")
.HasColumnType("integer") .HasColumnType("integer")
.HasColumnName("background_id") .HasColumnName("background_id")
.HasColumnOrder(1); .HasColumnOrder(1)
.HasComment("Идентификатор");
b.Property<int>("EntityId") b.Property<int>("EntityId")
.HasColumnType("integer") .HasColumnType("integer")
.HasColumnName("entity_id") .HasColumnName("entity_id")
.HasColumnOrder(2); .HasColumnOrder(2)
.HasComment("Идентификатор сущности");
b.Property<int?>("Level") b.Property<int?>("Level")
.HasColumnType("integer") .HasColumnType("integer")
@@ -820,22 +837,26 @@ namespace Pf2eModel.Migrations
b.Property<int>("Id") b.Property<int>("Id")
.HasColumnType("integer") .HasColumnType("integer")
.HasColumnName("id") .HasColumnName("id")
.HasColumnOrder(1); .HasColumnOrder(1)
.HasComment("Идентификатор");
b.Property<int>("BackgroundId") b.Property<int>("BackgroundId")
.HasColumnType("integer") .HasColumnType("integer")
.HasColumnName("background_id") .HasColumnName("background_id")
.HasColumnOrder(2); .HasColumnOrder(2)
.HasComment("Идентификатор предыстории");
b.Property<TrainingRank>("Rank") b.Property<TrainingRank>("Rank")
.HasColumnType("training_rank") .HasColumnType("training_rank")
.HasColumnName("rank") .HasColumnName("rank")
.HasColumnOrder(4); .HasColumnOrder(4)
.HasComment("Ранг тренировки");
b.Property<int>("TrainingId") b.Property<int>("TrainingId")
.HasColumnType("integer") .HasColumnType("integer")
.HasColumnName("training_id") .HasColumnName("training_id")
.HasColumnOrder(3); .HasColumnOrder(3)
.HasComment("Идентификатор тренируемого навыка");
b.HasKey("Id") b.HasKey("Id")
.HasName("pk_background_skills"); .HasName("pk_background_skills");
@@ -887,25 +908,28 @@ namespace Pf2eModel.Migrations
b.ToTable("classes", (string)null); b.ToTable("classes", (string)null);
}); });
modelBuilder.Entity("Pf2eModel.Model.Structure.ClassRelation.ClassKeyAbility", b => modelBuilder.Entity("Pf2eModel.Model.Structure.ClassRelation.ClassKeyAttribute", b =>
{ {
b.Property<int>("Id") b.Property<int>("Id")
.ValueGeneratedOnAdd() .ValueGeneratedOnAdd()
.HasColumnType("integer") .HasColumnType("integer")
.HasColumnName("id") .HasColumnName("id")
.HasColumnOrder(1); .HasColumnOrder(1)
.HasComment("Идентификатор");
NpgsqlPropertyBuilderExtensions.UseIdentityByDefaultColumn(b.Property<int>("Id")); NpgsqlPropertyBuilderExtensions.UseIdentityByDefaultColumn(b.Property<int>("Id"));
b.Property<int>("ClassId") b.Property<int>("ClassId")
.HasColumnType("integer") .HasColumnType("integer")
.HasColumnName("class_id") .HasColumnName("class_id")
.HasColumnOrder(2); .HasColumnOrder(2)
.HasComment("Идентификатор класса");
b.Property<AttributeValues>("Value") b.Property<AttributeValues>("Value")
.HasColumnType("attribute_values") .HasColumnType("attribute_values")
.HasColumnName("value") .HasColumnName("value")
.HasColumnOrder(3); .HasColumnOrder(3)
.HasComment("Атрибут");
b.HasKey("Id") b.HasKey("Id")
.HasName("pk_class_key_abilities"); .HasName("pk_class_key_abilities");
@@ -922,29 +946,34 @@ namespace Pf2eModel.Migrations
.ValueGeneratedOnAdd() .ValueGeneratedOnAdd()
.HasColumnType("integer") .HasColumnType("integer")
.HasColumnName("id") .HasColumnName("id")
.HasColumnOrder(1); .HasColumnOrder(1)
.HasComment("Идентификатор");
NpgsqlPropertyBuilderExtensions.UseIdentityByDefaultColumn(b.Property<int>("Id")); NpgsqlPropertyBuilderExtensions.UseIdentityByDefaultColumn(b.Property<int>("Id"));
b.Property<int>("ClassId") b.Property<int>("ClassId")
.HasColumnType("integer") .HasColumnType("integer")
.HasColumnName("class_id") .HasColumnName("class_id")
.HasColumnOrder(2); .HasColumnOrder(2)
.HasComment("Идентификатор класса");
b.Property<int?>("EntityId") b.Property<int?>("EntityId")
.HasColumnType("integer") .HasColumnType("integer")
.HasColumnName("entity_id") .HasColumnName("entity_id")
.HasColumnOrder(5); .HasColumnOrder(5)
.HasComment("Идентификатор сущности");
b.Property<int>("Level") b.Property<int>("Level")
.HasColumnType("integer") .HasColumnType("integer")
.HasColumnName("level") .HasColumnName("level")
.HasColumnOrder(31); .HasColumnOrder(3)
.HasComment("Уровень класса");
b.Property<ClassProgressionType>("Type") b.Property<ClassProgressionType>("Type")
.HasColumnType("class_progression_type") .HasColumnType("class_progression_type")
.HasColumnName("type") .HasColumnName("type")
.HasColumnOrder(4); .HasColumnOrder(4)
.HasComment("Тип элемента прогрессии класса");
b.HasKey("Id") b.HasKey("Id")
.HasName("pk_class_progressions"); .HasName("pk_class_progressions");
@@ -964,24 +993,28 @@ namespace Pf2eModel.Migrations
.ValueGeneratedOnAdd() .ValueGeneratedOnAdd()
.HasColumnType("integer") .HasColumnType("integer")
.HasColumnName("id") .HasColumnName("id")
.HasColumnOrder(1); .HasColumnOrder(1)
.HasComment("Идентификатор");
NpgsqlPropertyBuilderExtensions.UseIdentityByDefaultColumn(b.Property<int>("Id")); NpgsqlPropertyBuilderExtensions.UseIdentityByDefaultColumn(b.Property<int>("Id"));
b.Property<int>("ClassId") b.Property<int>("ClassId")
.HasColumnType("integer") .HasColumnType("integer")
.HasColumnName("class_id") .HasColumnName("class_id")
.HasColumnOrder(2); .HasColumnOrder(2)
.HasComment("Идентификатор класса");
b.Property<TrainingRank>("Rank") b.Property<TrainingRank>("Rank")
.HasColumnType("training_rank") .HasColumnType("training_rank")
.HasColumnName("rank") .HasColumnName("rank")
.HasColumnOrder(4); .HasColumnOrder(4)
.HasComment("Ранг тренировки");
b.Property<int?>("TrainingId") b.Property<int?>("TrainingId")
.HasColumnType("integer") .HasColumnType("integer")
.HasColumnName("training_id") .HasColumnName("training_id")
.HasColumnOrder(3); .HasColumnOrder(3)
.HasComment("Идентификатор тренируемого навыка");
b.HasKey("Id") b.HasKey("Id")
.HasName("pk_class_trainings"); .HasName("pk_class_trainings");
@@ -1020,24 +1053,28 @@ namespace Pf2eModel.Migrations
.ValueGeneratedOnAdd() .ValueGeneratedOnAdd()
.HasColumnType("integer") .HasColumnType("integer")
.HasColumnName("id") .HasColumnName("id")
.HasColumnOrder(1); .HasColumnOrder(1)
.HasComment("Идентификатор связи");
NpgsqlPropertyBuilderExtensions.UseIdentityByDefaultColumn(b.Property<int>("Id")); NpgsqlPropertyBuilderExtensions.UseIdentityByDefaultColumn(b.Property<int>("Id"));
b.Property<TrainingRank>("Rank") b.Property<TrainingRank>("Rank")
.HasColumnType("training_rank") .HasColumnType("training_rank")
.HasColumnName("rank") .HasColumnName("rank")
.HasColumnOrder(4); .HasColumnOrder(4)
.HasComment("Ранг тренировки");
b.Property<int>("SubclassId") b.Property<int>("SubclassId")
.HasColumnType("integer") .HasColumnType("integer")
.HasColumnName("subclass_id") .HasColumnName("subclass_id")
.HasColumnOrder(2); .HasColumnOrder(2)
.HasComment("Идентификатор подкласса");
b.Property<int>("TrainingId") b.Property<int>("TrainingId")
.HasColumnType("integer") .HasColumnType("integer")
.HasColumnName("training_id") .HasColumnName("training_id")
.HasColumnOrder(3); .HasColumnOrder(3)
.HasComment("Идентификатор тренировки");
b.HasKey("Id") b.HasKey("Id")
.HasName("pk_subclass_trainings"); .HasName("pk_subclass_trainings");
@@ -1120,12 +1157,14 @@ namespace Pf2eModel.Migrations
b.Property<int>("DeityId") b.Property<int>("DeityId")
.HasColumnType("integer") .HasColumnType("integer")
.HasColumnName("deity_id") .HasColumnName("deity_id")
.HasColumnOrder(1); .HasColumnOrder(1)
.HasComment("Идентификатор божества");
b.Property<AttributeValues>("Attribute") b.Property<AttributeValues>("Attribute")
.HasColumnType("attribute_values") .HasColumnType("attribute_values")
.HasColumnName("attribute") .HasColumnName("attribute")
.HasColumnOrder(2); .HasColumnOrder(2)
.HasComment("Атрибут божества");
b.HasKey("DeityId", "Attribute") b.HasKey("DeityId", "Attribute")
.HasName("pk_deity_attributes"); .HasName("pk_deity_attributes");
@@ -1139,19 +1178,22 @@ namespace Pf2eModel.Migrations
.ValueGeneratedOnAdd() .ValueGeneratedOnAdd()
.HasColumnType("integer") .HasColumnType("integer")
.HasColumnName("id") .HasColumnName("id")
.HasColumnOrder(1); .HasColumnOrder(1)
.HasComment("Идентификатор");
NpgsqlPropertyBuilderExtensions.UseIdentityByDefaultColumn(b.Property<int>("Id")); NpgsqlPropertyBuilderExtensions.UseIdentityByDefaultColumn(b.Property<int>("Id"));
b.Property<int>("DeityId") b.Property<int>("DeityId")
.HasColumnType("integer") .HasColumnType("integer")
.HasColumnName("deity_id") .HasColumnName("deity_id")
.HasColumnOrder(2); .HasColumnOrder(2)
.HasComment("Идентификатор божества");
b.Property<bool>("IsPrimary") b.Property<bool>("IsPrimary")
.HasColumnType("boolean") .HasColumnType("boolean")
.HasColumnName("is_primary") .HasColumnName("is_primary")
.HasColumnOrder(3); .HasColumnOrder(3)
.HasComment("Флаг основного домена");
b.Property<string>("Value") b.Property<string>("Value")
.IsRequired() .IsRequired()
@@ -1175,24 +1217,28 @@ namespace Pf2eModel.Migrations
.ValueGeneratedOnAdd() .ValueGeneratedOnAdd()
.HasColumnType("integer") .HasColumnType("integer")
.HasColumnName("id") .HasColumnName("id")
.HasColumnOrder(1); .HasColumnOrder(1)
.HasComment("Идентификатор");
NpgsqlPropertyBuilderExtensions.UseIdentityByDefaultColumn(b.Property<int>("Id")); NpgsqlPropertyBuilderExtensions.UseIdentityByDefaultColumn(b.Property<int>("Id"));
b.Property<int>("DeityId") b.Property<int>("DeityId")
.HasColumnType("integer") .HasColumnType("integer")
.HasColumnName("deity_id") .HasColumnName("deity_id")
.HasColumnOrder(2); .HasColumnOrder(2)
.HasComment("Идентификатор божества");
b.Property<int>("Level") b.Property<int>("Level")
.HasColumnType("integer") .HasColumnType("integer")
.HasColumnName("level") .HasColumnName("level")
.HasColumnOrder(3); .HasColumnOrder(3)
.HasComment("Уровень заклинания");
b.Property<int>("SpellId") b.Property<int>("SpellId")
.HasColumnType("integer") .HasColumnType("integer")
.HasColumnName("spell_id") .HasColumnName("spell_id")
.HasColumnOrder(4); .HasColumnOrder(4)
.HasComment("Идентификатор заклинания");
b.HasKey("Id") b.HasKey("Id")
.HasName("pk_deity_spells"); .HasName("pk_deity_spells");
@@ -1212,21 +1258,24 @@ namespace Pf2eModel.Migrations
.ValueGeneratedOnAdd() .ValueGeneratedOnAdd()
.HasColumnType("integer") .HasColumnType("integer")
.HasColumnName("id") .HasColumnName("id")
.HasColumnOrder(1); .HasColumnOrder(1)
.HasComment("Идентификатор");
NpgsqlPropertyBuilderExtensions.UseIdentityByDefaultColumn(b.Property<int>("Id")); NpgsqlPropertyBuilderExtensions.UseIdentityByDefaultColumn(b.Property<int>("Id"));
b.Property<int>("DeityId") b.Property<int>("DeityId")
.HasColumnType("integer") .HasColumnType("integer")
.HasColumnName("deity_id") .HasColumnName("deity_id")
.HasColumnOrder(2); .HasColumnOrder(2)
.HasComment("Идентификатор божества");
b.Property<string>("Weapon") b.Property<string>("Weapon")
.IsRequired() .IsRequired()
.HasMaxLength(255) .HasMaxLength(255)
.HasColumnType("character varying(255)") .HasColumnType("character varying(255)")
.HasColumnName("weapon") .HasColumnName("weapon")
.HasColumnOrder(3); .HasColumnOrder(3)
.HasComment("Название оружия");
b.HasKey("Id") b.HasKey("Id")
.HasName("pk_deity_weapons"); .HasName("pk_deity_weapons");
@@ -1281,21 +1330,24 @@ namespace Pf2eModel.Migrations
.ValueGeneratedOnAdd() .ValueGeneratedOnAdd()
.HasColumnType("integer") .HasColumnType("integer")
.HasColumnName("id") .HasColumnName("id")
.HasColumnOrder(1); .HasColumnOrder(1)
.HasComment("Идентификатор");
NpgsqlPropertyBuilderExtensions.UseIdentityByDefaultColumn(b.Property<int>("Id")); NpgsqlPropertyBuilderExtensions.UseIdentityByDefaultColumn(b.Property<int>("Id"));
b.Property<int>("FeatId") b.Property<int>("FeatId")
.HasColumnType("integer") .HasColumnType("integer")
.HasColumnName("feat_id") .HasColumnName("feat_id")
.HasColumnOrder(2); .HasColumnOrder(2)
.HasComment("Идентификатор черты");
b.Property<string>("Value") b.Property<string>("Value")
.IsRequired() .IsRequired()
.HasMaxLength(255) .HasMaxLength(255)
.HasColumnType("character varying(255)") .HasColumnType("character varying(255)")
.HasColumnName("value") .HasColumnName("value")
.HasColumnOrder(3); .HasColumnOrder(3)
.HasComment("Предварительное требование");
b.HasKey("Id") b.HasKey("Id")
.HasName("pk_feat_prerequisites"); .HasName("pk_feat_prerequisites");
@@ -1454,18 +1506,21 @@ namespace Pf2eModel.Migrations
b.Property<int>("RitualId") b.Property<int>("RitualId")
.HasColumnType("integer") .HasColumnType("integer")
.HasColumnName("ritual_id") .HasColumnName("ritual_id")
.HasColumnOrder(1); .HasColumnOrder(1)
.HasComment("Идентификатор ритуала");
b.Property<string>("Details") b.Property<string>("Details")
.HasMaxLength(255) .HasMaxLength(255)
.HasColumnType("jsonb") .HasColumnType("jsonb")
.HasColumnName("details") .HasColumnName("details")
.HasColumnOrder(2); .HasColumnOrder(2)
.HasComment("Описание области действия ритуала");
b.Property<SpellAreaType>("Type") b.Property<SpellAreaType>("Type")
.HasColumnType("spell_area_type") .HasColumnType("spell_area_type")
.HasColumnName("type") .HasColumnName("type")
.HasColumnOrder(3); .HasColumnOrder(3)
.HasComment("Тип области действия ритуала");
b.HasKey("RitualId") b.HasKey("RitualId")
.HasName("pk_ritual_areas"); .HasName("pk_ritual_areas");
@@ -1479,34 +1534,40 @@ namespace Pf2eModel.Migrations
.ValueGeneratedOnAdd() .ValueGeneratedOnAdd()
.HasColumnType("integer") .HasColumnType("integer")
.HasColumnName("id") .HasColumnName("id")
.HasColumnOrder(1); .HasColumnOrder(1)
.HasComment("Идентификатор");
NpgsqlPropertyBuilderExtensions.UseIdentityByDefaultColumn(b.Property<int>("Id")); NpgsqlPropertyBuilderExtensions.UseIdentityByDefaultColumn(b.Property<int>("Id"));
b.Property<bool>("IsPrimary") b.Property<bool>("IsPrimary")
.HasColumnType("boolean") .HasColumnType("boolean")
.HasColumnName("is_primary") .HasColumnName("is_primary")
.HasColumnOrder(6); .HasColumnOrder(6)
.HasComment("Флаг основной проверки");
b.Property<TrainingRank>("Rank") b.Property<TrainingRank>("Rank")
.HasColumnType("training_rank") .HasColumnType("training_rank")
.HasColumnName("rank") .HasColumnName("rank")
.HasColumnOrder(5); .HasColumnOrder(5)
.HasComment("Ранг тренировки");
b.Property<int>("RitualId") b.Property<int>("RitualId")
.HasColumnType("integer") .HasColumnType("integer")
.HasColumnName("ritual_id") .HasColumnName("ritual_id")
.HasColumnOrder(2); .HasColumnOrder(2)
.HasComment("Идентификатор ритуала");
b.Property<int?>("TrainingId") b.Property<int?>("TrainingId")
.HasColumnType("integer") .HasColumnType("integer")
.HasColumnName("training_id") .HasColumnName("training_id")
.HasColumnOrder(3); .HasColumnOrder(3)
.HasComment("Идентификатор тренировки");
b.Property<string>("TrainingString") b.Property<string>("TrainingString")
.HasColumnType("jsonb") .HasColumnType("jsonb")
.HasColumnName("training_string") .HasColumnName("training_string")
.HasColumnOrder(4); .HasColumnOrder(4)
.HasComment("Дополнение к проверке");
b.HasKey("Id") b.HasKey("Id")
.HasName("pk_ritual_checks"); .HasName("pk_ritual_checks");
@@ -1642,7 +1703,8 @@ namespace Pf2eModel.Migrations
.ValueGeneratedOnAdd() .ValueGeneratedOnAdd()
.HasColumnType("integer") .HasColumnType("integer")
.HasColumnName("id") .HasColumnName("id")
.HasColumnOrder(1); .HasColumnOrder(1)
.HasComment("Идентификатор");
NpgsqlPropertyBuilderExtensions.UseIdentityByDefaultColumn(b.Property<int>("Id")); NpgsqlPropertyBuilderExtensions.UseIdentityByDefaultColumn(b.Property<int>("Id"));
@@ -1650,17 +1712,20 @@ namespace Pf2eModel.Migrations
.HasMaxLength(255) .HasMaxLength(255)
.HasColumnType("jsonb") .HasColumnType("jsonb")
.HasColumnName("details") .HasColumnName("details")
.HasColumnOrder(3); .HasColumnOrder(3)
.HasComment("Описание области заклинания");
b.Property<int>("SpellId") b.Property<int>("SpellId")
.HasColumnType("integer") .HasColumnType("integer")
.HasColumnName("spell_id") .HasColumnName("spell_id")
.HasColumnOrder(2); .HasColumnOrder(2)
.HasComment("Идентификатор заклинания");
b.Property<SpellAreaType>("Type") b.Property<SpellAreaType>("Type")
.HasColumnType("spell_area_type") .HasColumnType("spell_area_type")
.HasColumnName("type") .HasColumnName("type")
.HasColumnOrder(4); .HasColumnOrder(4)
.HasComment("Тип области заклинания");
b.HasKey("Id") b.HasKey("Id")
.HasName("pk_spell_areas"); .HasName("pk_spell_areas");
@@ -1677,56 +1742,65 @@ namespace Pf2eModel.Migrations
.ValueGeneratedOnAdd() .ValueGeneratedOnAdd()
.HasColumnType("integer") .HasColumnType("integer")
.HasColumnName("id") .HasColumnName("id")
.HasColumnOrder(1); .HasColumnOrder(1)
.HasComment("Идентификатор урона заклинания");
NpgsqlPropertyBuilderExtensions.UseIdentityByDefaultColumn(b.Property<int>("Id")); NpgsqlPropertyBuilderExtensions.UseIdentityByDefaultColumn(b.Property<int>("Id"));
b.Property<bool?>("ApplyMod") b.Property<bool?>("ApplyMod")
.HasColumnType("boolean") .HasColumnType("boolean")
.HasColumnName("apply_mod") .HasColumnName("apply_mod")
.HasColumnOrder(4); .HasColumnOrder(4)
.HasComment("Применяется модификатор?");
b.Property<SpellDamageCategory?>("Category") b.Property<SpellDamageCategory?>("Category")
.HasColumnType("spell_damage_category") .HasColumnType("spell_damage_category")
.HasColumnName("category") .HasColumnName("category")
.HasColumnOrder(5); .HasColumnOrder(5)
.HasComment("Категория урона заклинания");
b.Property<string>("Formula") b.Property<string>("Formula")
.IsRequired() .IsRequired()
.HasMaxLength(255) .HasMaxLength(255)
.HasColumnType("character varying(255)") .HasColumnType("character varying(255)")
.HasColumnName("formula") .HasColumnName("formula")
.HasColumnOrder(6); .HasColumnOrder(6)
.HasComment("Формула урона заклинания");
b.Property<string>("Key") b.Property<string>("Key")
.IsRequired() .IsRequired()
.HasMaxLength(255) .HasMaxLength(255)
.HasColumnType("character varying(255)") .HasColumnType("character varying(255)")
.HasColumnName("key") .HasColumnName("key")
.HasColumnOrder(3); .HasColumnOrder(3)
.HasComment("Уровень заклинания");
b.Property<SpellDamageKinds>("Kinds") b.Property<SpellDamageKinds>("Kinds")
.HasColumnType("spell_damage_kinds") .HasColumnType("spell_damage_kinds")
.HasColumnName("kinds") .HasColumnName("kinds")
.HasColumnOrder(7); .HasColumnOrder(7)
.HasComment("Тип урона заклинания");
b.Property<string>("Materials") b.Property<string>("Materials")
.HasMaxLength(255) .HasMaxLength(255)
.HasColumnType("character varying(255)") .HasColumnType("character varying(255)")
.HasColumnName("materials") .HasColumnName("materials")
.HasColumnOrder(8); .HasColumnOrder(8)
.HasComment("Материалы для заклинания");
b.Property<int>("SpellId") b.Property<int>("SpellId")
.HasColumnType("integer") .HasColumnType("integer")
.HasColumnName("spell_id") .HasColumnName("spell_id")
.HasColumnOrder(2); .HasColumnOrder(2)
.HasComment("Идентификатор заклинания");
b.Property<string>("Type") b.Property<string>("Type")
.IsRequired() .IsRequired()
.HasMaxLength(255) .HasMaxLength(255)
.HasColumnType("character varying(255)") .HasColumnType("character varying(255)")
.HasColumnName("type") .HasColumnName("type")
.HasColumnOrder(9); .HasColumnOrder(9)
.HasComment("Тип урона заклинания");
b.HasKey("Id") b.HasKey("Id")
.HasName("pk_spell_damages"); .HasName("pk_spell_damages");
@@ -1743,14 +1817,16 @@ namespace Pf2eModel.Migrations
.ValueGeneratedOnAdd() .ValueGeneratedOnAdd()
.HasColumnType("integer") .HasColumnType("integer")
.HasColumnName("id") .HasColumnName("id")
.HasColumnOrder(1); .HasColumnOrder(1)
.HasComment("Идентификатор");
NpgsqlPropertyBuilderExtensions.UseIdentityByDefaultColumn(b.Property<int>("Id")); NpgsqlPropertyBuilderExtensions.UseIdentityByDefaultColumn(b.Property<int>("Id"));
b.Property<bool?>("IsBasic") b.Property<bool?>("IsBasic")
.HasColumnType("boolean") .HasColumnType("boolean")
.HasColumnName("is_basic") .HasColumnName("is_basic")
.HasColumnOrder(4); .HasColumnOrder(4)
.HasComment("Базовый спасборосок?");
b.Property<bool>("IsPassive") b.Property<bool>("IsPassive")
.HasColumnType("boolean") .HasColumnType("boolean")
@@ -1760,7 +1836,8 @@ namespace Pf2eModel.Migrations
b.Property<int>("SpellId") b.Property<int>("SpellId")
.HasColumnType("integer") .HasColumnType("integer")
.HasColumnName("spell_id") .HasColumnName("spell_id")
.HasColumnOrder(2); .HasColumnOrder(2)
.HasComment("Идентификатор заклинания");
b.Property<string>("Statistic") b.Property<string>("Statistic")
.IsRequired() .IsRequired()
@@ -2188,7 +2265,7 @@ namespace Pf2eModel.Migrations
b.Navigation("Entity"); b.Navigation("Entity");
}); });
modelBuilder.Entity("Pf2eModel.Model.Structure.ClassRelation.ClassKeyAbility", b => modelBuilder.Entity("Pf2eModel.Model.Structure.ClassRelation.ClassKeyAttribute", b =>
{ {
b.HasOne("Pf2eModel.Model.Structure.Class", "Class") b.HasOne("Pf2eModel.Model.Structure.Class", "Class")
.WithMany("ClassKeyAbilities") .WithMany("ClassKeyAbilities")
@@ -26,7 +26,7 @@ namespace Pf2eModel.Migrations
.Annotation("Npgsql:Enum:entity_rarity", "common,rare,uncommon,unique") .Annotation("Npgsql:Enum:entity_rarity", "common,rare,uncommon,unique")
.Annotation("Npgsql:Enum:entity_type", "action,ancestry,archetype,background,backpack,campaign_feature,class,condition,deity,feat,heritage,language,ritual,rule,spell,subclass,subclass_group,trait,unknown") .Annotation("Npgsql:Enum:entity_type", "action,ancestry,archetype,background,backpack,campaign_feature,class,condition,deity,feat,heritage,language,ritual,rule,spell,subclass,subclass_group,trait,unknown")
.Annotation("Npgsql:Enum:feat_category", "ancestry,ancestry-feature,archetype,bonus,calling,campaign-feature,class,class-feature,curse,deityboon,general,pfsboon,skill,uncategorized") .Annotation("Npgsql:Enum:feat_category", "ancestry,ancestry-feature,archetype,bonus,calling,campaign-feature,class,class-feature,curse,deityboon,general,pfsboon,skill,uncategorized")
.Annotation("Npgsql:Enum:locale_type", "english,hobby,legacy,legacy_english,other,russian") .Annotation("Npgsql:Enum:locale_type", "english,hobby,other,russian")
.Annotation("Npgsql:Enum:size_enum", "huge,large,medium,small,tiny") .Annotation("Npgsql:Enum:size_enum", "huge,large,medium,small,tiny")
.Annotation("Npgsql:Enum:source_category", "adventure-path,adventures,blog-posts,comics,lost-omens,rulebook,society") .Annotation("Npgsql:Enum:source_category", "adventure-path,adventures,blog-posts,comics,lost-omens,rulebook,society")
.Annotation("Npgsql:Enum:spell_area_type", "burst,circle,cone,cube,cuboid,cylinder,emanation,line,other,square,varies") .Annotation("Npgsql:Enum:spell_area_type", "burst,circle,cone,cube,cuboid,cylinder,emanation,line,other,square,varies")
@@ -440,7 +440,7 @@ namespace Pf2eModel.Migrations
{ {
entity_id = table.Column<int>(type: "integer", nullable: false, comment: "Идентификатор сущности"), entity_id = table.Column<int>(type: "integer", nullable: false, comment: "Идентификатор сущности"),
target_id = table.Column<int>(type: "integer", nullable: false, comment: "Идентификатор цели"), target_id = table.Column<int>(type: "integer", nullable: false, comment: "Идентификатор цели"),
external_id = table.Column<string>(type: "character varying(255)", maxLength: 255, nullable: true), external_id = table.Column<string>(type: "character varying(255)", maxLength: 255, nullable: true, comment: "Идентификатор элемента в ссылке"),
suffix = table.Column<string>(type: "character varying(255)", maxLength: 255, nullable: false, comment: "Часть URL до объекта. Для источников Foundry - полный UUID объекта"), suffix = table.Column<string>(type: "character varying(255)", maxLength: 255, nullable: false, comment: "Часть URL до объекта. Для источников Foundry - полный UUID объекта"),
md5 = table.Column<string>(type: "character varying(32)", maxLength: 32, nullable: false, comment: "Контрольная сумма объекта") md5 = table.Column<string>(type: "character varying(32)", maxLength: 32, nullable: false, comment: "Контрольная сумма объекта")
}, },
@@ -539,9 +539,9 @@ namespace Pf2eModel.Migrations
{ {
id = table.Column<int>(type: "integer", nullable: false) id = table.Column<int>(type: "integer", nullable: false)
.Annotation("Npgsql:ValueGenerationStrategy", NpgsqlValueGenerationStrategy.IdentityByDefaultColumn), .Annotation("Npgsql:ValueGenerationStrategy", NpgsqlValueGenerationStrategy.IdentityByDefaultColumn),
ancestry_id = table.Column<int>(type: "integer", nullable: false), ancestry_id = table.Column<int>(type: "integer", nullable: false, comment: "Идентификатор родословной"),
boost = table.Column<bool>(type: "boolean", nullable: false), boost = table.Column<bool>(type: "boolean", nullable: false, comment: "Флаг повышения/снижения"),
value = table.Column<AttributeValues>(type: "attribute_values", nullable: false) value = table.Column<AttributeValues>(type: "attribute_values", nullable: false, comment: "Значение атрибута")
}, },
constraints: table => constraints: table =>
{ {
@@ -558,9 +558,9 @@ namespace Pf2eModel.Migrations
name: "ancestry_items", name: "ancestry_items",
columns: table => new columns: table => new
{ {
ancestry_id = table.Column<int>(type: "integer", nullable: false), ancestry_id = table.Column<int>(type: "integer", nullable: false, comment: "Идентификатор родословной"),
item_id = table.Column<int>(type: "integer", nullable: false), item_id = table.Column<int>(type: "integer", nullable: false, comment: "Идентификатор связанной сущности"),
level = table.Column<int>(type: "integer", nullable: false) level = table.Column<int>(type: "integer", nullable: false, comment: "Уровень сущности в родословной")
}, },
constraints: table => constraints: table =>
{ {
@@ -607,10 +607,10 @@ namespace Pf2eModel.Migrations
name: "background_boosts", name: "background_boosts",
columns: table => new columns: table => new
{ {
id = table.Column<int>(type: "integer", nullable: false) id = table.Column<int>(type: "integer", nullable: false, comment: "Идентификатор")
.Annotation("Npgsql:ValueGenerationStrategy", NpgsqlValueGenerationStrategy.IdentityByDefaultColumn), .Annotation("Npgsql:ValueGenerationStrategy", NpgsqlValueGenerationStrategy.IdentityByDefaultColumn),
background_id = table.Column<int>(type: "integer", nullable: false), background_id = table.Column<int>(type: "integer", nullable: false, comment: "Идентификатор предыстории"),
attribute = table.Column<AttributeValues>(type: "attribute_values", nullable: false) attribute = table.Column<AttributeValues>(type: "attribute_values", nullable: false, comment: "Атрибут")
}, },
constraints: table => constraints: table =>
{ {
@@ -627,8 +627,8 @@ namespace Pf2eModel.Migrations
name: "background_items", name: "background_items",
columns: table => new columns: table => new
{ {
background_id = table.Column<int>(type: "integer", nullable: false), background_id = table.Column<int>(type: "integer", nullable: false, comment: "Идентификатор"),
entity_id = table.Column<int>(type: "integer", nullable: false), entity_id = table.Column<int>(type: "integer", nullable: false, comment: "Идентификатор сущности"),
level = table.Column<int>(type: "integer", nullable: true) level = table.Column<int>(type: "integer", nullable: true)
}, },
constraints: table => constraints: table =>
@@ -652,10 +652,10 @@ namespace Pf2eModel.Migrations
name: "background_skills", name: "background_skills",
columns: table => new columns: table => new
{ {
id = table.Column<int>(type: "integer", nullable: false), id = table.Column<int>(type: "integer", nullable: false, comment: "Идентификатор"),
background_id = table.Column<int>(type: "integer", nullable: false), background_id = table.Column<int>(type: "integer", nullable: false, comment: "Идентификатор предыстории"),
training_id = table.Column<int>(type: "integer", nullable: false), training_id = table.Column<int>(type: "integer", nullable: false, comment: "Идентификатор тренируемого навыка"),
rank = table.Column<TrainingRank>(type: "training_rank", nullable: false) rank = table.Column<TrainingRank>(type: "training_rank", nullable: false, comment: "Ранг тренировки")
}, },
constraints: table => constraints: table =>
{ {
@@ -678,10 +678,10 @@ namespace Pf2eModel.Migrations
name: "class_key_abilities", name: "class_key_abilities",
columns: table => new columns: table => new
{ {
id = table.Column<int>(type: "integer", nullable: false) id = table.Column<int>(type: "integer", nullable: false, comment: "Идентификатор")
.Annotation("Npgsql:ValueGenerationStrategy", NpgsqlValueGenerationStrategy.IdentityByDefaultColumn), .Annotation("Npgsql:ValueGenerationStrategy", NpgsqlValueGenerationStrategy.IdentityByDefaultColumn),
class_id = table.Column<int>(type: "integer", nullable: false), class_id = table.Column<int>(type: "integer", nullable: false, comment: "Идентификатор класса"),
value = table.Column<AttributeValues>(type: "attribute_values", nullable: false) value = table.Column<AttributeValues>(type: "attribute_values", nullable: false, comment: "Атрибут")
}, },
constraints: table => constraints: table =>
{ {
@@ -698,12 +698,12 @@ namespace Pf2eModel.Migrations
name: "class_progressions", name: "class_progressions",
columns: table => new columns: table => new
{ {
id = table.Column<int>(type: "integer", nullable: false) id = table.Column<int>(type: "integer", nullable: false, comment: "Идентификатор")
.Annotation("Npgsql:ValueGenerationStrategy", NpgsqlValueGenerationStrategy.IdentityByDefaultColumn), .Annotation("Npgsql:ValueGenerationStrategy", NpgsqlValueGenerationStrategy.IdentityByDefaultColumn),
class_id = table.Column<int>(type: "integer", nullable: false), class_id = table.Column<int>(type: "integer", nullable: false, comment: "Идентификатор класса"),
type = table.Column<ClassProgressionType>(type: "class_progression_type", nullable: false), level = table.Column<int>(type: "integer", nullable: false, comment: "Уровень класса"),
entity_id = table.Column<int>(type: "integer", nullable: true), type = table.Column<ClassProgressionType>(type: "class_progression_type", nullable: false, comment: "Тип элемента прогрессии класса"),
level = table.Column<int>(type: "integer", nullable: false) entity_id = table.Column<int>(type: "integer", nullable: true, comment: "Идентификатор сущности")
}, },
constraints: table => constraints: table =>
{ {
@@ -726,11 +726,11 @@ namespace Pf2eModel.Migrations
name: "class_trainings", name: "class_trainings",
columns: table => new columns: table => new
{ {
id = table.Column<int>(type: "integer", nullable: false) id = table.Column<int>(type: "integer", nullable: false, comment: "Идентификатор")
.Annotation("Npgsql:ValueGenerationStrategy", NpgsqlValueGenerationStrategy.IdentityByDefaultColumn), .Annotation("Npgsql:ValueGenerationStrategy", NpgsqlValueGenerationStrategy.IdentityByDefaultColumn),
class_id = table.Column<int>(type: "integer", nullable: false), class_id = table.Column<int>(type: "integer", nullable: false, comment: "Идентификатор класса"),
training_id = table.Column<int>(type: "integer", nullable: true), training_id = table.Column<int>(type: "integer", nullable: true, comment: "Идентификатор тренируемого навыка"),
rank = table.Column<TrainingRank>(type: "training_rank", nullable: false) rank = table.Column<TrainingRank>(type: "training_rank", nullable: false, comment: "Ранг тренировки")
}, },
constraints: table => constraints: table =>
{ {
@@ -777,8 +777,8 @@ namespace Pf2eModel.Migrations
name: "deity_attributes", name: "deity_attributes",
columns: table => new columns: table => new
{ {
deity_id = table.Column<int>(type: "integer", nullable: false), deity_id = table.Column<int>(type: "integer", nullable: false, comment: "Идентификатор божества"),
attribute = table.Column<AttributeValues>(type: "attribute_values", nullable: false) attribute = table.Column<AttributeValues>(type: "attribute_values", nullable: false, comment: "Атрибут божества")
}, },
constraints: table => constraints: table =>
{ {
@@ -795,10 +795,10 @@ namespace Pf2eModel.Migrations
name: "deity_domains", name: "deity_domains",
columns: table => new columns: table => new
{ {
id = table.Column<int>(type: "integer", nullable: false) id = table.Column<int>(type: "integer", nullable: false, comment: "Идентификатор")
.Annotation("Npgsql:ValueGenerationStrategy", NpgsqlValueGenerationStrategy.IdentityByDefaultColumn), .Annotation("Npgsql:ValueGenerationStrategy", NpgsqlValueGenerationStrategy.IdentityByDefaultColumn),
deity_id = table.Column<int>(type: "integer", nullable: false), deity_id = table.Column<int>(type: "integer", nullable: false, comment: "Идентификатор божества"),
is_primary = table.Column<bool>(type: "boolean", nullable: false), is_primary = table.Column<bool>(type: "boolean", nullable: false, comment: "Флаг основного домена"),
value = table.Column<string>(type: "character varying(255)", maxLength: 255, nullable: false) value = table.Column<string>(type: "character varying(255)", maxLength: 255, nullable: false)
}, },
constraints: table => constraints: table =>
@@ -840,10 +840,10 @@ namespace Pf2eModel.Migrations
name: "deity_weapons", name: "deity_weapons",
columns: table => new columns: table => new
{ {
id = table.Column<int>(type: "integer", nullable: false) id = table.Column<int>(type: "integer", nullable: false, comment: "Идентификатор")
.Annotation("Npgsql:ValueGenerationStrategy", NpgsqlValueGenerationStrategy.IdentityByDefaultColumn), .Annotation("Npgsql:ValueGenerationStrategy", NpgsqlValueGenerationStrategy.IdentityByDefaultColumn),
deity_id = table.Column<int>(type: "integer", nullable: false), deity_id = table.Column<int>(type: "integer", nullable: false, comment: "Идентификатор божества"),
weapon = table.Column<string>(type: "character varying(255)", maxLength: 255, nullable: false) weapon = table.Column<string>(type: "character varying(255)", maxLength: 255, nullable: false, comment: "Название оружия")
}, },
constraints: table => constraints: table =>
{ {
@@ -886,10 +886,10 @@ namespace Pf2eModel.Migrations
name: "feat_prerequisites", name: "feat_prerequisites",
columns: table => new columns: table => new
{ {
id = table.Column<int>(type: "integer", nullable: false) id = table.Column<int>(type: "integer", nullable: false, comment: "Идентификатор")
.Annotation("Npgsql:ValueGenerationStrategy", NpgsqlValueGenerationStrategy.IdentityByDefaultColumn), .Annotation("Npgsql:ValueGenerationStrategy", NpgsqlValueGenerationStrategy.IdentityByDefaultColumn),
feat_id = table.Column<int>(type: "integer", nullable: false), feat_id = table.Column<int>(type: "integer", nullable: false, comment: "Идентификатор черты"),
value = table.Column<string>(type: "character varying(255)", maxLength: 255, nullable: false) value = table.Column<string>(type: "character varying(255)", maxLength: 255, nullable: false, comment: "Предварительное требование")
}, },
constraints: table => constraints: table =>
{ {
@@ -906,9 +906,9 @@ namespace Pf2eModel.Migrations
name: "ancestry_languages", name: "ancestry_languages",
columns: table => new columns: table => new
{ {
ancestry_id = table.Column<int>(type: "integer", nullable: false), ancestry_id = table.Column<int>(type: "integer", nullable: false, comment: "Идентификатор родословной"),
language_id = table.Column<int>(type: "integer", nullable: false), language_id = table.Column<int>(type: "integer", nullable: false, comment: "Идентификатор связанного языка"),
is_additional = table.Column<bool>(type: "boolean", nullable: false) is_additional = table.Column<bool>(type: "boolean", nullable: false, comment: "Флаг дополнительного")
}, },
constraints: table => constraints: table =>
{ {
@@ -931,9 +931,9 @@ namespace Pf2eModel.Migrations
name: "ritual_areas", name: "ritual_areas",
columns: table => new columns: table => new
{ {
ritual_id = table.Column<int>(type: "integer", nullable: false), ritual_id = table.Column<int>(type: "integer", nullable: false, comment: "Идентификатор ритуала"),
details = table.Column<string>(type: "jsonb", maxLength: 255, nullable: true), details = table.Column<string>(type: "jsonb", maxLength: 255, nullable: true, comment: "Описание области действия ритуала"),
type = table.Column<SpellAreaType>(type: "spell_area_type", nullable: false) type = table.Column<SpellAreaType>(type: "spell_area_type", nullable: false, comment: "Тип области действия ритуала")
}, },
constraints: table => constraints: table =>
{ {
@@ -950,13 +950,13 @@ namespace Pf2eModel.Migrations
name: "ritual_checks", name: "ritual_checks",
columns: table => new columns: table => new
{ {
id = table.Column<int>(type: "integer", nullable: false) id = table.Column<int>(type: "integer", nullable: false, comment: "Идентификатор")
.Annotation("Npgsql:ValueGenerationStrategy", NpgsqlValueGenerationStrategy.IdentityByDefaultColumn), .Annotation("Npgsql:ValueGenerationStrategy", NpgsqlValueGenerationStrategy.IdentityByDefaultColumn),
ritual_id = table.Column<int>(type: "integer", nullable: false), ritual_id = table.Column<int>(type: "integer", nullable: false, comment: "Идентификатор ритуала"),
training_id = table.Column<int>(type: "integer", nullable: true), training_id = table.Column<int>(type: "integer", nullable: true, comment: "Идентификатор тренировки"),
training_string = table.Column<string>(type: "jsonb", nullable: true), training_string = table.Column<string>(type: "jsonb", nullable: true, comment: "Дополнение к проверке"),
rank = table.Column<TrainingRank>(type: "training_rank", nullable: false), rank = table.Column<TrainingRank>(type: "training_rank", nullable: false, comment: "Ранг тренировки"),
is_primary = table.Column<bool>(type: "boolean", nullable: false) is_primary = table.Column<bool>(type: "boolean", nullable: false, comment: "Флаг основной проверки")
}, },
constraints: table => constraints: table =>
{ {
@@ -979,11 +979,11 @@ namespace Pf2eModel.Migrations
name: "deity_spells", name: "deity_spells",
columns: table => new columns: table => new
{ {
id = table.Column<int>(type: "integer", nullable: false) id = table.Column<int>(type: "integer", nullable: false, comment: "Идентификатор")
.Annotation("Npgsql:ValueGenerationStrategy", NpgsqlValueGenerationStrategy.IdentityByDefaultColumn), .Annotation("Npgsql:ValueGenerationStrategy", NpgsqlValueGenerationStrategy.IdentityByDefaultColumn),
deity_id = table.Column<int>(type: "integer", nullable: false), deity_id = table.Column<int>(type: "integer", nullable: false, comment: "Идентификатор божества"),
level = table.Column<int>(type: "integer", nullable: false), level = table.Column<int>(type: "integer", nullable: false, comment: "Уровень заклинания"),
spell_id = table.Column<int>(type: "integer", nullable: false) spell_id = table.Column<int>(type: "integer", nullable: false, comment: "Идентификатор заклинания")
}, },
constraints: table => constraints: table =>
{ {
@@ -1006,11 +1006,11 @@ namespace Pf2eModel.Migrations
name: "spell_areas", name: "spell_areas",
columns: table => new columns: table => new
{ {
id = table.Column<int>(type: "integer", nullable: false) id = table.Column<int>(type: "integer", nullable: false, comment: "Идентификатор")
.Annotation("Npgsql:ValueGenerationStrategy", NpgsqlValueGenerationStrategy.IdentityByDefaultColumn), .Annotation("Npgsql:ValueGenerationStrategy", NpgsqlValueGenerationStrategy.IdentityByDefaultColumn),
spell_id = table.Column<int>(type: "integer", nullable: false), spell_id = table.Column<int>(type: "integer", nullable: false, comment: "Идентификатор заклинания"),
details = table.Column<string>(type: "jsonb", maxLength: 255, nullable: true), details = table.Column<string>(type: "jsonb", maxLength: 255, nullable: true, comment: "Описание области заклинания"),
type = table.Column<SpellAreaType>(type: "spell_area_type", nullable: false) type = table.Column<SpellAreaType>(type: "spell_area_type", nullable: false, comment: "Тип области заклинания")
}, },
constraints: table => constraints: table =>
{ {
@@ -1027,16 +1027,16 @@ namespace Pf2eModel.Migrations
name: "spell_damages", name: "spell_damages",
columns: table => new columns: table => new
{ {
id = table.Column<int>(type: "integer", nullable: false) id = table.Column<int>(type: "integer", nullable: false, comment: "Идентификатор урона заклинания")
.Annotation("Npgsql:ValueGenerationStrategy", NpgsqlValueGenerationStrategy.IdentityByDefaultColumn), .Annotation("Npgsql:ValueGenerationStrategy", NpgsqlValueGenerationStrategy.IdentityByDefaultColumn),
spell_id = table.Column<int>(type: "integer", nullable: false), spell_id = table.Column<int>(type: "integer", nullable: false, comment: "Идентификатор заклинания"),
key = table.Column<string>(type: "character varying(255)", maxLength: 255, nullable: false), key = table.Column<string>(type: "character varying(255)", maxLength: 255, nullable: false, comment: "Уровень заклинания"),
apply_mod = table.Column<bool>(type: "boolean", nullable: true), apply_mod = table.Column<bool>(type: "boolean", nullable: true, comment: "Применяется модификатор?"),
category = table.Column<SpellDamageCategory>(type: "spell_damage_category", nullable: true), category = table.Column<SpellDamageCategory>(type: "spell_damage_category", nullable: true, comment: "Категория урона заклинания"),
formula = table.Column<string>(type: "character varying(255)", maxLength: 255, nullable: false), formula = table.Column<string>(type: "character varying(255)", maxLength: 255, nullable: false, comment: "Формула урона заклинания"),
kinds = table.Column<SpellDamageKinds>(type: "spell_damage_kinds", nullable: false), kinds = table.Column<SpellDamageKinds>(type: "spell_damage_kinds", nullable: false, comment: "Тип урона заклинания"),
materials = table.Column<string>(type: "character varying(255)", maxLength: 255, nullable: true), materials = table.Column<string>(type: "character varying(255)", maxLength: 255, nullable: true, comment: "Материалы для заклинания"),
type = table.Column<string>(type: "character varying(255)", maxLength: 255, nullable: false) type = table.Column<string>(type: "character varying(255)", maxLength: 255, nullable: false, comment: "Тип урона заклинания")
}, },
constraints: table => constraints: table =>
{ {
@@ -1053,11 +1053,11 @@ namespace Pf2eModel.Migrations
name: "spell_defenses", name: "spell_defenses",
columns: table => new columns: table => new
{ {
id = table.Column<int>(type: "integer", nullable: false) id = table.Column<int>(type: "integer", nullable: false, comment: "Идентификатор")
.Annotation("Npgsql:ValueGenerationStrategy", NpgsqlValueGenerationStrategy.IdentityByDefaultColumn), .Annotation("Npgsql:ValueGenerationStrategy", NpgsqlValueGenerationStrategy.IdentityByDefaultColumn),
spell_id = table.Column<int>(type: "integer", nullable: false), spell_id = table.Column<int>(type: "integer", nullable: false, comment: "Идентификатор заклинания"),
is_passive = table.Column<bool>(type: "boolean", nullable: false), is_passive = table.Column<bool>(type: "boolean", nullable: false),
is_basic = table.Column<bool>(type: "boolean", nullable: true), is_basic = table.Column<bool>(type: "boolean", nullable: true, comment: "Базовый спасборосок?"),
statistic = table.Column<string>(type: "character varying(255)", maxLength: 255, nullable: false) statistic = table.Column<string>(type: "character varying(255)", maxLength: 255, nullable: false)
}, },
constraints: table => constraints: table =>
@@ -1125,8 +1125,8 @@ namespace Pf2eModel.Migrations
name: "archetype_feats", name: "archetype_feats",
columns: table => new columns: table => new
{ {
archetype_id = table.Column<int>(type: "integer", nullable: false), archetype_id = table.Column<int>(type: "integer", nullable: false, comment: "Идентификатор архетипа"),
feat_id = table.Column<int>(type: "integer", nullable: false) feat_id = table.Column<int>(type: "integer", nullable: false, comment: "Идентификатор черты")
}, },
constraints: table => constraints: table =>
{ {
@@ -1173,11 +1173,11 @@ namespace Pf2eModel.Migrations
name: "subclass_trainings", name: "subclass_trainings",
columns: table => new columns: table => new
{ {
id = table.Column<int>(type: "integer", nullable: false) id = table.Column<int>(type: "integer", nullable: false, comment: "Идентификатор связи")
.Annotation("Npgsql:ValueGenerationStrategy", NpgsqlValueGenerationStrategy.IdentityByDefaultColumn), .Annotation("Npgsql:ValueGenerationStrategy", NpgsqlValueGenerationStrategy.IdentityByDefaultColumn),
subclass_id = table.Column<int>(type: "integer", nullable: false), subclass_id = table.Column<int>(type: "integer", nullable: false, comment: "Идентификатор подкласса"),
training_id = table.Column<int>(type: "integer", nullable: false), training_id = table.Column<int>(type: "integer", nullable: false, comment: "Идентификатор тренировки"),
rank = table.Column<TrainingRank>(type: "training_rank", nullable: false) rank = table.Column<TrainingRank>(type: "training_rank", nullable: false, comment: "Ранг тренировки")
}, },
constraints: table => constraints: table =>
{ {
@@ -33,7 +33,7 @@ namespace Pf2eModel.Migrations
NpgsqlModelBuilderExtensions.HasPostgresEnum(modelBuilder, "entity_rarity", new[] { "common", "rare", "uncommon", "unique" }); NpgsqlModelBuilderExtensions.HasPostgresEnum(modelBuilder, "entity_rarity", new[] { "common", "rare", "uncommon", "unique" });
NpgsqlModelBuilderExtensions.HasPostgresEnum(modelBuilder, "entity_type", new[] { "action", "ancestry", "archetype", "background", "backpack", "campaign_feature", "class", "condition", "deity", "feat", "heritage", "language", "ritual", "rule", "spell", "subclass", "subclass_group", "trait", "unknown" }); NpgsqlModelBuilderExtensions.HasPostgresEnum(modelBuilder, "entity_type", new[] { "action", "ancestry", "archetype", "background", "backpack", "campaign_feature", "class", "condition", "deity", "feat", "heritage", "language", "ritual", "rule", "spell", "subclass", "subclass_group", "trait", "unknown" });
NpgsqlModelBuilderExtensions.HasPostgresEnum(modelBuilder, "feat_category", new[] { "ancestry", "ancestry-feature", "archetype", "bonus", "calling", "campaign-feature", "class", "class-feature", "curse", "deityboon", "general", "pfsboon", "skill", "uncategorized" }); NpgsqlModelBuilderExtensions.HasPostgresEnum(modelBuilder, "feat_category", new[] { "ancestry", "ancestry-feature", "archetype", "bonus", "calling", "campaign-feature", "class", "class-feature", "curse", "deityboon", "general", "pfsboon", "skill", "uncategorized" });
NpgsqlModelBuilderExtensions.HasPostgresEnum(modelBuilder, "locale_type", new[] { "english", "hobby", "legacy", "legacy_english", "other", "russian" }); NpgsqlModelBuilderExtensions.HasPostgresEnum(modelBuilder, "locale_type", new[] { "english", "hobby", "other", "russian" });
NpgsqlModelBuilderExtensions.HasPostgresEnum(modelBuilder, "size_enum", new[] { "huge", "large", "medium", "small", "tiny" }); NpgsqlModelBuilderExtensions.HasPostgresEnum(modelBuilder, "size_enum", new[] { "huge", "large", "medium", "small", "tiny" });
NpgsqlModelBuilderExtensions.HasPostgresEnum(modelBuilder, "source_category", new[] { "adventure-path", "adventures", "blog-posts", "comics", "lost-omens", "rulebook", "society" }); NpgsqlModelBuilderExtensions.HasPostgresEnum(modelBuilder, "source_category", new[] { "adventure-path", "adventures", "blog-posts", "comics", "lost-omens", "rulebook", "society" });
NpgsqlModelBuilderExtensions.HasPostgresEnum(modelBuilder, "spell_area_type", new[] { "burst", "circle", "cone", "cube", "cuboid", "cylinder", "emanation", "line", "other", "square", "varies" }); NpgsqlModelBuilderExtensions.HasPostgresEnum(modelBuilder, "spell_area_type", new[] { "burst", "circle", "cone", "cube", "cuboid", "cylinder", "emanation", "line", "other", "square", "varies" });
@@ -398,7 +398,8 @@ namespace Pf2eModel.Migrations
.HasMaxLength(255) .HasMaxLength(255)
.HasColumnType("character varying(255)") .HasColumnType("character varying(255)")
.HasColumnName("external_id") .HasColumnName("external_id")
.HasColumnOrder(3); .HasColumnOrder(3)
.HasComment("Идентификатор элемента в ссылке");
b.Property<string>("Md5") b.Property<string>("Md5")
.IsRequired() .IsRequired()
@@ -615,17 +616,20 @@ namespace Pf2eModel.Migrations
b.Property<int>("AncestryId") b.Property<int>("AncestryId")
.HasColumnType("integer") .HasColumnType("integer")
.HasColumnName("ancestry_id") .HasColumnName("ancestry_id")
.HasColumnOrder(2); .HasColumnOrder(2)
.HasComment("Идентификатор родословной");
b.Property<bool>("Boost") b.Property<bool>("Boost")
.HasColumnType("boolean") .HasColumnType("boolean")
.HasColumnName("boost") .HasColumnName("boost")
.HasColumnOrder(3); .HasColumnOrder(3)
.HasComment("Флаг повышения/снижения");
b.Property<AttributeValues>("Value") b.Property<AttributeValues>("Value")
.HasColumnType("attribute_values") .HasColumnType("attribute_values")
.HasColumnName("value") .HasColumnName("value")
.HasColumnOrder(4); .HasColumnOrder(4)
.HasComment("Значение атрибута");
b.HasKey("Id") b.HasKey("Id")
.HasName("pk_ancestry_boosts"); .HasName("pk_ancestry_boosts");
@@ -641,17 +645,20 @@ namespace Pf2eModel.Migrations
b.Property<int>("AncestryId") b.Property<int>("AncestryId")
.HasColumnType("integer") .HasColumnType("integer")
.HasColumnName("ancestry_id") .HasColumnName("ancestry_id")
.HasColumnOrder(1); .HasColumnOrder(1)
.HasComment("Идентификатор родословной");
b.Property<int>("ItemId") b.Property<int>("ItemId")
.HasColumnType("integer") .HasColumnType("integer")
.HasColumnName("item_id") .HasColumnName("item_id")
.HasColumnOrder(2); .HasColumnOrder(2)
.HasComment("Идентификатор связанной сущности");
b.Property<int>("Level") b.Property<int>("Level")
.HasColumnType("integer") .HasColumnType("integer")
.HasColumnName("level") .HasColumnName("level")
.HasColumnOrder(3); .HasColumnOrder(3)
.HasComment("Уровень сущности в родословной");
b.HasKey("AncestryId", "ItemId") b.HasKey("AncestryId", "ItemId")
.HasName("pk_ancestry_items"); .HasName("pk_ancestry_items");
@@ -667,17 +674,20 @@ namespace Pf2eModel.Migrations
b.Property<int>("AncestryId") b.Property<int>("AncestryId")
.HasColumnType("integer") .HasColumnType("integer")
.HasColumnName("ancestry_id") .HasColumnName("ancestry_id")
.HasColumnOrder(1); .HasColumnOrder(1)
.HasComment("Идентификатор родословной");
b.Property<int>("LanguageId") b.Property<int>("LanguageId")
.HasColumnType("integer") .HasColumnType("integer")
.HasColumnName("language_id") .HasColumnName("language_id")
.HasColumnOrder(2); .HasColumnOrder(2)
.HasComment("Идентификатор связанного языка");
b.Property<bool>("IsAdditional") b.Property<bool>("IsAdditional")
.HasColumnType("boolean") .HasColumnType("boolean")
.HasColumnName("is_additional") .HasColumnName("is_additional")
.HasColumnOrder(3); .HasColumnOrder(3)
.HasComment("Флаг дополнительного");
b.HasKey("AncestryId", "LanguageId") b.HasKey("AncestryId", "LanguageId")
.HasName("pk_ancestry_languages"); .HasName("pk_ancestry_languages");
@@ -728,11 +738,13 @@ namespace Pf2eModel.Migrations
{ {
b.Property<int>("ArchetypeId") b.Property<int>("ArchetypeId")
.HasColumnType("integer") .HasColumnType("integer")
.HasColumnName("archetype_id"); .HasColumnName("archetype_id")
.HasComment("Идентификатор архетипа");
b.Property<int>("FeatId") b.Property<int>("FeatId")
.HasColumnType("integer") .HasColumnType("integer")
.HasColumnName("feat_id"); .HasColumnName("feat_id")
.HasComment("Идентификатор черты");
b.HasKey("ArchetypeId", "FeatId") b.HasKey("ArchetypeId", "FeatId")
.HasName("pk_archetype_feats"); .HasName("pk_archetype_feats");
@@ -763,19 +775,22 @@ namespace Pf2eModel.Migrations
.ValueGeneratedOnAdd() .ValueGeneratedOnAdd()
.HasColumnType("integer") .HasColumnType("integer")
.HasColumnName("id") .HasColumnName("id")
.HasColumnOrder(1); .HasColumnOrder(1)
.HasComment("Идентификатор");
NpgsqlPropertyBuilderExtensions.UseIdentityByDefaultColumn(b.Property<int>("Id")); NpgsqlPropertyBuilderExtensions.UseIdentityByDefaultColumn(b.Property<int>("Id"));
b.Property<AttributeValues>("Attribute") b.Property<AttributeValues>("Attribute")
.HasColumnType("attribute_values") .HasColumnType("attribute_values")
.HasColumnName("attribute") .HasColumnName("attribute")
.HasColumnOrder(3); .HasColumnOrder(3)
.HasComment("Атрибут");
b.Property<int>("BackgroundId") b.Property<int>("BackgroundId")
.HasColumnType("integer") .HasColumnType("integer")
.HasColumnName("background_id") .HasColumnName("background_id")
.HasColumnOrder(2); .HasColumnOrder(2)
.HasComment("Идентификатор предыстории");
b.HasKey("Id") b.HasKey("Id")
.HasName("pk_background_boosts"); .HasName("pk_background_boosts");
@@ -791,12 +806,14 @@ namespace Pf2eModel.Migrations
b.Property<int>("BackgroundId") b.Property<int>("BackgroundId")
.HasColumnType("integer") .HasColumnType("integer")
.HasColumnName("background_id") .HasColumnName("background_id")
.HasColumnOrder(1); .HasColumnOrder(1)
.HasComment("Идентификатор");
b.Property<int>("EntityId") b.Property<int>("EntityId")
.HasColumnType("integer") .HasColumnType("integer")
.HasColumnName("entity_id") .HasColumnName("entity_id")
.HasColumnOrder(2); .HasColumnOrder(2)
.HasComment("Идентификатор сущности");
b.Property<int?>("Level") b.Property<int?>("Level")
.HasColumnType("integer") .HasColumnType("integer")
@@ -817,22 +834,26 @@ namespace Pf2eModel.Migrations
b.Property<int>("Id") b.Property<int>("Id")
.HasColumnType("integer") .HasColumnType("integer")
.HasColumnName("id") .HasColumnName("id")
.HasColumnOrder(1); .HasColumnOrder(1)
.HasComment("Идентификатор");
b.Property<int>("BackgroundId") b.Property<int>("BackgroundId")
.HasColumnType("integer") .HasColumnType("integer")
.HasColumnName("background_id") .HasColumnName("background_id")
.HasColumnOrder(2); .HasColumnOrder(2)
.HasComment("Идентификатор предыстории");
b.Property<TrainingRank>("Rank") b.Property<TrainingRank>("Rank")
.HasColumnType("training_rank") .HasColumnType("training_rank")
.HasColumnName("rank") .HasColumnName("rank")
.HasColumnOrder(4); .HasColumnOrder(4)
.HasComment("Ранг тренировки");
b.Property<int>("TrainingId") b.Property<int>("TrainingId")
.HasColumnType("integer") .HasColumnType("integer")
.HasColumnName("training_id") .HasColumnName("training_id")
.HasColumnOrder(3); .HasColumnOrder(3)
.HasComment("Идентификатор тренируемого навыка");
b.HasKey("Id") b.HasKey("Id")
.HasName("pk_background_skills"); .HasName("pk_background_skills");
@@ -890,19 +911,22 @@ namespace Pf2eModel.Migrations
.ValueGeneratedOnAdd() .ValueGeneratedOnAdd()
.HasColumnType("integer") .HasColumnType("integer")
.HasColumnName("id") .HasColumnName("id")
.HasColumnOrder(1); .HasColumnOrder(1)
.HasComment("Идентификатор");
NpgsqlPropertyBuilderExtensions.UseIdentityByDefaultColumn(b.Property<int>("Id")); NpgsqlPropertyBuilderExtensions.UseIdentityByDefaultColumn(b.Property<int>("Id"));
b.Property<int>("ClassId") b.Property<int>("ClassId")
.HasColumnType("integer") .HasColumnType("integer")
.HasColumnName("class_id") .HasColumnName("class_id")
.HasColumnOrder(2); .HasColumnOrder(2)
.HasComment("Идентификатор класса");
b.Property<AttributeValues>("Value") b.Property<AttributeValues>("Value")
.HasColumnType("attribute_values") .HasColumnType("attribute_values")
.HasColumnName("value") .HasColumnName("value")
.HasColumnOrder(3); .HasColumnOrder(3)
.HasComment("Атрибут");
b.HasKey("Id") b.HasKey("Id")
.HasName("pk_class_key_abilities"); .HasName("pk_class_key_abilities");
@@ -919,29 +943,34 @@ namespace Pf2eModel.Migrations
.ValueGeneratedOnAdd() .ValueGeneratedOnAdd()
.HasColumnType("integer") .HasColumnType("integer")
.HasColumnName("id") .HasColumnName("id")
.HasColumnOrder(1); .HasColumnOrder(1)
.HasComment("Идентификатор");
NpgsqlPropertyBuilderExtensions.UseIdentityByDefaultColumn(b.Property<int>("Id")); NpgsqlPropertyBuilderExtensions.UseIdentityByDefaultColumn(b.Property<int>("Id"));
b.Property<int>("ClassId") b.Property<int>("ClassId")
.HasColumnType("integer") .HasColumnType("integer")
.HasColumnName("class_id") .HasColumnName("class_id")
.HasColumnOrder(2); .HasColumnOrder(2)
.HasComment("Идентификатор класса");
b.Property<int?>("EntityId") b.Property<int?>("EntityId")
.HasColumnType("integer") .HasColumnType("integer")
.HasColumnName("entity_id") .HasColumnName("entity_id")
.HasColumnOrder(5); .HasColumnOrder(5)
.HasComment("Идентификатор сущности");
b.Property<int>("Level") b.Property<int>("Level")
.HasColumnType("integer") .HasColumnType("integer")
.HasColumnName("level") .HasColumnName("level")
.HasColumnOrder(31); .HasColumnOrder(3)
.HasComment("Уровень класса");
b.Property<ClassProgressionType>("Type") b.Property<ClassProgressionType>("Type")
.HasColumnType("class_progression_type") .HasColumnType("class_progression_type")
.HasColumnName("type") .HasColumnName("type")
.HasColumnOrder(4); .HasColumnOrder(4)
.HasComment("Тип элемента прогрессии класса");
b.HasKey("Id") b.HasKey("Id")
.HasName("pk_class_progressions"); .HasName("pk_class_progressions");
@@ -961,24 +990,28 @@ namespace Pf2eModel.Migrations
.ValueGeneratedOnAdd() .ValueGeneratedOnAdd()
.HasColumnType("integer") .HasColumnType("integer")
.HasColumnName("id") .HasColumnName("id")
.HasColumnOrder(1); .HasColumnOrder(1)
.HasComment("Идентификатор");
NpgsqlPropertyBuilderExtensions.UseIdentityByDefaultColumn(b.Property<int>("Id")); NpgsqlPropertyBuilderExtensions.UseIdentityByDefaultColumn(b.Property<int>("Id"));
b.Property<int>("ClassId") b.Property<int>("ClassId")
.HasColumnType("integer") .HasColumnType("integer")
.HasColumnName("class_id") .HasColumnName("class_id")
.HasColumnOrder(2); .HasColumnOrder(2)
.HasComment("Идентификатор класса");
b.Property<TrainingRank>("Rank") b.Property<TrainingRank>("Rank")
.HasColumnType("training_rank") .HasColumnType("training_rank")
.HasColumnName("rank") .HasColumnName("rank")
.HasColumnOrder(4); .HasColumnOrder(4)
.HasComment("Ранг тренировки");
b.Property<int?>("TrainingId") b.Property<int?>("TrainingId")
.HasColumnType("integer") .HasColumnType("integer")
.HasColumnName("training_id") .HasColumnName("training_id")
.HasColumnOrder(3); .HasColumnOrder(3)
.HasComment("Идентификатор тренируемого навыка");
b.HasKey("Id") b.HasKey("Id")
.HasName("pk_class_trainings"); .HasName("pk_class_trainings");
@@ -1017,24 +1050,28 @@ namespace Pf2eModel.Migrations
.ValueGeneratedOnAdd() .ValueGeneratedOnAdd()
.HasColumnType("integer") .HasColumnType("integer")
.HasColumnName("id") .HasColumnName("id")
.HasColumnOrder(1); .HasColumnOrder(1)
.HasComment("Идентификатор связи");
NpgsqlPropertyBuilderExtensions.UseIdentityByDefaultColumn(b.Property<int>("Id")); NpgsqlPropertyBuilderExtensions.UseIdentityByDefaultColumn(b.Property<int>("Id"));
b.Property<TrainingRank>("Rank") b.Property<TrainingRank>("Rank")
.HasColumnType("training_rank") .HasColumnType("training_rank")
.HasColumnName("rank") .HasColumnName("rank")
.HasColumnOrder(4); .HasColumnOrder(4)
.HasComment("Ранг тренировки");
b.Property<int>("SubclassId") b.Property<int>("SubclassId")
.HasColumnType("integer") .HasColumnType("integer")
.HasColumnName("subclass_id") .HasColumnName("subclass_id")
.HasColumnOrder(2); .HasColumnOrder(2)
.HasComment("Идентификатор подкласса");
b.Property<int>("TrainingId") b.Property<int>("TrainingId")
.HasColumnType("integer") .HasColumnType("integer")
.HasColumnName("training_id") .HasColumnName("training_id")
.HasColumnOrder(3); .HasColumnOrder(3)
.HasComment("Идентификатор тренировки");
b.HasKey("Id") b.HasKey("Id")
.HasName("pk_subclass_trainings"); .HasName("pk_subclass_trainings");
@@ -1117,12 +1154,14 @@ namespace Pf2eModel.Migrations
b.Property<int>("DeityId") b.Property<int>("DeityId")
.HasColumnType("integer") .HasColumnType("integer")
.HasColumnName("deity_id") .HasColumnName("deity_id")
.HasColumnOrder(1); .HasColumnOrder(1)
.HasComment("Идентификатор божества");
b.Property<AttributeValues>("Attribute") b.Property<AttributeValues>("Attribute")
.HasColumnType("attribute_values") .HasColumnType("attribute_values")
.HasColumnName("attribute") .HasColumnName("attribute")
.HasColumnOrder(2); .HasColumnOrder(2)
.HasComment("Атрибут божества");
b.HasKey("DeityId", "Attribute") b.HasKey("DeityId", "Attribute")
.HasName("pk_deity_attributes"); .HasName("pk_deity_attributes");
@@ -1136,19 +1175,22 @@ namespace Pf2eModel.Migrations
.ValueGeneratedOnAdd() .ValueGeneratedOnAdd()
.HasColumnType("integer") .HasColumnType("integer")
.HasColumnName("id") .HasColumnName("id")
.HasColumnOrder(1); .HasColumnOrder(1)
.HasComment("Идентификатор");
NpgsqlPropertyBuilderExtensions.UseIdentityByDefaultColumn(b.Property<int>("Id")); NpgsqlPropertyBuilderExtensions.UseIdentityByDefaultColumn(b.Property<int>("Id"));
b.Property<int>("DeityId") b.Property<int>("DeityId")
.HasColumnType("integer") .HasColumnType("integer")
.HasColumnName("deity_id") .HasColumnName("deity_id")
.HasColumnOrder(2); .HasColumnOrder(2)
.HasComment("Идентификатор божества");
b.Property<bool>("IsPrimary") b.Property<bool>("IsPrimary")
.HasColumnType("boolean") .HasColumnType("boolean")
.HasColumnName("is_primary") .HasColumnName("is_primary")
.HasColumnOrder(3); .HasColumnOrder(3)
.HasComment("Флаг основного домена");
b.Property<string>("Value") b.Property<string>("Value")
.IsRequired() .IsRequired()
@@ -1172,24 +1214,28 @@ namespace Pf2eModel.Migrations
.ValueGeneratedOnAdd() .ValueGeneratedOnAdd()
.HasColumnType("integer") .HasColumnType("integer")
.HasColumnName("id") .HasColumnName("id")
.HasColumnOrder(1); .HasColumnOrder(1)
.HasComment("Идентификатор");
NpgsqlPropertyBuilderExtensions.UseIdentityByDefaultColumn(b.Property<int>("Id")); NpgsqlPropertyBuilderExtensions.UseIdentityByDefaultColumn(b.Property<int>("Id"));
b.Property<int>("DeityId") b.Property<int>("DeityId")
.HasColumnType("integer") .HasColumnType("integer")
.HasColumnName("deity_id") .HasColumnName("deity_id")
.HasColumnOrder(2); .HasColumnOrder(2)
.HasComment("Идентификатор божества");
b.Property<int>("Level") b.Property<int>("Level")
.HasColumnType("integer") .HasColumnType("integer")
.HasColumnName("level") .HasColumnName("level")
.HasColumnOrder(3); .HasColumnOrder(3)
.HasComment("Уровень заклинания");
b.Property<int>("SpellId") b.Property<int>("SpellId")
.HasColumnType("integer") .HasColumnType("integer")
.HasColumnName("spell_id") .HasColumnName("spell_id")
.HasColumnOrder(4); .HasColumnOrder(4)
.HasComment("Идентификатор заклинания");
b.HasKey("Id") b.HasKey("Id")
.HasName("pk_deity_spells"); .HasName("pk_deity_spells");
@@ -1209,21 +1255,24 @@ namespace Pf2eModel.Migrations
.ValueGeneratedOnAdd() .ValueGeneratedOnAdd()
.HasColumnType("integer") .HasColumnType("integer")
.HasColumnName("id") .HasColumnName("id")
.HasColumnOrder(1); .HasColumnOrder(1)
.HasComment("Идентификатор");
NpgsqlPropertyBuilderExtensions.UseIdentityByDefaultColumn(b.Property<int>("Id")); NpgsqlPropertyBuilderExtensions.UseIdentityByDefaultColumn(b.Property<int>("Id"));
b.Property<int>("DeityId") b.Property<int>("DeityId")
.HasColumnType("integer") .HasColumnType("integer")
.HasColumnName("deity_id") .HasColumnName("deity_id")
.HasColumnOrder(2); .HasColumnOrder(2)
.HasComment("Идентификатор божества");
b.Property<string>("Weapon") b.Property<string>("Weapon")
.IsRequired() .IsRequired()
.HasMaxLength(255) .HasMaxLength(255)
.HasColumnType("character varying(255)") .HasColumnType("character varying(255)")
.HasColumnName("weapon") .HasColumnName("weapon")
.HasColumnOrder(3); .HasColumnOrder(3)
.HasComment("Название оружия");
b.HasKey("Id") b.HasKey("Id")
.HasName("pk_deity_weapons"); .HasName("pk_deity_weapons");
@@ -1278,21 +1327,24 @@ namespace Pf2eModel.Migrations
.ValueGeneratedOnAdd() .ValueGeneratedOnAdd()
.HasColumnType("integer") .HasColumnType("integer")
.HasColumnName("id") .HasColumnName("id")
.HasColumnOrder(1); .HasColumnOrder(1)
.HasComment("Идентификатор");
NpgsqlPropertyBuilderExtensions.UseIdentityByDefaultColumn(b.Property<int>("Id")); NpgsqlPropertyBuilderExtensions.UseIdentityByDefaultColumn(b.Property<int>("Id"));
b.Property<int>("FeatId") b.Property<int>("FeatId")
.HasColumnType("integer") .HasColumnType("integer")
.HasColumnName("feat_id") .HasColumnName("feat_id")
.HasColumnOrder(2); .HasColumnOrder(2)
.HasComment("Идентификатор черты");
b.Property<string>("Value") b.Property<string>("Value")
.IsRequired() .IsRequired()
.HasMaxLength(255) .HasMaxLength(255)
.HasColumnType("character varying(255)") .HasColumnType("character varying(255)")
.HasColumnName("value") .HasColumnName("value")
.HasColumnOrder(3); .HasColumnOrder(3)
.HasComment("Предварительное требование");
b.HasKey("Id") b.HasKey("Id")
.HasName("pk_feat_prerequisites"); .HasName("pk_feat_prerequisites");
@@ -1451,18 +1503,21 @@ namespace Pf2eModel.Migrations
b.Property<int>("RitualId") b.Property<int>("RitualId")
.HasColumnType("integer") .HasColumnType("integer")
.HasColumnName("ritual_id") .HasColumnName("ritual_id")
.HasColumnOrder(1); .HasColumnOrder(1)
.HasComment("Идентификатор ритуала");
b.Property<string>("Details") b.Property<string>("Details")
.HasMaxLength(255) .HasMaxLength(255)
.HasColumnType("jsonb") .HasColumnType("jsonb")
.HasColumnName("details") .HasColumnName("details")
.HasColumnOrder(2); .HasColumnOrder(2)
.HasComment("Описание области действия ритуала");
b.Property<SpellAreaType>("Type") b.Property<SpellAreaType>("Type")
.HasColumnType("spell_area_type") .HasColumnType("spell_area_type")
.HasColumnName("type") .HasColumnName("type")
.HasColumnOrder(3); .HasColumnOrder(3)
.HasComment("Тип области действия ритуала");
b.HasKey("RitualId") b.HasKey("RitualId")
.HasName("pk_ritual_areas"); .HasName("pk_ritual_areas");
@@ -1476,34 +1531,40 @@ namespace Pf2eModel.Migrations
.ValueGeneratedOnAdd() .ValueGeneratedOnAdd()
.HasColumnType("integer") .HasColumnType("integer")
.HasColumnName("id") .HasColumnName("id")
.HasColumnOrder(1); .HasColumnOrder(1)
.HasComment("Идентификатор");
NpgsqlPropertyBuilderExtensions.UseIdentityByDefaultColumn(b.Property<int>("Id")); NpgsqlPropertyBuilderExtensions.UseIdentityByDefaultColumn(b.Property<int>("Id"));
b.Property<bool>("IsPrimary") b.Property<bool>("IsPrimary")
.HasColumnType("boolean") .HasColumnType("boolean")
.HasColumnName("is_primary") .HasColumnName("is_primary")
.HasColumnOrder(6); .HasColumnOrder(6)
.HasComment("Флаг основной проверки");
b.Property<TrainingRank>("Rank") b.Property<TrainingRank>("Rank")
.HasColumnType("training_rank") .HasColumnType("training_rank")
.HasColumnName("rank") .HasColumnName("rank")
.HasColumnOrder(5); .HasColumnOrder(5)
.HasComment("Ранг тренировки");
b.Property<int>("RitualId") b.Property<int>("RitualId")
.HasColumnType("integer") .HasColumnType("integer")
.HasColumnName("ritual_id") .HasColumnName("ritual_id")
.HasColumnOrder(2); .HasColumnOrder(2)
.HasComment("Идентификатор ритуала");
b.Property<int?>("TrainingId") b.Property<int?>("TrainingId")
.HasColumnType("integer") .HasColumnType("integer")
.HasColumnName("training_id") .HasColumnName("training_id")
.HasColumnOrder(3); .HasColumnOrder(3)
.HasComment("Идентификатор тренировки");
b.Property<string>("TrainingString") b.Property<string>("TrainingString")
.HasColumnType("jsonb") .HasColumnType("jsonb")
.HasColumnName("training_string") .HasColumnName("training_string")
.HasColumnOrder(4); .HasColumnOrder(4)
.HasComment("Дополнение к проверке");
b.HasKey("Id") b.HasKey("Id")
.HasName("pk_ritual_checks"); .HasName("pk_ritual_checks");
@@ -1639,7 +1700,8 @@ namespace Pf2eModel.Migrations
.ValueGeneratedOnAdd() .ValueGeneratedOnAdd()
.HasColumnType("integer") .HasColumnType("integer")
.HasColumnName("id") .HasColumnName("id")
.HasColumnOrder(1); .HasColumnOrder(1)
.HasComment("Идентификатор");
NpgsqlPropertyBuilderExtensions.UseIdentityByDefaultColumn(b.Property<int>("Id")); NpgsqlPropertyBuilderExtensions.UseIdentityByDefaultColumn(b.Property<int>("Id"));
@@ -1647,17 +1709,20 @@ namespace Pf2eModel.Migrations
.HasMaxLength(255) .HasMaxLength(255)
.HasColumnType("jsonb") .HasColumnType("jsonb")
.HasColumnName("details") .HasColumnName("details")
.HasColumnOrder(3); .HasColumnOrder(3)
.HasComment("Описание области заклинания");
b.Property<int>("SpellId") b.Property<int>("SpellId")
.HasColumnType("integer") .HasColumnType("integer")
.HasColumnName("spell_id") .HasColumnName("spell_id")
.HasColumnOrder(2); .HasColumnOrder(2)
.HasComment("Идентификатор заклинания");
b.Property<SpellAreaType>("Type") b.Property<SpellAreaType>("Type")
.HasColumnType("spell_area_type") .HasColumnType("spell_area_type")
.HasColumnName("type") .HasColumnName("type")
.HasColumnOrder(4); .HasColumnOrder(4)
.HasComment("Тип области заклинания");
b.HasKey("Id") b.HasKey("Id")
.HasName("pk_spell_areas"); .HasName("pk_spell_areas");
@@ -1674,56 +1739,65 @@ namespace Pf2eModel.Migrations
.ValueGeneratedOnAdd() .ValueGeneratedOnAdd()
.HasColumnType("integer") .HasColumnType("integer")
.HasColumnName("id") .HasColumnName("id")
.HasColumnOrder(1); .HasColumnOrder(1)
.HasComment("Идентификатор урона заклинания");
NpgsqlPropertyBuilderExtensions.UseIdentityByDefaultColumn(b.Property<int>("Id")); NpgsqlPropertyBuilderExtensions.UseIdentityByDefaultColumn(b.Property<int>("Id"));
b.Property<bool?>("ApplyMod") b.Property<bool?>("ApplyMod")
.HasColumnType("boolean") .HasColumnType("boolean")
.HasColumnName("apply_mod") .HasColumnName("apply_mod")
.HasColumnOrder(4); .HasColumnOrder(4)
.HasComment("Применяется модификатор?");
b.Property<SpellDamageCategory?>("Category") b.Property<SpellDamageCategory?>("Category")
.HasColumnType("spell_damage_category") .HasColumnType("spell_damage_category")
.HasColumnName("category") .HasColumnName("category")
.HasColumnOrder(5); .HasColumnOrder(5)
.HasComment("Категория урона заклинания");
b.Property<string>("Formula") b.Property<string>("Formula")
.IsRequired() .IsRequired()
.HasMaxLength(255) .HasMaxLength(255)
.HasColumnType("character varying(255)") .HasColumnType("character varying(255)")
.HasColumnName("formula") .HasColumnName("formula")
.HasColumnOrder(6); .HasColumnOrder(6)
.HasComment("Формула урона заклинания");
b.Property<string>("Key") b.Property<string>("Key")
.IsRequired() .IsRequired()
.HasMaxLength(255) .HasMaxLength(255)
.HasColumnType("character varying(255)") .HasColumnType("character varying(255)")
.HasColumnName("key") .HasColumnName("key")
.HasColumnOrder(3); .HasColumnOrder(3)
.HasComment("Уровень заклинания");
b.Property<SpellDamageKinds>("Kinds") b.Property<SpellDamageKinds>("Kinds")
.HasColumnType("spell_damage_kinds") .HasColumnType("spell_damage_kinds")
.HasColumnName("kinds") .HasColumnName("kinds")
.HasColumnOrder(7); .HasColumnOrder(7)
.HasComment("Тип урона заклинания");
b.Property<string>("Materials") b.Property<string>("Materials")
.HasMaxLength(255) .HasMaxLength(255)
.HasColumnType("character varying(255)") .HasColumnType("character varying(255)")
.HasColumnName("materials") .HasColumnName("materials")
.HasColumnOrder(8); .HasColumnOrder(8)
.HasComment("Материалы для заклинания");
b.Property<int>("SpellId") b.Property<int>("SpellId")
.HasColumnType("integer") .HasColumnType("integer")
.HasColumnName("spell_id") .HasColumnName("spell_id")
.HasColumnOrder(2); .HasColumnOrder(2)
.HasComment("Идентификатор заклинания");
b.Property<string>("Type") b.Property<string>("Type")
.IsRequired() .IsRequired()
.HasMaxLength(255) .HasMaxLength(255)
.HasColumnType("character varying(255)") .HasColumnType("character varying(255)")
.HasColumnName("type") .HasColumnName("type")
.HasColumnOrder(9); .HasColumnOrder(9)
.HasComment("Тип урона заклинания");
b.HasKey("Id") b.HasKey("Id")
.HasName("pk_spell_damages"); .HasName("pk_spell_damages");
@@ -1740,14 +1814,16 @@ namespace Pf2eModel.Migrations
.ValueGeneratedOnAdd() .ValueGeneratedOnAdd()
.HasColumnType("integer") .HasColumnType("integer")
.HasColumnName("id") .HasColumnName("id")
.HasColumnOrder(1); .HasColumnOrder(1)
.HasComment("Идентификатор");
NpgsqlPropertyBuilderExtensions.UseIdentityByDefaultColumn(b.Property<int>("Id")); NpgsqlPropertyBuilderExtensions.UseIdentityByDefaultColumn(b.Property<int>("Id"));
b.Property<bool?>("IsBasic") b.Property<bool?>("IsBasic")
.HasColumnType("boolean") .HasColumnType("boolean")
.HasColumnName("is_basic") .HasColumnName("is_basic")
.HasColumnOrder(4); .HasColumnOrder(4)
.HasComment("Базовый спасборосок?");
b.Property<bool>("IsPassive") b.Property<bool>("IsPassive")
.HasColumnType("boolean") .HasColumnType("boolean")
@@ -1757,7 +1833,8 @@ namespace Pf2eModel.Migrations
b.Property<int>("SpellId") b.Property<int>("SpellId")
.HasColumnType("integer") .HasColumnType("integer")
.HasColumnName("spell_id") .HasColumnName("spell_id")
.HasColumnOrder(2); .HasColumnOrder(2)
.HasComment("Идентификатор заклинания");
b.Property<string>("Statistic") b.Property<string>("Statistic")
.IsRequired() .IsRequired()