Процессор божеств
This commit is contained in:
+69
-15
@@ -13,7 +13,7 @@ using Pf2eModel.Model.Enum;
|
||||
namespace Pf2eModel.Migrations
|
||||
{
|
||||
[DbContext(typeof(Pf2eDbContext))]
|
||||
[Migration("20250913084534_1")]
|
||||
[Migration("20250914093120_1")]
|
||||
partial class _1
|
||||
{
|
||||
/// <inheritdoc />
|
||||
@@ -29,9 +29,9 @@ namespace Pf2eModel.Migrations
|
||||
NpgsqlModelBuilderExtensions.HasPostgresEnum(modelBuilder, "attribute_values", new[] { "cha", "con", "dex", "free", "int", "str", "wis" });
|
||||
NpgsqlModelBuilderExtensions.HasPostgresEnum(modelBuilder, "class_progression_type", new[] { "ancestry_feat", "attribute_increase", "class_feat", "entity", "general_feat", "skill_feat", "skill_increase" });
|
||||
NpgsqlModelBuilderExtensions.HasPostgresEnum(modelBuilder, "condition_group", new[] { "abilities", "attitudes", "death", "detection", "senses", "unknown" });
|
||||
NpgsqlModelBuilderExtensions.HasPostgresEnum(modelBuilder, "deity_category", new[] { "covenant", "deity", "pantheon", "philosophy" });
|
||||
NpgsqlModelBuilderExtensions.HasPostgresEnum(modelBuilder, "deity_fonts", new[] { "any", "harm", "heal", "none" });
|
||||
NpgsqlModelBuilderExtensions.HasPostgresEnum(modelBuilder, "deity_sanctification", new[] { "any", "holy", "unholy" });
|
||||
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" });
|
||||
@@ -44,7 +44,7 @@ namespace Pf2eModel.Migrations
|
||||
NpgsqlModelBuilderExtensions.HasPostgresEnum(modelBuilder, "spell_damage_kinds", new[] { "any", "damage", "healing" });
|
||||
NpgsqlModelBuilderExtensions.HasPostgresEnum(modelBuilder, "spell_tradition", new[] { "all", "arcane", "divine", "elemental", "none", "occult", "primal" });
|
||||
NpgsqlModelBuilderExtensions.HasPostgresEnum(modelBuilder, "training_rank", new[] { "expert", "legendary", "master", "mythic", "trained", "untrained" });
|
||||
NpgsqlModelBuilderExtensions.HasPostgresEnum(modelBuilder, "trait_type", new[] { "class", "regular", "tradition" });
|
||||
NpgsqlModelBuilderExtensions.HasPostgresEnum(modelBuilder, "trait_type", new[] { "alignment", "class", "regular", "tradition" });
|
||||
NpgsqlModelBuilderExtensions.HasPostgresEnum(modelBuilder, "vision_enum", new[] { "dark-vision", "low-light-vision", "normal" });
|
||||
NpgsqlModelBuilderExtensions.UseIdentityByDefaultColumns(modelBuilder);
|
||||
|
||||
@@ -1128,30 +1128,72 @@ namespace Pf2eModel.Migrations
|
||||
.HasColumnOrder(1)
|
||||
.HasComment("Идентификатор");
|
||||
|
||||
b.Property<DeityCategory>("Category")
|
||||
.HasColumnType("deity_category")
|
||||
b.Property<string>("Anathema")
|
||||
.IsRequired()
|
||||
.HasColumnType("jsonb")
|
||||
.HasColumnName("anathema")
|
||||
.HasColumnOrder(8)
|
||||
.HasComment("Анафемы божества");
|
||||
|
||||
b.Property<string>("AreaOfConcern")
|
||||
.IsRequired()
|
||||
.HasColumnType("jsonb")
|
||||
.HasColumnName("area_of_concern")
|
||||
.HasColumnOrder(11)
|
||||
.HasComment("Область покровительства божества");
|
||||
|
||||
b.Property<string>("Category")
|
||||
.IsRequired()
|
||||
.HasColumnType("text")
|
||||
.HasColumnName("category")
|
||||
.HasColumnOrder(2)
|
||||
.HasComment("Тип божества");
|
||||
.HasColumnOrder(3)
|
||||
.HasComment("Категория божества");
|
||||
|
||||
b.Property<string>("Edicts")
|
||||
.IsRequired()
|
||||
.HasColumnType("jsonb")
|
||||
.HasColumnName("edicts")
|
||||
.HasColumnOrder(7)
|
||||
.HasComment("Заветы божества");
|
||||
|
||||
b.Property<DeityFonts>("Fonts")
|
||||
.HasColumnType("deity_fonts")
|
||||
.HasColumnName("fonts")
|
||||
.HasColumnOrder(3)
|
||||
.HasColumnOrder(4)
|
||||
.HasComment("Тип божественной силы");
|
||||
|
||||
b.Property<string>("ReligiousSymbol")
|
||||
.IsRequired()
|
||||
.HasColumnType("jsonb")
|
||||
.HasColumnName("religious_symbol")
|
||||
.HasColumnOrder(9)
|
||||
.HasComment("Религиозный символ божества");
|
||||
|
||||
b.Property<string>("SacredAnimal")
|
||||
.IsRequired()
|
||||
.HasColumnType("jsonb")
|
||||
.HasColumnName("sacred_animal")
|
||||
.HasColumnOrder(10)
|
||||
.HasComment("Священное животное божества");
|
||||
|
||||
b.Property<DeitySanctification>("Sanctification")
|
||||
.HasColumnType("deity_sanctification")
|
||||
.HasColumnName("sanctification")
|
||||
.HasColumnOrder(4)
|
||||
.HasColumnOrder(5)
|
||||
.HasComment("Тип освящения");
|
||||
|
||||
b.Property<bool>("SanctificationMust")
|
||||
.HasColumnType("boolean")
|
||||
.HasColumnName("sanctification_must")
|
||||
.HasColumnOrder(5)
|
||||
.HasColumnOrder(6)
|
||||
.HasComment("Обязательное освящение");
|
||||
|
||||
b.Property<DeityType>("Type")
|
||||
.HasColumnType("deity_type")
|
||||
.HasColumnName("type")
|
||||
.HasColumnOrder(2)
|
||||
.HasComment("Тип божества");
|
||||
|
||||
b.HasKey("Id")
|
||||
.HasName("pk_deities");
|
||||
|
||||
@@ -1160,21 +1202,33 @@ namespace Pf2eModel.Migrations
|
||||
|
||||
modelBuilder.Entity("Pf2eModel.Model.Structure.DeityRelation.DeityAttribute", b =>
|
||||
{
|
||||
b.Property<int>("DeityId")
|
||||
b.Property<int>("Id")
|
||||
.ValueGeneratedOnAdd()
|
||||
.HasColumnType("integer")
|
||||
.HasColumnName("deity_id")
|
||||
.HasColumnName("id")
|
||||
.HasColumnOrder(1)
|
||||
.HasComment("Идентификатор божества");
|
||||
.HasComment("Идентификатор");
|
||||
|
||||
NpgsqlPropertyBuilderExtensions.UseIdentityByDefaultColumn(b.Property<int>("Id"));
|
||||
|
||||
b.Property<AttributeValues>("Attribute")
|
||||
.HasColumnType("attribute_values")
|
||||
.HasColumnName("attribute")
|
||||
.HasColumnOrder(2)
|
||||
.HasColumnOrder(3)
|
||||
.HasComment("Атрибут божества");
|
||||
|
||||
b.HasKey("DeityId", "Attribute")
|
||||
b.Property<int>("DeityId")
|
||||
.HasColumnType("integer")
|
||||
.HasColumnName("deity_id")
|
||||
.HasColumnOrder(2)
|
||||
.HasComment("Идентификатор божества");
|
||||
|
||||
b.HasKey("Id")
|
||||
.HasName("pk_deity_attributes");
|
||||
|
||||
b.HasIndex("DeityId")
|
||||
.HasDatabaseName("ix_deity_attributes_deity_id");
|
||||
|
||||
b.ToTable("deity_attributes", (string)null);
|
||||
});
|
||||
|
||||
+18
-5
@@ -19,9 +19,9 @@ namespace Pf2eModel.Migrations
|
||||
.Annotation("Npgsql:Enum:attribute_values", "cha,con,dex,free,int,str,wis")
|
||||
.Annotation("Npgsql:Enum:class_progression_type", "ancestry_feat,attribute_increase,class_feat,entity,general_feat,skill_feat,skill_increase")
|
||||
.Annotation("Npgsql:Enum:condition_group", "abilities,attitudes,death,detection,senses,unknown")
|
||||
.Annotation("Npgsql:Enum:deity_category", "covenant,deity,pantheon,philosophy")
|
||||
.Annotation("Npgsql:Enum:deity_fonts", "any,harm,heal,none")
|
||||
.Annotation("Npgsql:Enum:deity_sanctification", "any,holy,unholy")
|
||||
.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")
|
||||
@@ -34,7 +34,7 @@ namespace Pf2eModel.Migrations
|
||||
.Annotation("Npgsql:Enum:spell_damage_kinds", "any,damage,healing")
|
||||
.Annotation("Npgsql:Enum:spell_tradition", "all,arcane,divine,elemental,none,occult,primal")
|
||||
.Annotation("Npgsql:Enum:training_rank", "expert,legendary,master,mythic,trained,untrained")
|
||||
.Annotation("Npgsql:Enum:trait_type", "class,regular,tradition")
|
||||
.Annotation("Npgsql:Enum:trait_type", "alignment,class,regular,tradition")
|
||||
.Annotation("Npgsql:Enum:vision_enum", "dark-vision,low-light-vision,normal");
|
||||
|
||||
migrationBuilder.CreateTable(
|
||||
@@ -234,10 +234,16 @@ namespace Pf2eModel.Migrations
|
||||
columns: table => new
|
||||
{
|
||||
id = table.Column<int>(type: "integer", nullable: false, comment: "Идентификатор"),
|
||||
category = table.Column<DeityCategory>(type: "deity_category", 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: "Обязательное освящение")
|
||||
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: "Область покровительства божества")
|
||||
},
|
||||
constraints: table =>
|
||||
{
|
||||
@@ -778,12 +784,14 @@ namespace Pf2eModel.Migrations
|
||||
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 => new { x.deity_id, x.attribute });
|
||||
table.PrimaryKey("pk_deity_attributes", x => x.id);
|
||||
table.ForeignKey(
|
||||
name: "fk_deity_attributes_deities_deity_id",
|
||||
column: x => x.deity_id,
|
||||
@@ -1320,6 +1328,11 @@ namespace Pf2eModel.Migrations
|
||||
table: "class_trainings",
|
||||
column: "training_id");
|
||||
|
||||
migrationBuilder.CreateIndex(
|
||||
name: "ix_deity_attributes_deity_id",
|
||||
table: "deity_attributes",
|
||||
column: "deity_id");
|
||||
|
||||
migrationBuilder.CreateIndex(
|
||||
name: "ix_deity_domains_deity_id",
|
||||
table: "deity_domains",
|
||||
@@ -26,9 +26,9 @@ namespace Pf2eModel.Migrations
|
||||
NpgsqlModelBuilderExtensions.HasPostgresEnum(modelBuilder, "attribute_values", new[] { "cha", "con", "dex", "free", "int", "str", "wis" });
|
||||
NpgsqlModelBuilderExtensions.HasPostgresEnum(modelBuilder, "class_progression_type", new[] { "ancestry_feat", "attribute_increase", "class_feat", "entity", "general_feat", "skill_feat", "skill_increase" });
|
||||
NpgsqlModelBuilderExtensions.HasPostgresEnum(modelBuilder, "condition_group", new[] { "abilities", "attitudes", "death", "detection", "senses", "unknown" });
|
||||
NpgsqlModelBuilderExtensions.HasPostgresEnum(modelBuilder, "deity_category", new[] { "covenant", "deity", "pantheon", "philosophy" });
|
||||
NpgsqlModelBuilderExtensions.HasPostgresEnum(modelBuilder, "deity_fonts", new[] { "any", "harm", "heal", "none" });
|
||||
NpgsqlModelBuilderExtensions.HasPostgresEnum(modelBuilder, "deity_sanctification", new[] { "any", "holy", "unholy" });
|
||||
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" });
|
||||
@@ -41,7 +41,7 @@ namespace Pf2eModel.Migrations
|
||||
NpgsqlModelBuilderExtensions.HasPostgresEnum(modelBuilder, "spell_damage_kinds", new[] { "any", "damage", "healing" });
|
||||
NpgsqlModelBuilderExtensions.HasPostgresEnum(modelBuilder, "spell_tradition", new[] { "all", "arcane", "divine", "elemental", "none", "occult", "primal" });
|
||||
NpgsqlModelBuilderExtensions.HasPostgresEnum(modelBuilder, "training_rank", new[] { "expert", "legendary", "master", "mythic", "trained", "untrained" });
|
||||
NpgsqlModelBuilderExtensions.HasPostgresEnum(modelBuilder, "trait_type", new[] { "class", "regular", "tradition" });
|
||||
NpgsqlModelBuilderExtensions.HasPostgresEnum(modelBuilder, "trait_type", new[] { "alignment", "class", "regular", "tradition" });
|
||||
NpgsqlModelBuilderExtensions.HasPostgresEnum(modelBuilder, "vision_enum", new[] { "dark-vision", "low-light-vision", "normal" });
|
||||
NpgsqlModelBuilderExtensions.UseIdentityByDefaultColumns(modelBuilder);
|
||||
|
||||
@@ -1125,30 +1125,72 @@ namespace Pf2eModel.Migrations
|
||||
.HasColumnOrder(1)
|
||||
.HasComment("Идентификатор");
|
||||
|
||||
b.Property<DeityCategory>("Category")
|
||||
.HasColumnType("deity_category")
|
||||
b.Property<string>("Anathema")
|
||||
.IsRequired()
|
||||
.HasColumnType("jsonb")
|
||||
.HasColumnName("anathema")
|
||||
.HasColumnOrder(8)
|
||||
.HasComment("Анафемы божества");
|
||||
|
||||
b.Property<string>("AreaOfConcern")
|
||||
.IsRequired()
|
||||
.HasColumnType("jsonb")
|
||||
.HasColumnName("area_of_concern")
|
||||
.HasColumnOrder(11)
|
||||
.HasComment("Область покровительства божества");
|
||||
|
||||
b.Property<string>("Category")
|
||||
.IsRequired()
|
||||
.HasColumnType("text")
|
||||
.HasColumnName("category")
|
||||
.HasColumnOrder(2)
|
||||
.HasComment("Тип божества");
|
||||
.HasColumnOrder(3)
|
||||
.HasComment("Категория божества");
|
||||
|
||||
b.Property<string>("Edicts")
|
||||
.IsRequired()
|
||||
.HasColumnType("jsonb")
|
||||
.HasColumnName("edicts")
|
||||
.HasColumnOrder(7)
|
||||
.HasComment("Заветы божества");
|
||||
|
||||
b.Property<DeityFonts>("Fonts")
|
||||
.HasColumnType("deity_fonts")
|
||||
.HasColumnName("fonts")
|
||||
.HasColumnOrder(3)
|
||||
.HasColumnOrder(4)
|
||||
.HasComment("Тип божественной силы");
|
||||
|
||||
b.Property<string>("ReligiousSymbol")
|
||||
.IsRequired()
|
||||
.HasColumnType("jsonb")
|
||||
.HasColumnName("religious_symbol")
|
||||
.HasColumnOrder(9)
|
||||
.HasComment("Религиозный символ божества");
|
||||
|
||||
b.Property<string>("SacredAnimal")
|
||||
.IsRequired()
|
||||
.HasColumnType("jsonb")
|
||||
.HasColumnName("sacred_animal")
|
||||
.HasColumnOrder(10)
|
||||
.HasComment("Священное животное божества");
|
||||
|
||||
b.Property<DeitySanctification>("Sanctification")
|
||||
.HasColumnType("deity_sanctification")
|
||||
.HasColumnName("sanctification")
|
||||
.HasColumnOrder(4)
|
||||
.HasColumnOrder(5)
|
||||
.HasComment("Тип освящения");
|
||||
|
||||
b.Property<bool>("SanctificationMust")
|
||||
.HasColumnType("boolean")
|
||||
.HasColumnName("sanctification_must")
|
||||
.HasColumnOrder(5)
|
||||
.HasColumnOrder(6)
|
||||
.HasComment("Обязательное освящение");
|
||||
|
||||
b.Property<DeityType>("Type")
|
||||
.HasColumnType("deity_type")
|
||||
.HasColumnName("type")
|
||||
.HasColumnOrder(2)
|
||||
.HasComment("Тип божества");
|
||||
|
||||
b.HasKey("Id")
|
||||
.HasName("pk_deities");
|
||||
|
||||
@@ -1157,21 +1199,33 @@ namespace Pf2eModel.Migrations
|
||||
|
||||
modelBuilder.Entity("Pf2eModel.Model.Structure.DeityRelation.DeityAttribute", b =>
|
||||
{
|
||||
b.Property<int>("DeityId")
|
||||
b.Property<int>("Id")
|
||||
.ValueGeneratedOnAdd()
|
||||
.HasColumnType("integer")
|
||||
.HasColumnName("deity_id")
|
||||
.HasColumnName("id")
|
||||
.HasColumnOrder(1)
|
||||
.HasComment("Идентификатор божества");
|
||||
.HasComment("Идентификатор");
|
||||
|
||||
NpgsqlPropertyBuilderExtensions.UseIdentityByDefaultColumn(b.Property<int>("Id"));
|
||||
|
||||
b.Property<AttributeValues>("Attribute")
|
||||
.HasColumnType("attribute_values")
|
||||
.HasColumnName("attribute")
|
||||
.HasColumnOrder(2)
|
||||
.HasColumnOrder(3)
|
||||
.HasComment("Атрибут божества");
|
||||
|
||||
b.HasKey("DeityId", "Attribute")
|
||||
b.Property<int>("DeityId")
|
||||
.HasColumnType("integer")
|
||||
.HasColumnName("deity_id")
|
||||
.HasColumnOrder(2)
|
||||
.HasComment("Идентификатор божества");
|
||||
|
||||
b.HasKey("Id")
|
||||
.HasName("pk_deity_attributes");
|
||||
|
||||
b.HasIndex("DeityId")
|
||||
.HasDatabaseName("ix_deity_attributes_deity_id");
|
||||
|
||||
b.ToTable("deity_attributes", (string)null);
|
||||
});
|
||||
|
||||
|
||||
@@ -5,7 +5,7 @@ namespace Pf2eModel.Model.Enum;
|
||||
/// <summary>
|
||||
/// Тип божества.
|
||||
/// </summary>
|
||||
public enum DeityCategory
|
||||
public enum DeityType
|
||||
{
|
||||
/// <summary>
|
||||
/// Божество.
|
||||
@@ -30,56 +30,70 @@ public class Deity : IEntity
|
||||
/// </summary>
|
||||
[Column(Order = 2)]
|
||||
[Comment("Тип божества")]
|
||||
public DeityCategory Category { get; set; }
|
||||
public DeityType Type { get; set; }
|
||||
|
||||
/// <summary>
|
||||
/// Категория божества.
|
||||
/// </summary>
|
||||
[Column(Order = 3)]
|
||||
[Comment("Категория божества")]
|
||||
public string Category { get; set; } = null!;
|
||||
|
||||
/// <summary>
|
||||
/// Тип божественный силы.
|
||||
/// </summary>
|
||||
[Column(Order = 3)]
|
||||
[Column(Order = 4)]
|
||||
[Comment("Тип божественной силы")]
|
||||
public DeityFonts Fonts { get; set; }
|
||||
|
||||
/// <summary>
|
||||
/// Тип освящения.
|
||||
/// </summary>
|
||||
[Column(Order = 4)]
|
||||
[Column(Order = 5)]
|
||||
[Comment("Тип освящения")]
|
||||
public DeitySanctification Sanctification { get; set; }
|
||||
|
||||
/// <summary>
|
||||
/// Обязательное освящение.
|
||||
/// </summary>
|
||||
[Column(Order = 5)]
|
||||
[Column(Order = 6)]
|
||||
[Comment("Обязательное освящение")]
|
||||
public bool SanctificationMust { get; set; }
|
||||
|
||||
/// <summary>
|
||||
/// Заветы божества.
|
||||
/// </summary>
|
||||
[Column(Order = 6)]
|
||||
[Column(Order = 7)]
|
||||
[Comment("Заветы божества")]
|
||||
public LocaleString Edicts { get; set; } = null!;
|
||||
public LocaleString Edicts { get; set; } = [];
|
||||
|
||||
/// <summary>
|
||||
/// Анафемы божества.
|
||||
/// </summary>
|
||||
[Column(Order = 7)]
|
||||
[Column(Order = 8)]
|
||||
[Comment("Анафемы божества")]
|
||||
public LocaleString Anathema { get; set; } = null!;
|
||||
public LocaleString Anathema { get; set; } = [];
|
||||
|
||||
/// <summary>
|
||||
/// Религиозный символ божества.
|
||||
/// </summary>
|
||||
[Column(Order = 8)]
|
||||
[Column(Order = 9)]
|
||||
[Comment("Религиозный символ божества")]
|
||||
public LocaleString ReligiousSymbol { get; set; } = null!;
|
||||
public LocaleString ReligiousSymbol { get; set; } = [];
|
||||
|
||||
/// <summary>
|
||||
/// Священное животное божества.
|
||||
/// </summary>
|
||||
[Column(Order = 9)]
|
||||
[Column(Order = 10)]
|
||||
[Comment("Священное животное божества")]
|
||||
public LocaleString SacredAnimal { get; set; } = null!;
|
||||
public LocaleString SacredAnimal { get; set; } = [];
|
||||
|
||||
/// <summary>
|
||||
/// Область покровительства божества.
|
||||
/// </summary>
|
||||
[Column(Order = 11)]
|
||||
[Comment("Область покровительства божества")]
|
||||
public LocaleString AreaOfConcern { get; set; } = [];
|
||||
|
||||
/// <summary>
|
||||
/// Атрибуты божества.
|
||||
|
||||
@@ -1,4 +1,5 @@
|
||||
using System.ComponentModel.DataAnnotations.Schema;
|
||||
using System.ComponentModel.DataAnnotations;
|
||||
using System.ComponentModel.DataAnnotations.Schema;
|
||||
using Microsoft.EntityFrameworkCore;
|
||||
using Pf2eModel.Model.Enum;
|
||||
|
||||
@@ -7,20 +8,28 @@ namespace Pf2eModel.Model.Structure.DeityRelation;
|
||||
/// <summary>
|
||||
/// Элемент отношения божества и атрибута.
|
||||
/// </summary>
|
||||
[PrimaryKey(nameof(DeityId), nameof(Attribute))]
|
||||
public class DeityAttribute
|
||||
{
|
||||
/// <summary>
|
||||
/// Идентификатор.
|
||||
/// </summary>
|
||||
[Key]
|
||||
[DatabaseGenerated(DatabaseGeneratedOption.Identity)]
|
||||
[Column(Order = 1)]
|
||||
[Comment("Идентификатор")]
|
||||
public int Id { get; set; }
|
||||
|
||||
/// <summary>
|
||||
/// Идентификатор божества.
|
||||
/// </summary>
|
||||
[Column(Order = 1)]
|
||||
[Column(Order = 2)]
|
||||
[Comment("Идентификатор божества")]
|
||||
public int DeityId { get; set; }
|
||||
|
||||
/// <summary>
|
||||
/// Атрибут божества.
|
||||
/// </summary>
|
||||
[Column(Order = 2)]
|
||||
[Column(Order = 3)]
|
||||
[Comment("Атрибут божества")]
|
||||
public AttributeValues Attribute { get; set; }
|
||||
|
||||
|
||||
@@ -163,7 +163,7 @@ public partial class Pf2eDbContext : DbContext
|
||||
.MapEnum<AttributeValues>()
|
||||
.MapEnum<ClassProgressionType>()
|
||||
.MapEnum<ConditionGroup>()
|
||||
.MapEnum<DeityCategory>()
|
||||
.MapEnum<DeityType>()
|
||||
.MapEnum<DeityFonts>()
|
||||
.MapEnum<DeitySanctification>()
|
||||
.MapEnum<ElementEnum>()
|
||||
|
||||
@@ -438,6 +438,7 @@ public partial class Pf2eDbContext
|
||||
BindLocaleString(entity, d => d.Edicts);
|
||||
BindLocaleString(entity, d => d.ReligiousSymbol);
|
||||
BindLocaleString(entity, d => d.SacredAnimal);
|
||||
BindLocaleString(entity, d => d.AreaOfConcern);
|
||||
|
||||
entity
|
||||
.HasMany(e => e.DeityAttributes)
|
||||
|
||||
Reference in New Issue
Block a user