Основа для ASP-сайта для просмотра сущностей
This commit is contained in:
+55
-2
@@ -13,7 +13,7 @@ using Pf2eModel.Model.Enum;
|
||||
namespace Pf2eModel.Migrations
|
||||
{
|
||||
[DbContext(typeof(Pf2eDbContext))]
|
||||
[Migration("20250929053912_1")]
|
||||
[Migration("20251002070001_1")]
|
||||
partial class _1
|
||||
{
|
||||
/// <inheritdoc />
|
||||
@@ -34,7 +34,7 @@ namespace Pf2eModel.Migrations
|
||||
NpgsqlModelBuilderExtensions.HasPostgresEnum(modelBuilder, "deity_type", new[] { "covenant", "deity", "pantheon", "philosophy" });
|
||||
NpgsqlModelBuilderExtensions.HasPostgresEnum(modelBuilder, "element_enum", new[] { "air", "earth", "fire", "metal", "universal", "water", "wood" });
|
||||
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", "domain", "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", "deity_category", "domain", "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, "locale_type", new[] { "english", "hobby", "other", "russian" });
|
||||
NpgsqlModelBuilderExtensions.HasPostgresEnum(modelBuilder, "size_enum", new[] { "huge", "large", "medium", "small", "tiny" });
|
||||
@@ -1149,6 +1149,16 @@ namespace Pf2eModel.Migrations
|
||||
.HasColumnOrder(3)
|
||||
.HasComment("Категория божества");
|
||||
|
||||
b.Property<int?>("CategoryEntityId")
|
||||
.HasColumnType("integer")
|
||||
.HasColumnName("category_entity_id");
|
||||
|
||||
b.Property<int?>("CategoryId")
|
||||
.HasColumnType("integer")
|
||||
.HasColumnName("category_id")
|
||||
.HasColumnOrder(12)
|
||||
.HasComment("Идентификатор категории божества");
|
||||
|
||||
b.Property<string>("Edicts")
|
||||
.IsRequired()
|
||||
.HasColumnType("jsonb")
|
||||
@@ -1197,9 +1207,33 @@ namespace Pf2eModel.Migrations
|
||||
b.HasKey("Id")
|
||||
.HasName("pk_deities");
|
||||
|
||||
b.HasIndex("CategoryEntityId")
|
||||
.HasDatabaseName("ix_deities_category_entity_id");
|
||||
|
||||
b.ToTable("deities", (string)null);
|
||||
});
|
||||
|
||||
modelBuilder.Entity("Pf2eModel.Model.Structure.DeityCategory", b =>
|
||||
{
|
||||
b.Property<int>("Id")
|
||||
.HasColumnType("integer")
|
||||
.HasColumnName("id")
|
||||
.HasColumnOrder(1)
|
||||
.HasComment("Идентификатор");
|
||||
|
||||
b.Property<string>("Description")
|
||||
.IsRequired()
|
||||
.HasColumnType("jsonb")
|
||||
.HasColumnName("description")
|
||||
.HasColumnOrder(2)
|
||||
.HasComment("Описание категории");
|
||||
|
||||
b.HasKey("Id")
|
||||
.HasName("pk_deity_categories");
|
||||
|
||||
b.ToTable("deity_categories", (string)null);
|
||||
});
|
||||
|
||||
modelBuilder.Entity("Pf2eModel.Model.Structure.DeityRelation.DeityAttribute", b =>
|
||||
{
|
||||
b.Property<int>("Id")
|
||||
@@ -2488,6 +2522,11 @@ namespace Pf2eModel.Migrations
|
||||
|
||||
modelBuilder.Entity("Pf2eModel.Model.Structure.Deity", b =>
|
||||
{
|
||||
b.HasOne("Pf2eModel.Model.Structure.DeityCategory", "CategoryEntity")
|
||||
.WithMany()
|
||||
.HasForeignKey("CategoryEntityId")
|
||||
.HasConstraintName("fk_deities_deity_categories_category_entity_id");
|
||||
|
||||
b.HasOne("Pf2eModel.Model.Base.Entity", "Entity")
|
||||
.WithOne()
|
||||
.HasForeignKey("Pf2eModel.Model.Structure.Deity", "Id")
|
||||
@@ -2495,6 +2534,20 @@ namespace Pf2eModel.Migrations
|
||||
.IsRequired()
|
||||
.HasConstraintName("fk_deities_entities_id");
|
||||
|
||||
b.Navigation("CategoryEntity");
|
||||
|
||||
b.Navigation("Entity");
|
||||
});
|
||||
|
||||
modelBuilder.Entity("Pf2eModel.Model.Structure.DeityCategory", b =>
|
||||
{
|
||||
b.HasOne("Pf2eModel.Model.Base.Entity", "Entity")
|
||||
.WithOne()
|
||||
.HasForeignKey("Pf2eModel.Model.Structure.DeityCategory", "Id")
|
||||
.OnDelete(DeleteBehavior.Cascade)
|
||||
.IsRequired()
|
||||
.HasConstraintName("fk_deity_categories_entities_id");
|
||||
|
||||
b.Navigation("Entity");
|
||||
});
|
||||
|
||||
+126
-93
@@ -24,7 +24,7 @@ namespace Pf2eModel.Migrations
|
||||
.Annotation("Npgsql:Enum:deity_type", "covenant,deity,pantheon,philosophy")
|
||||
.Annotation("Npgsql:Enum:element_enum", "air,earth,fire,metal,universal,water,wood")
|
||||
.Annotation("Npgsql:Enum:entity_rarity", "common,rare,uncommon,unique")
|
||||
.Annotation("Npgsql:Enum:entity_type", "action,ancestry,archetype,background,backpack,campaign_feature,class,condition,deity,domain,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,deity_category,domain,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:locale_type", "english,hobby,other,russian")
|
||||
.Annotation("Npgsql:Enum:size_enum", "huge,large,medium,small,tiny")
|
||||
@@ -230,26 +230,17 @@ namespace Pf2eModel.Migrations
|
||||
});
|
||||
|
||||
migrationBuilder.CreateTable(
|
||||
name: "deities",
|
||||
name: "deity_categories",
|
||||
columns: table => new
|
||||
{
|
||||
id = table.Column<int>(type: "integer", nullable: false, comment: "Идентификатор"),
|
||||
type = table.Column<DeityType>(type: "deity_type", nullable: false, comment: "Тип божества"),
|
||||
category = table.Column<string>(type: "text", nullable: false, comment: "Категория божества"),
|
||||
fonts = table.Column<DeityFonts>(type: "deity_fonts", nullable: false, comment: "Тип божественной силы"),
|
||||
sanctification = table.Column<DeitySanctification>(type: "deity_sanctification", nullable: false, comment: "Тип освящения"),
|
||||
sanctification_must = table.Column<bool>(type: "boolean", nullable: false, comment: "Обязательное освящение"),
|
||||
edicts = table.Column<string>(type: "jsonb", nullable: false, comment: "Заветы божества"),
|
||||
anathema = table.Column<string>(type: "jsonb", nullable: false, comment: "Анафемы божества"),
|
||||
religious_symbol = table.Column<string>(type: "jsonb", nullable: false, comment: "Религиозный символ божества"),
|
||||
sacred_animal = table.Column<string>(type: "jsonb", nullable: false, comment: "Священное животное божества"),
|
||||
area_of_concern = table.Column<string>(type: "jsonb", nullable: false, comment: "Область покровительства божества")
|
||||
description = table.Column<string>(type: "jsonb", nullable: false, comment: "Описание категории")
|
||||
},
|
||||
constraints: table =>
|
||||
{
|
||||
table.PrimaryKey("pk_deities", x => x.id);
|
||||
table.PrimaryKey("pk_deity_categories", x => x.id);
|
||||
table.ForeignKey(
|
||||
name: "fk_deities_entities_id",
|
||||
name: "fk_deity_categories_entities_id",
|
||||
column: x => x.id,
|
||||
principalTable: "entities",
|
||||
principalColumn: "id",
|
||||
@@ -781,65 +772,35 @@ namespace Pf2eModel.Migrations
|
||||
});
|
||||
|
||||
migrationBuilder.CreateTable(
|
||||
name: "deity_attributes",
|
||||
name: "deities",
|
||||
columns: table => new
|
||||
{
|
||||
id = table.Column<int>(type: "integer", nullable: false, comment: "Идентификатор")
|
||||
.Annotation("Npgsql:ValueGenerationStrategy", NpgsqlValueGenerationStrategy.IdentityByDefaultColumn),
|
||||
deity_id = table.Column<int>(type: "integer", nullable: false, comment: "Идентификатор божества"),
|
||||
attribute = table.Column<AttributeValues>(type: "attribute_values", nullable: false, comment: "Атрибут божества")
|
||||
id = table.Column<int>(type: "integer", nullable: false, comment: "Идентификатор"),
|
||||
type = table.Column<DeityType>(type: "deity_type", nullable: false, comment: "Тип божества"),
|
||||
category = table.Column<string>(type: "text", nullable: false, comment: "Категория божества"),
|
||||
fonts = table.Column<DeityFonts>(type: "deity_fonts", nullable: false, comment: "Тип божественной силы"),
|
||||
sanctification = table.Column<DeitySanctification>(type: "deity_sanctification", nullable: false, comment: "Тип освящения"),
|
||||
sanctification_must = table.Column<bool>(type: "boolean", nullable: false, comment: "Обязательное освящение"),
|
||||
edicts = table.Column<string>(type: "jsonb", nullable: false, comment: "Заветы божества"),
|
||||
anathema = table.Column<string>(type: "jsonb", nullable: false, comment: "Анафемы божества"),
|
||||
religious_symbol = table.Column<string>(type: "jsonb", nullable: false, comment: "Религиозный символ божества"),
|
||||
sacred_animal = table.Column<string>(type: "jsonb", nullable: false, comment: "Священное животное божества"),
|
||||
area_of_concern = table.Column<string>(type: "jsonb", nullable: false, comment: "Область покровительства божества"),
|
||||
category_id = table.Column<int>(type: "integer", nullable: true, comment: "Идентификатор категории божества"),
|
||||
category_entity_id = table.Column<int>(type: "integer", nullable: true)
|
||||
},
|
||||
constraints: table =>
|
||||
{
|
||||
table.PrimaryKey("pk_deity_attributes", x => x.id);
|
||||
table.PrimaryKey("pk_deities", x => x.id);
|
||||
table.ForeignKey(
|
||||
name: "fk_deity_attributes_deities_deity_id",
|
||||
column: x => x.deity_id,
|
||||
principalTable: "deities",
|
||||
principalColumn: "id",
|
||||
onDelete: ReferentialAction.Cascade);
|
||||
});
|
||||
|
||||
migrationBuilder.CreateTable(
|
||||
name: "deity_training",
|
||||
columns: table => new
|
||||
{
|
||||
deity_id = table.Column<int>(type: "integer", nullable: false),
|
||||
skills_id = table.Column<int>(type: "integer", nullable: false)
|
||||
},
|
||||
constraints: table =>
|
||||
{
|
||||
table.PrimaryKey("pk_deity_training", x => new { x.deity_id, x.skills_id });
|
||||
name: "fk_deities_deity_categories_category_entity_id",
|
||||
column: x => x.category_entity_id,
|
||||
principalTable: "deity_categories",
|
||||
principalColumn: "id");
|
||||
table.ForeignKey(
|
||||
name: "fk_deity_training_deities_deity_id",
|
||||
column: x => x.deity_id,
|
||||
principalTable: "deities",
|
||||
principalColumn: "id",
|
||||
onDelete: ReferentialAction.Cascade);
|
||||
table.ForeignKey(
|
||||
name: "fk_deity_training_trainings_skills_id",
|
||||
column: x => x.skills_id,
|
||||
principalTable: "trainings",
|
||||
principalColumn: "id",
|
||||
onDelete: ReferentialAction.Cascade);
|
||||
});
|
||||
|
||||
migrationBuilder.CreateTable(
|
||||
name: "deity_weapons",
|
||||
columns: table => new
|
||||
{
|
||||
id = table.Column<int>(type: "integer", nullable: false, comment: "Идентификатор")
|
||||
.Annotation("Npgsql:ValueGenerationStrategy", NpgsqlValueGenerationStrategy.IdentityByDefaultColumn),
|
||||
deity_id = table.Column<int>(type: "integer", nullable: false, comment: "Идентификатор божества"),
|
||||
weapon = table.Column<string>(type: "character varying(255)", maxLength: 255, nullable: false, comment: "Название оружия")
|
||||
},
|
||||
constraints: table =>
|
||||
{
|
||||
table.PrimaryKey("pk_deity_weapons", x => x.id);
|
||||
table.ForeignKey(
|
||||
name: "fk_deity_weapons_deities_deity_id",
|
||||
column: x => x.deity_id,
|
||||
principalTable: "deities",
|
||||
name: "fk_deities_entities_id",
|
||||
column: x => x.id,
|
||||
principalTable: "entities",
|
||||
principalColumn: "id",
|
||||
onDelete: ReferentialAction.Cascade);
|
||||
});
|
||||
@@ -963,33 +924,6 @@ namespace Pf2eModel.Migrations
|
||||
onDelete: ReferentialAction.SetNull);
|
||||
});
|
||||
|
||||
migrationBuilder.CreateTable(
|
||||
name: "deity_spells",
|
||||
columns: table => new
|
||||
{
|
||||
id = table.Column<int>(type: "integer", nullable: false, comment: "Идентификатор")
|
||||
.Annotation("Npgsql:ValueGenerationStrategy", NpgsqlValueGenerationStrategy.IdentityByDefaultColumn),
|
||||
deity_id = table.Column<int>(type: "integer", nullable: false, comment: "Идентификатор божества"),
|
||||
level = table.Column<int>(type: "integer", nullable: false, comment: "Уровень заклинания"),
|
||||
spell_id = table.Column<int>(type: "integer", nullable: false, comment: "Идентификатор заклинания")
|
||||
},
|
||||
constraints: table =>
|
||||
{
|
||||
table.PrimaryKey("pk_deity_spells", x => x.id);
|
||||
table.ForeignKey(
|
||||
name: "fk_deity_spells_deities_deity_id",
|
||||
column: x => x.deity_id,
|
||||
principalTable: "deities",
|
||||
principalColumn: "id",
|
||||
onDelete: ReferentialAction.Cascade);
|
||||
table.ForeignKey(
|
||||
name: "fk_deity_spells_spells_spell_id",
|
||||
column: x => x.spell_id,
|
||||
principalTable: "spells",
|
||||
principalColumn: "id",
|
||||
onDelete: ReferentialAction.Cascade);
|
||||
});
|
||||
|
||||
migrationBuilder.CreateTable(
|
||||
name: "domains",
|
||||
columns: table => new
|
||||
@@ -1154,6 +1088,97 @@ namespace Pf2eModel.Migrations
|
||||
onDelete: ReferentialAction.Cascade);
|
||||
});
|
||||
|
||||
migrationBuilder.CreateTable(
|
||||
name: "deity_attributes",
|
||||
columns: table => new
|
||||
{
|
||||
id = table.Column<int>(type: "integer", nullable: false, comment: "Идентификатор")
|
||||
.Annotation("Npgsql:ValueGenerationStrategy", NpgsqlValueGenerationStrategy.IdentityByDefaultColumn),
|
||||
deity_id = table.Column<int>(type: "integer", nullable: false, comment: "Идентификатор божества"),
|
||||
attribute = table.Column<AttributeValues>(type: "attribute_values", nullable: false, comment: "Атрибут божества")
|
||||
},
|
||||
constraints: table =>
|
||||
{
|
||||
table.PrimaryKey("pk_deity_attributes", x => x.id);
|
||||
table.ForeignKey(
|
||||
name: "fk_deity_attributes_deities_deity_id",
|
||||
column: x => x.deity_id,
|
||||
principalTable: "deities",
|
||||
principalColumn: "id",
|
||||
onDelete: ReferentialAction.Cascade);
|
||||
});
|
||||
|
||||
migrationBuilder.CreateTable(
|
||||
name: "deity_spells",
|
||||
columns: table => new
|
||||
{
|
||||
id = table.Column<int>(type: "integer", nullable: false, comment: "Идентификатор")
|
||||
.Annotation("Npgsql:ValueGenerationStrategy", NpgsqlValueGenerationStrategy.IdentityByDefaultColumn),
|
||||
deity_id = table.Column<int>(type: "integer", nullable: false, comment: "Идентификатор божества"),
|
||||
level = table.Column<int>(type: "integer", nullable: false, comment: "Уровень заклинания"),
|
||||
spell_id = table.Column<int>(type: "integer", nullable: false, comment: "Идентификатор заклинания")
|
||||
},
|
||||
constraints: table =>
|
||||
{
|
||||
table.PrimaryKey("pk_deity_spells", x => x.id);
|
||||
table.ForeignKey(
|
||||
name: "fk_deity_spells_deities_deity_id",
|
||||
column: x => x.deity_id,
|
||||
principalTable: "deities",
|
||||
principalColumn: "id",
|
||||
onDelete: ReferentialAction.Cascade);
|
||||
table.ForeignKey(
|
||||
name: "fk_deity_spells_spells_spell_id",
|
||||
column: x => x.spell_id,
|
||||
principalTable: "spells",
|
||||
principalColumn: "id",
|
||||
onDelete: ReferentialAction.Cascade);
|
||||
});
|
||||
|
||||
migrationBuilder.CreateTable(
|
||||
name: "deity_training",
|
||||
columns: table => new
|
||||
{
|
||||
deity_id = table.Column<int>(type: "integer", nullable: false),
|
||||
skills_id = table.Column<int>(type: "integer", nullable: false)
|
||||
},
|
||||
constraints: table =>
|
||||
{
|
||||
table.PrimaryKey("pk_deity_training", x => new { x.deity_id, x.skills_id });
|
||||
table.ForeignKey(
|
||||
name: "fk_deity_training_deities_deity_id",
|
||||
column: x => x.deity_id,
|
||||
principalTable: "deities",
|
||||
principalColumn: "id",
|
||||
onDelete: ReferentialAction.Cascade);
|
||||
table.ForeignKey(
|
||||
name: "fk_deity_training_trainings_skills_id",
|
||||
column: x => x.skills_id,
|
||||
principalTable: "trainings",
|
||||
principalColumn: "id",
|
||||
onDelete: ReferentialAction.Cascade);
|
||||
});
|
||||
|
||||
migrationBuilder.CreateTable(
|
||||
name: "deity_weapons",
|
||||
columns: table => new
|
||||
{
|
||||
id = table.Column<int>(type: "integer", nullable: false, comment: "Идентификатор")
|
||||
.Annotation("Npgsql:ValueGenerationStrategy", NpgsqlValueGenerationStrategy.IdentityByDefaultColumn),
|
||||
deity_id = table.Column<int>(type: "integer", nullable: false, comment: "Идентификатор божества"),
|
||||
weapon = table.Column<string>(type: "character varying(255)", maxLength: 255, nullable: false, comment: "Название оружия")
|
||||
},
|
||||
constraints: table =>
|
||||
{
|
||||
table.PrimaryKey("pk_deity_weapons", x => x.id);
|
||||
table.ForeignKey(
|
||||
name: "fk_deity_weapons_deities_deity_id",
|
||||
column: x => x.deity_id,
|
||||
principalTable: "deities",
|
||||
principalColumn: "id",
|
||||
onDelete: ReferentialAction.Cascade);
|
||||
});
|
||||
|
||||
migrationBuilder.CreateTable(
|
||||
name: "archetype_feats",
|
||||
columns: table => new
|
||||
@@ -1328,6 +1353,11 @@ namespace Pf2eModel.Migrations
|
||||
table: "class_trainings",
|
||||
column: "training_id");
|
||||
|
||||
migrationBuilder.CreateIndex(
|
||||
name: "ix_deities_category_entity_id",
|
||||
table: "deities",
|
||||
column: "category_entity_id");
|
||||
|
||||
migrationBuilder.CreateIndex(
|
||||
name: "ix_deity_attributes_deity_id",
|
||||
table: "deity_attributes",
|
||||
@@ -1647,6 +1677,9 @@ namespace Pf2eModel.Migrations
|
||||
migrationBuilder.DropTable(
|
||||
name: "spells");
|
||||
|
||||
migrationBuilder.DropTable(
|
||||
name: "deity_categories");
|
||||
|
||||
migrationBuilder.DropTable(
|
||||
name: "subclass_groups");
|
||||
|
||||
@@ -31,7 +31,7 @@ namespace Pf2eModel.Migrations
|
||||
NpgsqlModelBuilderExtensions.HasPostgresEnum(modelBuilder, "deity_type", new[] { "covenant", "deity", "pantheon", "philosophy" });
|
||||
NpgsqlModelBuilderExtensions.HasPostgresEnum(modelBuilder, "element_enum", new[] { "air", "earth", "fire", "metal", "universal", "water", "wood" });
|
||||
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", "domain", "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", "deity_category", "domain", "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, "locale_type", new[] { "english", "hobby", "other", "russian" });
|
||||
NpgsqlModelBuilderExtensions.HasPostgresEnum(modelBuilder, "size_enum", new[] { "huge", "large", "medium", "small", "tiny" });
|
||||
@@ -1146,6 +1146,16 @@ namespace Pf2eModel.Migrations
|
||||
.HasColumnOrder(3)
|
||||
.HasComment("Категория божества");
|
||||
|
||||
b.Property<int?>("CategoryEntityId")
|
||||
.HasColumnType("integer")
|
||||
.HasColumnName("category_entity_id");
|
||||
|
||||
b.Property<int?>("CategoryId")
|
||||
.HasColumnType("integer")
|
||||
.HasColumnName("category_id")
|
||||
.HasColumnOrder(12)
|
||||
.HasComment("Идентификатор категории божества");
|
||||
|
||||
b.Property<string>("Edicts")
|
||||
.IsRequired()
|
||||
.HasColumnType("jsonb")
|
||||
@@ -1194,9 +1204,33 @@ namespace Pf2eModel.Migrations
|
||||
b.HasKey("Id")
|
||||
.HasName("pk_deities");
|
||||
|
||||
b.HasIndex("CategoryEntityId")
|
||||
.HasDatabaseName("ix_deities_category_entity_id");
|
||||
|
||||
b.ToTable("deities", (string)null);
|
||||
});
|
||||
|
||||
modelBuilder.Entity("Pf2eModel.Model.Structure.DeityCategory", b =>
|
||||
{
|
||||
b.Property<int>("Id")
|
||||
.HasColumnType("integer")
|
||||
.HasColumnName("id")
|
||||
.HasColumnOrder(1)
|
||||
.HasComment("Идентификатор");
|
||||
|
||||
b.Property<string>("Description")
|
||||
.IsRequired()
|
||||
.HasColumnType("jsonb")
|
||||
.HasColumnName("description")
|
||||
.HasColumnOrder(2)
|
||||
.HasComment("Описание категории");
|
||||
|
||||
b.HasKey("Id")
|
||||
.HasName("pk_deity_categories");
|
||||
|
||||
b.ToTable("deity_categories", (string)null);
|
||||
});
|
||||
|
||||
modelBuilder.Entity("Pf2eModel.Model.Structure.DeityRelation.DeityAttribute", b =>
|
||||
{
|
||||
b.Property<int>("Id")
|
||||
@@ -2485,6 +2519,11 @@ namespace Pf2eModel.Migrations
|
||||
|
||||
modelBuilder.Entity("Pf2eModel.Model.Structure.Deity", b =>
|
||||
{
|
||||
b.HasOne("Pf2eModel.Model.Structure.DeityCategory", "CategoryEntity")
|
||||
.WithMany()
|
||||
.HasForeignKey("CategoryEntityId")
|
||||
.HasConstraintName("fk_deities_deity_categories_category_entity_id");
|
||||
|
||||
b.HasOne("Pf2eModel.Model.Base.Entity", "Entity")
|
||||
.WithOne()
|
||||
.HasForeignKey("Pf2eModel.Model.Structure.Deity", "Id")
|
||||
@@ -2492,6 +2531,20 @@ namespace Pf2eModel.Migrations
|
||||
.IsRequired()
|
||||
.HasConstraintName("fk_deities_entities_id");
|
||||
|
||||
b.Navigation("CategoryEntity");
|
||||
|
||||
b.Navigation("Entity");
|
||||
});
|
||||
|
||||
modelBuilder.Entity("Pf2eModel.Model.Structure.DeityCategory", b =>
|
||||
{
|
||||
b.HasOne("Pf2eModel.Model.Base.Entity", "Entity")
|
||||
.WithOne()
|
||||
.HasForeignKey("Pf2eModel.Model.Structure.DeityCategory", "Id")
|
||||
.OnDelete(DeleteBehavior.Cascade)
|
||||
.IsRequired()
|
||||
.HasConstraintName("fk_deity_categories_entities_id");
|
||||
|
||||
b.Navigation("Entity");
|
||||
});
|
||||
|
||||
|
||||
Reference in New Issue
Block a user