Подготовка изменений
This commit is contained in:
@@ -3,11 +3,11 @@
|
||||
|
||||
## Class\.Spellcasting Property
|
||||
|
||||
Флаг, указывающий на то, что класс является заклинательным\.
|
||||
Указание на тип заклинательства\.
|
||||
|
||||
```csharp
|
||||
public bool Spellcasting { get; set; }
|
||||
public Pf2eModel.Model.Enum.SpellcastingType Spellcasting { get; set; }
|
||||
```
|
||||
|
||||
#### Property Value
|
||||
[System\.Boolean](https://docs.microsoft.com/en-us/dotnet/api/System.Boolean 'System\.Boolean')
|
||||
[SpellcastingType](SpellcastingType.md 'Pf2eModel\.Model\.Enum\.SpellcastingType')
|
||||
@@ -22,6 +22,6 @@ Implements [IEntity](IEntity.md 'Pf2eModel\.Model\.IEntity')
|
||||
| [Entity](Class.Entity.md 'Pf2eModel\.Model\.Structure\.Class\.Entity') | Корневая сущность\. |
|
||||
| [Hp](Class.Hp.md 'Pf2eModel\.Model\.Structure\.Class\.Hp') | Количество очков здоровья\. |
|
||||
| [Id](Class.Id.md 'Pf2eModel\.Model\.Structure\.Class\.Id') | Идентификатор сущности\. |
|
||||
| [Spellcasting](Class.Spellcasting.md 'Pf2eModel\.Model\.Structure\.Class\.Spellcasting') | Флаг, указывающий на то, что класс является заклинательным\. |
|
||||
| [Spellcasting](Class.Spellcasting.md 'Pf2eModel\.Model\.Structure\.Class\.Spellcasting') | Указание на тип заклинательства\. |
|
||||
| [SubclassGroups](Class.SubclassGroups.md 'Pf2eModel\.Model\.Structure\.Class\.SubclassGroups') | Группы подклассов\. |
|
||||
| [Tradition](Class.Tradition.md 'Pf2eModel\.Model\.Structure\.Class\.Tradition') | Традиция заклинаний класса\. |
|
||||
|
||||
@@ -21,6 +21,7 @@
|
||||
| [SizeEnum](SizeEnum.md 'Pf2eModel\.Model\.Enum\.SizeEnum') | Размер\. |
|
||||
| [SourceCategory](SourceCategory.md 'Pf2eModel\.Model\.Enum\.SourceCategory') | Перечисление категорий источников\. |
|
||||
| [SpellAreaType](SpellAreaType.md 'Pf2eModel\.Model\.Enum\.SpellAreaType') | Тип области заклинания\. |
|
||||
| [SpellcastingType](SpellcastingType.md 'Pf2eModel\.Model\.Enum\.SpellcastingType') | Перечисление типа применения заклинаний\. |
|
||||
| [SpellDamageCategory](SpellDamageCategory.md 'Pf2eModel\.Model\.Enum\.SpellDamageCategory') | Тип урона заклинания\. |
|
||||
| [SpellDamageKinds](SpellDamageKinds.md 'Pf2eModel\.Model\.Enum\.SpellDamageKinds') | Тип урона заклинания\. |
|
||||
| [SpellTradition](SpellTradition.md 'Pf2eModel\.Model\.Enum\.SpellTradition') | Традиция заклинания\. |
|
||||
|
||||
@@ -0,0 +1,29 @@
|
||||
#### [Pf2eModel](index.md 'index')
|
||||
### [Pf2eModel\.Model\.Enum](Pf2eModel.Model.Enum.md 'Pf2eModel\.Model\.Enum')
|
||||
|
||||
## SpellcastingType Enum
|
||||
|
||||
Перечисление типа применения заклинаний\.
|
||||
|
||||
```csharp
|
||||
public enum SpellcastingType
|
||||
```
|
||||
### Fields
|
||||
|
||||
<a name='Pf2eModel.Model.Enum.SpellcastingType.None'></a>
|
||||
|
||||
`None` 0
|
||||
|
||||
Не применяет заклинания\.
|
||||
|
||||
<a name='Pf2eModel.Model.Enum.SpellcastingType.Prepared'></a>
|
||||
|
||||
`Prepared` 1
|
||||
|
||||
Заготавливаемое заклинательство\.
|
||||
|
||||
<a name='Pf2eModel.Model.Enum.SpellcastingType.Spontaneous'></a>
|
||||
|
||||
`Spontaneous` 2
|
||||
|
||||
Спонтанное заклинательство\.
|
||||
@@ -7,7 +7,6 @@ using Pf2eDataScrapper.Helpers;
|
||||
using Pf2eDataScrapper.Importers.Implementations.Aonprd.Helpers;
|
||||
using Pf2eDataScrapper.Processors;
|
||||
using Pf2eDataScrapper.Processors.Attributes;
|
||||
using Pf2eDataScrapper.Processors.Collection;
|
||||
using Pf2eModel;
|
||||
using Pf2eModel.Model.Common;
|
||||
using Pf2eModel.Model.Common.I18n;
|
||||
@@ -88,15 +87,12 @@ internal partial class ClassProcessor(
|
||||
switch (tradition.Count)
|
||||
{
|
||||
case 0:
|
||||
Object.Spellcasting = false;
|
||||
Object.Tradition = SpellTradition.None;
|
||||
break;
|
||||
case 1:
|
||||
Object.Spellcasting = true;
|
||||
Object.Tradition = Input.Enum<SpellTradition>(tradition[0].ToString());
|
||||
break;
|
||||
default:
|
||||
Object.Spellcasting = true;
|
||||
Object.Tradition = SpellTradition.All;
|
||||
break;
|
||||
}
|
||||
|
||||
+13
-7
@@ -13,7 +13,7 @@ using Pf2eModel.Model.Enum;
|
||||
namespace Pf2eModel.Migrations
|
||||
{
|
||||
[DbContext(typeof(Pf2eDbContext))]
|
||||
[Migration("20250602061959_1")]
|
||||
[Migration("20250913071004_1")]
|
||||
partial class _1
|
||||
{
|
||||
/// <inheritdoc />
|
||||
@@ -24,7 +24,7 @@ namespace Pf2eModel.Migrations
|
||||
.HasAnnotation("ProductVersion", "9.0.4")
|
||||
.HasAnnotation("Relational:MaxIdentifierLength", 63);
|
||||
|
||||
NpgsqlModelBuilderExtensions.HasPostgresEnum(modelBuilder, "action_category", new[] { "archetype", "army_tactic", "army_war_action", "class-feat", "class-feature", "defensive", "familiar", "interaction", "kingdom_activity", "kingdom_feat", "kingdom_feature", "offensive", "skill-action", "unknown" });
|
||||
NpgsqlModelBuilderExtensions.HasPostgresEnum(modelBuilder, "action_category", new[] { "archetype", "army_tactic", "army_war_action", "class-feat", "class-feature", "familiar", "kingdom_activity", "kingdom_feat", "kingdom_feature", "skill-action", "unknown" });
|
||||
NpgsqlModelBuilderExtensions.HasPostgresEnum(modelBuilder, "action_enum", new[] { "1", "1 hour", "1 minute", "1-2", "1-3", "10 minutes", "2", "2-3", "2/2 rounds", "3", "30 minutes", "5 minutes", "free", "free/1", "other", "passive", "reaction", "reaction/1", "reaction/2", "reaction/3", "unknown" });
|
||||
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" });
|
||||
@@ -134,13 +134,19 @@ namespace Pf2eModel.Migrations
|
||||
.HasColumnType("boolean")
|
||||
.HasColumnName("is_checked")
|
||||
.HasColumnOrder(9)
|
||||
.HasComment("Флаг, указывающий, что сущность был проверен и не требует автоматической перезаписи");
|
||||
.HasComment("Проверено?");
|
||||
|
||||
b.Property<bool?>("IsLegacy")
|
||||
.HasColumnType("boolean")
|
||||
.HasColumnName("is_legacy")
|
||||
.HasColumnOrder(10)
|
||||
.HasComment("Устаревшая?");
|
||||
|
||||
b.Property<bool?>("IsTranslated")
|
||||
.HasColumnType("boolean")
|
||||
.HasColumnName("is_translated")
|
||||
.HasColumnOrder(8)
|
||||
.HasComment("Флаг, указывающий, что у сущности существует перевод");
|
||||
.HasComment("Есть перевод?");
|
||||
|
||||
b.Property<string>("Name")
|
||||
.IsRequired()
|
||||
@@ -890,11 +896,11 @@ namespace Pf2eModel.Migrations
|
||||
.HasColumnOrder(2)
|
||||
.HasComment("Количество очков здоровья");
|
||||
|
||||
b.Property<bool>("Spellcasting")
|
||||
.HasColumnType("boolean")
|
||||
b.Property<int>("Spellcasting")
|
||||
.HasColumnType("integer")
|
||||
.HasColumnName("spellcasting")
|
||||
.HasColumnOrder(3)
|
||||
.HasComment("Заклинатель?");
|
||||
.HasComment("Тип заклинательства");
|
||||
|
||||
b.Property<SpellTradition?>("Tradition")
|
||||
.HasColumnType("spell_tradition")
|
||||
@@ -14,7 +14,7 @@ namespace Pf2eModel.Migrations
|
||||
protected override void Up(MigrationBuilder migrationBuilder)
|
||||
{
|
||||
migrationBuilder.AlterDatabase()
|
||||
.Annotation("Npgsql:Enum:action_category", "archetype,army_tactic,army_war_action,class-feat,class-feature,defensive,familiar,interaction,kingdom_activity,kingdom_feat,kingdom_feature,offensive,skill-action,unknown")
|
||||
.Annotation("Npgsql:Enum:action_category", "archetype,army_tactic,army_war_action,class-feat,class-feature,familiar,kingdom_activity,kingdom_feat,kingdom_feature,skill-action,unknown")
|
||||
.Annotation("Npgsql:Enum:action_enum", "1,1 hour,1 minute,1-2,1-3,10 minutes,2,2-3,2/2 rounds,3,30 minutes,5 minutes,free,free/1,other,passive,reaction,reaction/1,reaction/2,reaction/3,unknown")
|
||||
.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")
|
||||
@@ -49,8 +49,9 @@ namespace Pf2eModel.Migrations
|
||||
img = table.Column<string>(type: "character varying(255)", maxLength: 255, nullable: false, comment: "Изображение объекта"),
|
||||
description = table.Column<string>(type: "text", nullable: false, comment: "Текстовое описание сущности"),
|
||||
rarity = table.Column<EntityRarity>(type: "entity_rarity", nullable: false, comment: "Редкость сущности"),
|
||||
is_translated = table.Column<bool>(type: "boolean", nullable: true, comment: "Флаг, указывающий, что у сущности существует перевод"),
|
||||
is_checked = table.Column<bool>(type: "boolean", nullable: true, comment: "Флаг, указывающий, что сущность был проверен и не требует автоматической перезаписи")
|
||||
is_translated = table.Column<bool>(type: "boolean", nullable: true, comment: "Есть перевод?"),
|
||||
is_checked = table.Column<bool>(type: "boolean", nullable: true, comment: "Проверено?"),
|
||||
is_legacy = table.Column<bool>(type: "boolean", nullable: true, comment: "Устаревшая?")
|
||||
},
|
||||
constraints: table =>
|
||||
{
|
||||
@@ -194,7 +195,7 @@ namespace Pf2eModel.Migrations
|
||||
{
|
||||
id = table.Column<int>(type: "integer", nullable: false, comment: "Идентификатор"),
|
||||
hp = table.Column<int>(type: "integer", nullable: false, comment: "Количество очков здоровья"),
|
||||
spellcasting = table.Column<bool>(type: "boolean", nullable: false, comment: "Заклинатель?"),
|
||||
spellcasting = table.Column<int>(type: "integer", nullable: false, comment: "Тип заклинательства"),
|
||||
tradition = table.Column<SpellTradition>(type: "spell_tradition", nullable: true, comment: "Традиция заклинаний"),
|
||||
additional_trained_skills = table.Column<int>(type: "integer", nullable: false, comment: "Дополнительные навыки")
|
||||
},
|
||||
@@ -21,7 +21,7 @@ namespace Pf2eModel.Migrations
|
||||
.HasAnnotation("ProductVersion", "9.0.4")
|
||||
.HasAnnotation("Relational:MaxIdentifierLength", 63);
|
||||
|
||||
NpgsqlModelBuilderExtensions.HasPostgresEnum(modelBuilder, "action_category", new[] { "archetype", "army_tactic", "army_war_action", "class-feat", "class-feature", "defensive", "familiar", "interaction", "kingdom_activity", "kingdom_feat", "kingdom_feature", "offensive", "skill-action", "unknown" });
|
||||
NpgsqlModelBuilderExtensions.HasPostgresEnum(modelBuilder, "action_category", new[] { "archetype", "army_tactic", "army_war_action", "class-feat", "class-feature", "familiar", "kingdom_activity", "kingdom_feat", "kingdom_feature", "skill-action", "unknown" });
|
||||
NpgsqlModelBuilderExtensions.HasPostgresEnum(modelBuilder, "action_enum", new[] { "1", "1 hour", "1 minute", "1-2", "1-3", "10 minutes", "2", "2-3", "2/2 rounds", "3", "30 minutes", "5 minutes", "free", "free/1", "other", "passive", "reaction", "reaction/1", "reaction/2", "reaction/3", "unknown" });
|
||||
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" });
|
||||
@@ -131,13 +131,19 @@ namespace Pf2eModel.Migrations
|
||||
.HasColumnType("boolean")
|
||||
.HasColumnName("is_checked")
|
||||
.HasColumnOrder(9)
|
||||
.HasComment("Флаг, указывающий, что сущность был проверен и не требует автоматической перезаписи");
|
||||
.HasComment("Проверено?");
|
||||
|
||||
b.Property<bool?>("IsLegacy")
|
||||
.HasColumnType("boolean")
|
||||
.HasColumnName("is_legacy")
|
||||
.HasColumnOrder(10)
|
||||
.HasComment("Устаревшая?");
|
||||
|
||||
b.Property<bool?>("IsTranslated")
|
||||
.HasColumnType("boolean")
|
||||
.HasColumnName("is_translated")
|
||||
.HasColumnOrder(8)
|
||||
.HasComment("Флаг, указывающий, что у сущности существует перевод");
|
||||
.HasComment("Есть перевод?");
|
||||
|
||||
b.Property<string>("Name")
|
||||
.IsRequired()
|
||||
@@ -887,11 +893,11 @@ namespace Pf2eModel.Migrations
|
||||
.HasColumnOrder(2)
|
||||
.HasComment("Количество очков здоровья");
|
||||
|
||||
b.Property<bool>("Spellcasting")
|
||||
.HasColumnType("boolean")
|
||||
b.Property<int>("Spellcasting")
|
||||
.HasColumnType("integer")
|
||||
.HasColumnName("spellcasting")
|
||||
.HasColumnOrder(3)
|
||||
.HasComment("Заклинатель?");
|
||||
.HasComment("Тип заклинательства");
|
||||
|
||||
b.Property<SpellTradition?>("Tradition")
|
||||
.HasColumnType("spell_tradition")
|
||||
|
||||
@@ -0,0 +1,27 @@
|
||||
using NpgsqlTypes;
|
||||
|
||||
namespace Pf2eModel.Model.Enum;
|
||||
|
||||
/// <summary>
|
||||
/// Перечисление типа применения заклинаний.
|
||||
/// </summary>
|
||||
public enum SpellcastingType
|
||||
{
|
||||
/// <summary>
|
||||
/// Не применяет заклинания.
|
||||
/// </summary>
|
||||
[PgName("none")]
|
||||
None,
|
||||
|
||||
/// <summary>
|
||||
/// Заготавливаемое заклинательство.
|
||||
/// </summary>
|
||||
[PgName("prepared")]
|
||||
Prepared,
|
||||
|
||||
/// <summary>
|
||||
/// Спонтанное заклинательство.
|
||||
/// </summary>
|
||||
[PgName("spontaneous")]
|
||||
Spontaneous,
|
||||
}
|
||||
@@ -31,11 +31,11 @@ public class Class : IEntity
|
||||
public int Hp { get; set; }
|
||||
|
||||
/// <summary>
|
||||
/// Флаг, указывающий на то, что класс является заклинательным.
|
||||
/// Указание на тип заклинательства.
|
||||
/// </summary>
|
||||
[Column(Order = 3)]
|
||||
[Comment("Заклинатель?")]
|
||||
public bool Spellcasting { get; set; }
|
||||
[Comment("Тип заклинательства")]
|
||||
public SpellcastingType Spellcasting { get; set; } = SpellcastingType.None;
|
||||
|
||||
/// <summary>
|
||||
/// Традиция заклинаний класса.
|
||||
|
||||
Reference in New Issue
Block a user