Compare commits

...
5 Commits
85 changed files with 2019 additions and 156 deletions
@@ -20,6 +20,8 @@ Derived
↳ [ArchetypeProcessor](ArchetypeProcessor.md 'Pf2eDataScrapper\.Importers\.Implementations\.Aonprd\.Processors\.Types\.ArchetypeProcessor')
↳ [BackgroundProcessor](BackgroundProcessor.md 'Pf2eDataScrapper\.Importers\.Implementations\.Aonprd\.Processors\.Types\.BackgroundProcessor')
↳ [ClassProcessor](ClassProcessor.md 'Pf2eDataScrapper\.Importers\.Implementations\.Aonprd\.Processors\.Types\.ClassProcessor')
↳ [DeityProcessor](DeityProcessor.md 'Pf2eDataScrapper\.Importers\.Implementations\.Aonprd\.Processors\.Types\.DeityProcessor')
↳ [DomainProcessor](DomainProcessor.md 'Pf2eDataScrapper\.Importers\.Implementations\.Aonprd\.Processors\.Types\.DomainProcessor')
↳ [FeatProcessor](FeatProcessor.md 'Pf2eDataScrapper\.Importers\.Implementations\.Aonprd\.Processors\.Types\.FeatProcessor')
↳ [HeritageProcessor](HeritageProcessor.md 'Pf2eDataScrapper\.Importers\.Implementations\.Aonprd\.Processors\.Types\.HeritageProcessor')
↳ [LanguageProcessor](LanguageProcessor.md 'Pf2eDataScrapper\.Importers\.Implementations\.Aonprd\.Processors\.Types\.LanguageProcessor')
@@ -0,0 +1,13 @@
#### [Pf2eDataScrapper](index.md 'index')
### [Pf2eDataScrapper\.Importers\.Implementations\.Aonprd\.Helpers](Pf2eDataScrapper.Importers.Implementations.Aonprd.Helpers.md 'Pf2eDataScrapper\.Importers\.Implementations\.Aonprd\.Helpers').[AonprdBuilderGlobals](AonprdBuilderGlobals.md 'Pf2eDataScrapper\.Importers\.Implementations\.Aonprd\.Helpers\.AonprdBuilderGlobals')
## AonprdBuilderGlobals\.Ignore Property
Список идентификаторов сущностей, которые нужно игнорировать при обработке\.
```csharp
public System.Collections.Generic.List<string> Ignore { get; }
```
#### Property Value
[System\.Collections\.Generic\.List&lt;](https://docs.microsoft.com/en-us/dotnet/api/System.Collections.Generic.List-1 'System\.Collections\.Generic\.List\`1')[System\.String](https://docs.microsoft.com/en-us/dotnet/api/System.String 'System\.String')[&gt;](https://docs.microsoft.com/en-us/dotnet/api/System.Collections.Generic.List-1 'System\.Collections\.Generic\.List\`1')
@@ -18,6 +18,7 @@ Inheritance [System\.Object](https://docs.microsoft.com/en-us/dotnet/api/System.
| Properties | |
| :--- | :--- |
| [AonprdTarget](AonprdBuilderGlobals.AonprdTarget.md 'Pf2eDataScrapper\.Importers\.Implementations\.Aonprd\.Helpers\.AonprdBuilderGlobals\.AonprdTarget') | Цель внешних ссылок Архивов Нефисов\. |
| [Ignore](AonprdBuilderGlobals.Ignore.md 'Pf2eDataScrapper\.Importers\.Implementations\.Aonprd\.Helpers\.AonprdBuilderGlobals\.Ignore') | Список идентификаторов сущностей, которые нужно игнорировать при обработке\. |
| [LegacyRemasterExtra](AonprdBuilderGlobals.LegacyRemasterExtra.md 'Pf2eDataScrapper\.Importers\.Implementations\.Aonprd\.Helpers\.AonprdBuilderGlobals\.LegacyRemasterExtra') | Словарь допольнительных проверок связей\. Ключ \- устаревшая сущность, значение \- обновлённая\. |
| [MergeSources](AonprdBuilderGlobals.MergeSources.md 'Pf2eDataScrapper\.Importers\.Implementations\.Aonprd\.Helpers\.AonprdBuilderGlobals\.MergeSources') | Словарь сущностей, которые нужно слить с другой/другими\. Ключ \- пропускаемая сущность\. Значение \- целевая сущность\. |
| [SlugSuffixes](AonprdBuilderGlobals.SlugSuffixes.md 'Pf2eDataScrapper\.Importers\.Implementations\.Aonprd\.Helpers\.AonprdBuilderGlobals\.SlugSuffixes') | Словарей суффиксов для сущностей |
@@ -0,0 +1,10 @@
#### [Pf2eDataScrapper](index.md 'index')
### [Pf2eDataScrapper\.Importers\.Implementations\.Aonprd\.Processors\.Types](Pf2eDataScrapper.Importers.Implementations.Aonprd.Processors.Types.md 'Pf2eDataScrapper\.Importers\.Implementations\.Aonprd\.Processors\.Types').[DeityProcessor](DeityProcessor.md 'Pf2eDataScrapper\.Importers\.Implementations\.Aonprd\.Processors\.Types\.DeityProcessor')
## DeityProcessor\.Add\(\) Method
Добавление основной сущности в контекст базы данных\.
```csharp
protected override void Add();
```
@@ -0,0 +1,10 @@
#### [Pf2eDataScrapper](index.md 'index')
### [Pf2eDataScrapper\.Importers\.Implementations\.Aonprd\.Processors\.Types](Pf2eDataScrapper.Importers.Implementations.Aonprd.Processors.Types.md 'Pf2eDataScrapper\.Importers\.Implementations\.Aonprd\.Processors\.Types').[DeityProcessor](DeityProcessor.md 'Pf2eDataScrapper\.Importers\.Implementations\.Aonprd\.Processors\.Types\.DeityProcessor')
## DeityProcessor\.AddTraits\(\) Method
Генерация списка признаков сущности\.
```csharp
protected override void AddTraits();
```
@@ -0,0 +1,28 @@
#### [Pf2eDataScrapper](index.md 'index')
### [Pf2eDataScrapper\.Importers\.Implementations\.Aonprd\.Processors\.Types](Pf2eDataScrapper.Importers.Implementations.Aonprd.Processors.Types.md 'Pf2eDataScrapper\.Importers\.Implementations\.Aonprd\.Processors\.Types').[DeityProcessor](DeityProcessor.md 'Pf2eDataScrapper\.Importers\.Implementations\.Aonprd\.Processors\.Types\.DeityProcessor')
## DeityProcessor\.MarkdownLinkRegex\(\) Method
```csharp
private static System.Text.RegularExpressions.Regex MarkdownLinkRegex();
```
#### Returns
[System\.Text\.RegularExpressions\.Regex](https://docs.microsoft.com/en-us/dotnet/api/System.Text.RegularExpressions.Regex 'System\.Text\.RegularExpressions\.Regex')
### Remarks
Pattern:<br/>
```csharp
\\[([^\\]]+)\\]\\([^)]+\\)
```<br/>
Explanation:<br/>
```csharp
○ Match '['.<br/>
○ 1st capture group.<br/>
○ Match a character other than ']' atomically at least once.<br/>
○ Match the string "](".<br/>
○ Match a character other than ')' atomically at least once.<br/>
○ Match ')'.<br/>
```
@@ -0,0 +1,13 @@
#### [Pf2eDataScrapper](index.md 'index')
### [Pf2eDataScrapper\.Importers\.Implementations\.Aonprd\.Processors\.Types](Pf2eDataScrapper.Importers.Implementations.Aonprd.Processors.Types.md 'Pf2eDataScrapper\.Importers\.Implementations\.Aonprd\.Processors\.Types').[DeityProcessor](DeityProcessor.md 'Pf2eDataScrapper\.Importers\.Implementations\.Aonprd\.Processors\.Types\.DeityProcessor')
## DeityProcessor\.Object Property
Основная сущность\.
```csharp
public virtual Pf2eModel.Model.Structure.Deity Object { get; }
```
#### Property Value
[Pf2eModel\.Model\.Structure\.Deity](https://docs.microsoft.com/en-us/dotnet/api/Pf2eModel.Model.Structure.Deity 'Pf2eModel\.Model\.Structure\.Deity')
@@ -0,0 +1,12 @@
#### [Pf2eDataScrapper](index.md 'index')
### [Pf2eDataScrapper\.Importers\.Implementations\.Aonprd\.Processors\.Types](Pf2eDataScrapper.Importers.Implementations.Aonprd.Processors.Types.md 'Pf2eDataScrapper\.Importers\.Implementations\.Aonprd\.Processors\.Types').[DeityProcessor](DeityProcessor.md 'Pf2eDataScrapper\.Importers\.Implementations\.Aonprd\.Processors\.Types\.DeityProcessor')
## DeityProcessor\.Process\(\) Method
Основной метод обработки данных\.
```csharp
public override void Process();
```
Implements [Process\(\)](IProcessor.Process().md 'Pf2eDataScrapper\.Processors\.Definitions\.IProcessor\.Process\(\)')
@@ -0,0 +1,10 @@
#### [Pf2eDataScrapper](index.md 'index')
### [Pf2eDataScrapper\.Importers\.Implementations\.Aonprd\.Processors\.Types](Pf2eDataScrapper.Importers.Implementations.Aonprd.Processors.Types.md 'Pf2eDataScrapper\.Importers\.Implementations\.Aonprd\.Processors\.Types').[DeityProcessor](DeityProcessor.md 'Pf2eDataScrapper\.Importers\.Implementations\.Aonprd\.Processors\.Types\.DeityProcessor')
## DeityProcessor\.ProcessAttributes\(\) Method
Обработка атрибутов божества\.
```csharp
private void ProcessAttributes();
```
@@ -0,0 +1,23 @@
#### [Pf2eDataScrapper](index.md 'index')
### [Pf2eDataScrapper\.Importers\.Implementations\.Aonprd\.Processors\.Types](Pf2eDataScrapper.Importers.Implementations.Aonprd.Processors.Types.md 'Pf2eDataScrapper\.Importers\.Implementations\.Aonprd\.Processors\.Types').[DeityProcessor](DeityProcessor.md 'Pf2eDataScrapper\.Importers\.Implementations\.Aonprd\.Processors\.Types\.DeityProcessor')
## DeityProcessor\.ProcessDomainMarkdown\(string, bool\) Method
Обработка markdown\-строки с доменами\.
```csharp
private void ProcessDomainMarkdown(string markdown, bool isPrimary);
```
#### Parameters
<a name='Pf2eDataScrapper.Importers.Implementations.Aonprd.Processors.Types.DeityProcessor.ProcessDomainMarkdown(string,bool).markdown'></a>
`markdown` [System\.String](https://docs.microsoft.com/en-us/dotnet/api/System.String 'System\.String')
Markdown\-строка с доменами\.
<a name='Pf2eDataScrapper.Importers.Implementations.Aonprd.Processors.Types.DeityProcessor.ProcessDomainMarkdown(string,bool).isPrimary'></a>
`isPrimary` [System\.Boolean](https://docs.microsoft.com/en-us/dotnet/api/System.Boolean 'System\.Boolean')
Флаг, указывающий, являются ли домены основными\.
@@ -0,0 +1,10 @@
#### [Pf2eDataScrapper](index.md 'index')
### [Pf2eDataScrapper\.Importers\.Implementations\.Aonprd\.Processors\.Types](Pf2eDataScrapper.Importers.Implementations.Aonprd.Processors.Types.md 'Pf2eDataScrapper\.Importers\.Implementations\.Aonprd\.Processors\.Types').[DeityProcessor](DeityProcessor.md 'Pf2eDataScrapper\.Importers\.Implementations\.Aonprd\.Processors\.Types\.DeityProcessor')
## DeityProcessor\.ProcessDomains\(\) Method
Обработка доменов божества\.
```csharp
private void ProcessDomains();
```
@@ -0,0 +1,10 @@
#### [Pf2eDataScrapper](index.md 'index')
### [Pf2eDataScrapper\.Importers\.Implementations\.Aonprd\.Processors\.Types](Pf2eDataScrapper.Importers.Implementations.Aonprd.Processors.Types.md 'Pf2eDataScrapper\.Importers\.Implementations\.Aonprd\.Processors\.Types').[DeityProcessor](DeityProcessor.md 'Pf2eDataScrapper\.Importers\.Implementations\.Aonprd\.Processors\.Types\.DeityProcessor')
## DeityProcessor\.ProcessFonts\(\) Method
Обработка божественной силы\.
```csharp
private void ProcessFonts();
```
@@ -0,0 +1,10 @@
#### [Pf2eDataScrapper](index.md 'index')
### [Pf2eDataScrapper\.Importers\.Implementations\.Aonprd\.Processors\.Types](Pf2eDataScrapper.Importers.Implementations.Aonprd.Processors.Types.md 'Pf2eDataScrapper\.Importers\.Implementations\.Aonprd\.Processors\.Types').[DeityProcessor](DeityProcessor.md 'Pf2eDataScrapper\.Importers\.Implementations\.Aonprd\.Processors\.Types\.DeityProcessor')
## DeityProcessor\.ProcessSkills\(\) Method
Обработка навыков божества\.
```csharp
private void ProcessSkills();
```
@@ -0,0 +1,10 @@
#### [Pf2eDataScrapper](index.md 'index')
### [Pf2eDataScrapper\.Importers\.Implementations\.Aonprd\.Processors\.Types](Pf2eDataScrapper.Importers.Implementations.Aonprd.Processors.Types.md 'Pf2eDataScrapper\.Importers\.Implementations\.Aonprd\.Processors\.Types').[DeityProcessor](DeityProcessor.md 'Pf2eDataScrapper\.Importers\.Implementations\.Aonprd\.Processors\.Types\.DeityProcessor')
## DeityProcessor\.ProcessSpells\(\) Method
Обработка заклинаний божества\.
```csharp
private void ProcessSpells();
```
@@ -0,0 +1,10 @@
#### [Pf2eDataScrapper](index.md 'index')
### [Pf2eDataScrapper\.Importers\.Implementations\.Aonprd\.Processors\.Types](Pf2eDataScrapper.Importers.Implementations.Aonprd.Processors.Types.md 'Pf2eDataScrapper\.Importers\.Implementations\.Aonprd\.Processors\.Types').[DeityProcessor](DeityProcessor.md 'Pf2eDataScrapper\.Importers\.Implementations\.Aonprd\.Processors\.Types\.DeityProcessor')
## DeityProcessor\.ProcessTexts\(\) Method
Обработка текстов описания божества\.
```csharp
private void ProcessTexts();
```
@@ -0,0 +1,10 @@
#### [Pf2eDataScrapper](index.md 'index')
### [Pf2eDataScrapper\.Importers\.Implementations\.Aonprd\.Processors\.Types](Pf2eDataScrapper.Importers.Implementations.Aonprd.Processors.Types.md 'Pf2eDataScrapper\.Importers\.Implementations\.Aonprd\.Processors\.Types').[DeityProcessor](DeityProcessor.md 'Pf2eDataScrapper\.Importers\.Implementations\.Aonprd\.Processors\.Types\.DeityProcessor')
## DeityProcessor\.ProcessWeapons\(\) Method
Обработка оружия божества\.
```csharp
private void ProcessWeapons();
```
@@ -0,0 +1,13 @@
#### [Pf2eDataScrapper](index.md 'index')
### [Pf2eDataScrapper\.Importers\.Implementations\.Aonprd\.Processors\.Types](Pf2eDataScrapper.Importers.Implementations.Aonprd.Processors.Types.md 'Pf2eDataScrapper\.Importers\.Implementations\.Aonprd\.Processors\.Types').[DeityProcessor](DeityProcessor.md 'Pf2eDataScrapper\.Importers\.Implementations\.Aonprd\.Processors\.Types\.DeityProcessor')
## DeityProcessor\.Type Property
Тип сущности\.
```csharp
public override Pf2eModel.Model.Enum.EntityType Type { get; }
```
#### Property Value
[Pf2eModel\.Model\.Enum\.EntityType](https://docs.microsoft.com/en-us/dotnet/api/Pf2eModel.Model.Enum.EntityType 'Pf2eModel\.Model\.Enum\.EntityType')
@@ -0,0 +1,30 @@
#### [Pf2eDataScrapper](index.md 'index')
### [Pf2eDataScrapper\.Importers\.Implementations\.Aonprd\.Processors\.Types](Pf2eDataScrapper.Importers.Implementations.Aonprd.Processors.Types.md 'Pf2eDataScrapper\.Importers\.Implementations\.Aonprd\.Processors\.Types')
## DeityProcessor Class
```csharp
internal class DeityProcessor : Pf2eDataScrapper.Importers.Implementations.Aonprd.Processors.AbstractEntityProcessor
```
Inheritance [System\.Object](https://docs.microsoft.com/en-us/dotnet/api/System.Object 'System\.Object') &#129106; [AbstractInputProcessor](AbstractInputProcessor.md 'Pf2eDataScrapper\.Processors\.Definitions\.AbstractInputProcessor') &#129106; [AbstractEntityProcessor](AbstractEntityProcessor.md 'Pf2eDataScrapper\.Importers\.Implementations\.Aonprd\.Processors\.AbstractEntityProcessor') &#129106; DeityProcessor
| Properties | |
| :--- | :--- |
| [Object](DeityProcessor.Object.md 'Pf2eDataScrapper\.Importers\.Implementations\.Aonprd\.Processors\.Types\.DeityProcessor\.Object') | Основная сущность\. |
| [Type](DeityProcessor.Type.md 'Pf2eDataScrapper\.Importers\.Implementations\.Aonprd\.Processors\.Types\.DeityProcessor\.Type') | Тип сущности\. |
| Methods | |
| :--- | :--- |
| [Add\(\)](DeityProcessor.Add().md 'Pf2eDataScrapper\.Importers\.Implementations\.Aonprd\.Processors\.Types\.DeityProcessor\.Add\(\)') | Добавление основной сущности в контекст базы данных\. |
| [AddTraits\(\)](DeityProcessor.AddTraits().md 'Pf2eDataScrapper\.Importers\.Implementations\.Aonprd\.Processors\.Types\.DeityProcessor\.AddTraits\(\)') | Генерация списка признаков сущности\. |
| [MarkdownLinkRegex\(\)](DeityProcessor.MarkdownLinkRegex().md 'Pf2eDataScrapper\.Importers\.Implementations\.Aonprd\.Processors\.Types\.DeityProcessor\.MarkdownLinkRegex\(\)') | |
| [Process\(\)](DeityProcessor.Process().md 'Pf2eDataScrapper\.Importers\.Implementations\.Aonprd\.Processors\.Types\.DeityProcessor\.Process\(\)') | Основной метод обработки данных\. |
| [ProcessAttributes\(\)](DeityProcessor.ProcessAttributes().md 'Pf2eDataScrapper\.Importers\.Implementations\.Aonprd\.Processors\.Types\.DeityProcessor\.ProcessAttributes\(\)') | Обработка атрибутов божества\. |
| [ProcessDomainMarkdown\(string, bool\)](DeityProcessor.ProcessDomainMarkdown(string,bool).md 'Pf2eDataScrapper\.Importers\.Implementations\.Aonprd\.Processors\.Types\.DeityProcessor\.ProcessDomainMarkdown\(string, bool\)') | Обработка markdown\-строки с доменами\. |
| [ProcessDomains\(\)](DeityProcessor.ProcessDomains().md 'Pf2eDataScrapper\.Importers\.Implementations\.Aonprd\.Processors\.Types\.DeityProcessor\.ProcessDomains\(\)') | Обработка доменов божества\. |
| [ProcessFonts\(\)](DeityProcessor.ProcessFonts().md 'Pf2eDataScrapper\.Importers\.Implementations\.Aonprd\.Processors\.Types\.DeityProcessor\.ProcessFonts\(\)') | Обработка божественной силы\. |
| [ProcessSkills\(\)](DeityProcessor.ProcessSkills().md 'Pf2eDataScrapper\.Importers\.Implementations\.Aonprd\.Processors\.Types\.DeityProcessor\.ProcessSkills\(\)') | Обработка навыков божества\. |
| [ProcessSpells\(\)](DeityProcessor.ProcessSpells().md 'Pf2eDataScrapper\.Importers\.Implementations\.Aonprd\.Processors\.Types\.DeityProcessor\.ProcessSpells\(\)') | Обработка заклинаний божества\. |
| [ProcessTexts\(\)](DeityProcessor.ProcessTexts().md 'Pf2eDataScrapper\.Importers\.Implementations\.Aonprd\.Processors\.Types\.DeityProcessor\.ProcessTexts\(\)') | Обработка текстов описания божества\. |
| [ProcessWeapons\(\)](DeityProcessor.ProcessWeapons().md 'Pf2eDataScrapper\.Importers\.Implementations\.Aonprd\.Processors\.Types\.DeityProcessor\.ProcessWeapons\(\)') | Обработка оружия божества\. |
@@ -0,0 +1,10 @@
#### [Pf2eDataScrapper](index.md 'index')
### [Pf2eDataScrapper\.Importers\.Implementations\.Aonprd\.Processors\.Types](Pf2eDataScrapper.Importers.Implementations.Aonprd.Processors.Types.md 'Pf2eDataScrapper\.Importers\.Implementations\.Aonprd\.Processors\.Types').[DomainProcessor](DomainProcessor.md 'Pf2eDataScrapper\.Importers\.Implementations\.Aonprd\.Processors\.Types\.DomainProcessor')
## DomainProcessor\.Add\(\) Method
Добавление основной сущности в контекст базы данных\.
```csharp
protected override void Add();
```
@@ -0,0 +1,21 @@
#### [Pf2eDataScrapper](index.md 'index')
### [Pf2eDataScrapper\.Importers\.Implementations\.Aonprd\.Processors\.Types](Pf2eDataScrapper.Importers.Implementations.Aonprd.Processors.Types.md 'Pf2eDataScrapper\.Importers\.Implementations\.Aonprd\.Processors\.Types').[DomainProcessor](DomainProcessor.md 'Pf2eDataScrapper\.Importers\.Implementations\.Aonprd\.Processors\.Types\.DomainProcessor')
## DomainProcessor\.GetSpellIdFromMarkdown\(string\) Method
Получение идентификатора заклинания из markdown\-строки\.
```csharp
private int GetSpellIdFromMarkdown(string markdown);
```
#### Parameters
<a name='Pf2eDataScrapper.Importers.Implementations.Aonprd.Processors.Types.DomainProcessor.GetSpellIdFromMarkdown(string).markdown'></a>
`markdown` [System\.String](https://docs.microsoft.com/en-us/dotnet/api/System.String 'System\.String')
Markdown\-строка с информацией о заклинании\.
#### Returns
[System\.Int32](https://docs.microsoft.com/en-us/dotnet/api/System.Int32 'System\.Int32')
Идентификатор заклинания\.
@@ -0,0 +1,28 @@
#### [Pf2eDataScrapper](index.md 'index')
### [Pf2eDataScrapper\.Importers\.Implementations\.Aonprd\.Processors\.Types](Pf2eDataScrapper.Importers.Implementations.Aonprd.Processors.Types.md 'Pf2eDataScrapper\.Importers\.Implementations\.Aonprd\.Processors\.Types').[DomainProcessor](DomainProcessor.md 'Pf2eDataScrapper\.Importers\.Implementations\.Aonprd\.Processors\.Types\.DomainProcessor')
## DomainProcessor\.MarkdownLinkRegex\(\) Method
```csharp
private static System.Text.RegularExpressions.Regex MarkdownLinkRegex();
```
#### Returns
[System\.Text\.RegularExpressions\.Regex](https://docs.microsoft.com/en-us/dotnet/api/System.Text.RegularExpressions.Regex 'System\.Text\.RegularExpressions\.Regex')
### Remarks
Pattern:<br/>
```csharp
\\[([^\\]]+)\\]\\([^)]+\\)
```<br/>
Explanation:<br/>
```csharp
○ Match '['.<br/>
○ 1st capture group.<br/>
○ Match a character other than ']' atomically at least once.<br/>
○ Match the string "](".<br/>
○ Match a character other than ')' atomically at least once.<br/>
○ Match ')'.<br/>
```
@@ -0,0 +1,13 @@
#### [Pf2eDataScrapper](index.md 'index')
### [Pf2eDataScrapper\.Importers\.Implementations\.Aonprd\.Processors\.Types](Pf2eDataScrapper.Importers.Implementations.Aonprd.Processors.Types.md 'Pf2eDataScrapper\.Importers\.Implementations\.Aonprd\.Processors\.Types').[DomainProcessor](DomainProcessor.md 'Pf2eDataScrapper\.Importers\.Implementations\.Aonprd\.Processors\.Types\.DomainProcessor')
## DomainProcessor\.Object Property
Основная сущность\.
```csharp
public virtual Pf2eModel.Model.Structure.Domain Object { get; }
```
#### Property Value
[Pf2eModel\.Model\.Structure\.Domain](https://docs.microsoft.com/en-us/dotnet/api/Pf2eModel.Model.Structure.Domain 'Pf2eModel\.Model\.Structure\.Domain')
@@ -0,0 +1,12 @@
#### [Pf2eDataScrapper](index.md 'index')
### [Pf2eDataScrapper\.Importers\.Implementations\.Aonprd\.Processors\.Types](Pf2eDataScrapper.Importers.Implementations.Aonprd.Processors.Types.md 'Pf2eDataScrapper\.Importers\.Implementations\.Aonprd\.Processors\.Types').[DomainProcessor](DomainProcessor.md 'Pf2eDataScrapper\.Importers\.Implementations\.Aonprd\.Processors\.Types\.DomainProcessor')
## DomainProcessor\.Process\(\) Method
Основной метод обработки данных\.
```csharp
public override void Process();
```
Implements [Process\(\)](IProcessor.Process().md 'Pf2eDataScrapper\.Processors\.Definitions\.IProcessor\.Process\(\)')
@@ -0,0 +1,10 @@
#### [Pf2eDataScrapper](index.md 'index')
### [Pf2eDataScrapper\.Importers\.Implementations\.Aonprd\.Processors\.Types](Pf2eDataScrapper.Importers.Implementations.Aonprd.Processors.Types.md 'Pf2eDataScrapper\.Importers\.Implementations\.Aonprd\.Processors\.Types').[DomainProcessor](DomainProcessor.md 'Pf2eDataScrapper\.Importers\.Implementations\.Aonprd\.Processors\.Types\.DomainProcessor')
## DomainProcessor\.ProcessDomainSpells\(\) Method
Обработка заклинаний, связанных с доменом\.
```csharp
private void ProcessDomainSpells();
```
@@ -0,0 +1,13 @@
#### [Pf2eDataScrapper](index.md 'index')
### [Pf2eDataScrapper\.Importers\.Implementations\.Aonprd\.Processors\.Types](Pf2eDataScrapper.Importers.Implementations.Aonprd.Processors.Types.md 'Pf2eDataScrapper\.Importers\.Implementations\.Aonprd\.Processors\.Types').[DomainProcessor](DomainProcessor.md 'Pf2eDataScrapper\.Importers\.Implementations\.Aonprd\.Processors\.Types\.DomainProcessor')
## DomainProcessor\.Type Property
Тип сущности\.
```csharp
public override Pf2eModel.Model.Enum.EntityType Type { get; }
```
#### Property Value
[Pf2eModel\.Model\.Enum\.EntityType](https://docs.microsoft.com/en-us/dotnet/api/Pf2eModel.Model.Enum.EntityType 'Pf2eModel\.Model\.Enum\.EntityType')
@@ -0,0 +1,23 @@
#### [Pf2eDataScrapper](index.md 'index')
### [Pf2eDataScrapper\.Importers\.Implementations\.Aonprd\.Processors\.Types](Pf2eDataScrapper.Importers.Implementations.Aonprd.Processors.Types.md 'Pf2eDataScrapper\.Importers\.Implementations\.Aonprd\.Processors\.Types')
## DomainProcessor Class
```csharp
internal class DomainProcessor : Pf2eDataScrapper.Importers.Implementations.Aonprd.Processors.AbstractEntityProcessor
```
Inheritance [System\.Object](https://docs.microsoft.com/en-us/dotnet/api/System.Object 'System\.Object') &#129106; [AbstractInputProcessor](AbstractInputProcessor.md 'Pf2eDataScrapper\.Processors\.Definitions\.AbstractInputProcessor') &#129106; [AbstractEntityProcessor](AbstractEntityProcessor.md 'Pf2eDataScrapper\.Importers\.Implementations\.Aonprd\.Processors\.AbstractEntityProcessor') &#129106; DomainProcessor
| Properties | |
| :--- | :--- |
| [Object](DomainProcessor.Object.md 'Pf2eDataScrapper\.Importers\.Implementations\.Aonprd\.Processors\.Types\.DomainProcessor\.Object') | Основная сущность\. |
| [Type](DomainProcessor.Type.md 'Pf2eDataScrapper\.Importers\.Implementations\.Aonprd\.Processors\.Types\.DomainProcessor\.Type') | Тип сущности\. |
| Methods | |
| :--- | :--- |
| [Add\(\)](DomainProcessor.Add().md 'Pf2eDataScrapper\.Importers\.Implementations\.Aonprd\.Processors\.Types\.DomainProcessor\.Add\(\)') | Добавление основной сущности в контекст базы данных\. |
| [GetSpellIdFromMarkdown\(string\)](DomainProcessor.GetSpellIdFromMarkdown(string).md 'Pf2eDataScrapper\.Importers\.Implementations\.Aonprd\.Processors\.Types\.DomainProcessor\.GetSpellIdFromMarkdown\(string\)') | Получение идентификатора заклинания из markdown\-строки\. |
| [MarkdownLinkRegex\(\)](DomainProcessor.MarkdownLinkRegex().md 'Pf2eDataScrapper\.Importers\.Implementations\.Aonprd\.Processors\.Types\.DomainProcessor\.MarkdownLinkRegex\(\)') | |
| [Process\(\)](DomainProcessor.Process().md 'Pf2eDataScrapper\.Importers\.Implementations\.Aonprd\.Processors\.Types\.DomainProcessor\.Process\(\)') | Основной метод обработки данных\. |
| [ProcessDomainSpells\(\)](DomainProcessor.ProcessDomainSpells().md 'Pf2eDataScrapper\.Importers\.Implementations\.Aonprd\.Processors\.Types\.DomainProcessor\.ProcessDomainSpells\(\)') | Обработка заклинаний, связанных с доменом\. |
@@ -11,6 +11,8 @@
| [ArchetypeProcessor](ArchetypeProcessor.md 'Pf2eDataScrapper\.Importers\.Implementations\.Aonprd\.Processors\.Types\.ArchetypeProcessor') | |
| [BackgroundProcessor](BackgroundProcessor.md 'Pf2eDataScrapper\.Importers\.Implementations\.Aonprd\.Processors\.Types\.BackgroundProcessor') | |
| [ClassProcessor](ClassProcessor.md 'Pf2eDataScrapper\.Importers\.Implementations\.Aonprd\.Processors\.Types\.ClassProcessor') | |
| [DeityProcessor](DeityProcessor.md 'Pf2eDataScrapper\.Importers\.Implementations\.Aonprd\.Processors\.Types\.DeityProcessor') | |
| [DomainProcessor](DomainProcessor.md 'Pf2eDataScrapper\.Importers\.Implementations\.Aonprd\.Processors\.Types\.DomainProcessor') | |
| [FeatProcessor](FeatProcessor.md 'Pf2eDataScrapper\.Importers\.Implementations\.Aonprd\.Processors\.Types\.FeatProcessor') | |
| [HeritageProcessor](HeritageProcessor.md 'Pf2eDataScrapper\.Importers\.Implementations\.Aonprd\.Processors\.Types\.HeritageProcessor') | |
| [LanguageProcessor](LanguageProcessor.md 'Pf2eDataScrapper\.Importers\.Implementations\.Aonprd\.Processors\.Types\.LanguageProcessor') | |
@@ -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')
+1 -1
View File
@@ -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') | Традиция заклинаний класса\. |
+13
View File
@@ -0,0 +1,13 @@
#### [Pf2eModel](index.md 'index')
### [Pf2eModel\.Model\.Structure](Pf2eModel.Model.Structure.md 'Pf2eModel\.Model\.Structure').[Deity](Deity.md 'Pf2eModel\.Model\.Structure\.Deity')
## Deity\.Anathema Property
Анафемы божества\.
```csharp
public Pf2eModel.Model.Common.I18n.LocaleString Anathema { get; set; }
```
#### Property Value
[LocaleString](LocaleString.md 'Pf2eModel\.Model\.Common\.I18n\.LocaleString')
@@ -0,0 +1,13 @@
#### [Pf2eModel](index.md 'index')
### [Pf2eModel\.Model\.Structure](Pf2eModel.Model.Structure.md 'Pf2eModel\.Model\.Structure').[Deity](Deity.md 'Pf2eModel\.Model\.Structure\.Deity')
## Deity\.AreaOfConcern Property
Область покровительства божества\.
```csharp
public Pf2eModel.Model.Common.I18n.LocaleString AreaOfConcern { get; set; }
```
#### Property Value
[LocaleString](LocaleString.md 'Pf2eModel\.Model\.Common\.I18n\.LocaleString')
+3 -3
View File
@@ -3,11 +3,11 @@
## Deity\.Category Property
Тип божества\.
Категория божества\.
```csharp
public Pf2eModel.Model.Enum.DeityCategory Category { get; set; }
public string Category { get; set; }
```
#### Property Value
[DeityCategory](DeityCategory.md 'Pf2eModel\.Model\.Enum\.DeityCategory')
[System\.String](https://docs.microsoft.com/en-us/dotnet/api/System.String 'System\.String')
@@ -3,7 +3,7 @@
## Deity\.DeityAttributes Property
Аттрибуты божества\.
Атрибуты божества\.
```csharp
public System.Collections.Generic.ICollection<Pf2eModel.Model.Structure.DeityRelation.DeityAttribute> DeityAttributes { get; set; }
+13
View File
@@ -0,0 +1,13 @@
#### [Pf2eModel](index.md 'index')
### [Pf2eModel\.Model\.Structure](Pf2eModel.Model.Structure.md 'Pf2eModel\.Model\.Structure').[Deity](Deity.md 'Pf2eModel\.Model\.Structure\.Deity')
## Deity\.Edicts Property
Заветы божества\.
```csharp
public Pf2eModel.Model.Common.I18n.LocaleString Edicts { get; set; }
```
#### Property Value
[LocaleString](LocaleString.md 'Pf2eModel\.Model\.Common\.I18n\.LocaleString')
@@ -0,0 +1,13 @@
#### [Pf2eModel](index.md 'index')
### [Pf2eModel\.Model\.Structure](Pf2eModel.Model.Structure.md 'Pf2eModel\.Model\.Structure').[Deity](Deity.md 'Pf2eModel\.Model\.Structure\.Deity')
## Deity\.ReligiousSymbol Property
Религиозный символ божества\.
```csharp
public Pf2eModel.Model.Common.I18n.LocaleString ReligiousSymbol { get; set; }
```
#### Property Value
[LocaleString](LocaleString.md 'Pf2eModel\.Model\.Common\.I18n\.LocaleString')
@@ -0,0 +1,13 @@
#### [Pf2eModel](index.md 'index')
### [Pf2eModel\.Model\.Structure](Pf2eModel.Model.Structure.md 'Pf2eModel\.Model\.Structure').[Deity](Deity.md 'Pf2eModel\.Model\.Structure\.Deity')
## Deity\.SacredAnimal Property
Священное животное божества\.
```csharp
public Pf2eModel.Model.Common.I18n.LocaleString SacredAnimal { get; set; }
```
#### Property Value
[LocaleString](LocaleString.md 'Pf2eModel\.Model\.Common\.I18n\.LocaleString')
+13
View File
@@ -0,0 +1,13 @@
#### [Pf2eModel](index.md 'index')
### [Pf2eModel\.Model\.Structure](Pf2eModel.Model.Structure.md 'Pf2eModel\.Model\.Structure').[Deity](Deity.md 'Pf2eModel\.Model\.Structure\.Deity')
## Deity\.Type Property
Тип божества\.
```csharp
public Pf2eModel.Model.Enum.DeityType Type { get; set; }
```
#### Property Value
[DeityType](DeityType.md 'Pf2eModel\.Model\.Enum\.DeityType')
+8 -2
View File
@@ -15,14 +15,20 @@ Implements [IEntity](IEntity.md 'Pf2eModel\.Model\.IEntity')
| Properties | |
| :--- | :--- |
| [Category](Deity.Category.md 'Pf2eModel\.Model\.Structure\.Deity\.Category') | Тип божества\. |
| [DeityAttributes](Deity.DeityAttributes.md 'Pf2eModel\.Model\.Structure\.Deity\.DeityAttributes') | Аттрибуты божества\. |
| [Anathema](Deity.Anathema.md 'Pf2eModel\.Model\.Structure\.Deity\.Anathema') | Анафемы божества\. |
| [AreaOfConcern](Deity.AreaOfConcern.md 'Pf2eModel\.Model\.Structure\.Deity\.AreaOfConcern') | Область покровительства божества\. |
| [Category](Deity.Category.md 'Pf2eModel\.Model\.Structure\.Deity\.Category') | Категория божества\. |
| [DeityAttributes](Deity.DeityAttributes.md 'Pf2eModel\.Model\.Structure\.Deity\.DeityAttributes') | Атрибуты божества\. |
| [DeityDomains](Deity.DeityDomains.md 'Pf2eModel\.Model\.Structure\.Deity\.DeityDomains') | Домены божества\. |
| [DeitySpells](Deity.DeitySpells.md 'Pf2eModel\.Model\.Structure\.Deity\.DeitySpells') | Заклинания божества\. |
| [DeityWeapons](Deity.DeityWeapons.md 'Pf2eModel\.Model\.Structure\.Deity\.DeityWeapons') | Оружия божества\. |
| [Edicts](Deity.Edicts.md 'Pf2eModel\.Model\.Structure\.Deity\.Edicts') | Заветы божества\. |
| [Entity](Deity.Entity.md 'Pf2eModel\.Model\.Structure\.Deity\.Entity') | Корневая сущность\. |
| [Fonts](Deity.Fonts.md 'Pf2eModel\.Model\.Structure\.Deity\.Fonts') | Тип божественный силы\. |
| [Id](Deity.Id.md 'Pf2eModel\.Model\.Structure\.Deity\.Id') | Идентификатор сущности\. |
| [ReligiousSymbol](Deity.ReligiousSymbol.md 'Pf2eModel\.Model\.Structure\.Deity\.ReligiousSymbol') | Религиозный символ божества\. |
| [SacredAnimal](Deity.SacredAnimal.md 'Pf2eModel\.Model\.Structure\.Deity\.SacredAnimal') | Священное животное божества\. |
| [Sanctification](Deity.Sanctification.md 'Pf2eModel\.Model\.Structure\.Deity\.Sanctification') | Тип освящения\. |
| [SanctificationMust](Deity.SanctificationMust.md 'Pf2eModel\.Model\.Structure\.Deity\.SanctificationMust') | Обязательное освящение\. |
| [Skills](Deity.Skills.md 'Pf2eModel\.Model\.Structure\.Deity\.Skills') | Навыки божества\. |
| [Type](Deity.Type.md 'Pf2eModel\.Model\.Structure\.Deity\.Type') | Тип божества\. |
@@ -0,0 +1,13 @@
#### [Pf2eModel](index.md 'index')
### [Pf2eModel\.Model\.Structure\.DeityRelation](Pf2eModel.Model.Structure.DeityRelation.md 'Pf2eModel\.Model\.Structure\.DeityRelation').[DeityAttribute](DeityAttribute.md 'Pf2eModel\.Model\.Structure\.DeityRelation\.DeityAttribute')
## DeityAttribute\.Id Property
Идентификатор\.
```csharp
public int Id { get; set; }
```
#### Property Value
[System\.Int32](https://docs.microsoft.com/en-us/dotnet/api/System.Int32 'System\.Int32')
@@ -16,3 +16,4 @@ Inheritance [System\.Object](https://docs.microsoft.com/en-us/dotnet/api/System.
| [Attribute](DeityAttribute.Attribute.md 'Pf2eModel\.Model\.Structure\.DeityRelation\.DeityAttribute\.Attribute') | Атрибут божества\. |
| [Deity](DeityAttribute.Deity.md 'Pf2eModel\.Model\.Structure\.DeityRelation\.DeityAttribute\.Deity') | Божество, к которому относится атрибут\. |
| [DeityId](DeityAttribute.DeityId.md 'Pf2eModel\.Model\.Structure\.DeityRelation\.DeityAttribute\.DeityId') | Идентификатор божества\. |
| [Id](DeityAttribute.Id.md 'Pf2eModel\.Model\.Structure\.DeityRelation\.DeityAttribute\.Id') | Идентификатор\. |
-35
View File
@@ -1,35 +0,0 @@
#### [Pf2eModel](index.md 'index')
### [Pf2eModel\.Model\.Enum](Pf2eModel.Model.Enum.md 'Pf2eModel\.Model\.Enum')
## DeityCategory Enum
Тип божества\.
```csharp
public enum DeityCategory
```
### Fields
<a name='Pf2eModel.Model.Enum.DeityCategory.Deity'></a>
`Deity` 0
Божество\.
<a name='Pf2eModel.Model.Enum.DeityCategory.Pantheon'></a>
`Pantheon` 1
Пантеон\.
<a name='Pf2eModel.Model.Enum.DeityCategory.Covenant'></a>
`Covenant` 2
Ковенант\.
<a name='Pf2eModel.Model.Enum.DeityCategory.Philosophy'></a>
`Philosophy` 3
Философия\.
@@ -0,0 +1,13 @@
#### [Pf2eModel](index.md 'index')
### [Pf2eModel\.Model\.Structure\.DeityRelation](Pf2eModel.Model.Structure.DeityRelation.md 'Pf2eModel\.Model\.Structure\.DeityRelation').[DeityDomain](DeityDomain.md 'Pf2eModel\.Model\.Structure\.DeityRelation\.DeityDomain')
## DeityDomain\.Domain Property
Домен, связанный с божеством\.
```csharp
public virtual Pf2eModel.Model.Structure.Domain Domain { get; set; }
```
#### Property Value
[Domain](Domain.md 'Pf2eModel\.Model\.Structure\.Domain')
@@ -0,0 +1,13 @@
#### [Pf2eModel](index.md 'index')
### [Pf2eModel\.Model\.Structure\.DeityRelation](Pf2eModel.Model.Structure.DeityRelation.md 'Pf2eModel\.Model\.Structure\.DeityRelation').[DeityDomain](DeityDomain.md 'Pf2eModel\.Model\.Structure\.DeityRelation\.DeityDomain')
## DeityDomain\.DomainId Property
Идентификатор домена\.
```csharp
public int DomainId { get; set; }
```
#### Property Value
[System\.Int32](https://docs.microsoft.com/en-us/dotnet/api/System.Int32 'System\.Int32')
+2
View File
@@ -15,6 +15,8 @@ Inheritance [System\.Object](https://docs.microsoft.com/en-us/dotnet/api/System.
| :--- | :--- |
| [Deity](DeityDomain.Deity.md 'Pf2eModel\.Model\.Structure\.DeityRelation\.DeityDomain\.Deity') | Божество, к которому относится домен\. |
| [DeityId](DeityDomain.DeityId.md 'Pf2eModel\.Model\.Structure\.DeityRelation\.DeityDomain\.DeityId') | Идентификатор божества, к которому относится домен\. |
| [Domain](DeityDomain.Domain.md 'Pf2eModel\.Model\.Structure\.DeityRelation\.DeityDomain\.Domain') | Домен, связанный с божеством\. |
| [DomainId](DeityDomain.DomainId.md 'Pf2eModel\.Model\.Structure\.DeityRelation\.DeityDomain\.DomainId') | Идентификатор домена\. |
| [Id](DeityDomain.Id.md 'Pf2eModel\.Model\.Structure\.DeityRelation\.DeityDomain\.Id') | Идентификатор отношения божества и домена\. |
| [IsPrimary](DeityDomain.IsPrimary.md 'Pf2eModel\.Model\.Structure\.DeityRelation\.DeityDomain\.IsPrimary') | Флаг, указывающий, является ли домен основным для божества\. |
| [Value](DeityDomain.Value.md 'Pf2eModel\.Model\.Structure\.DeityRelation\.DeityDomain\.Value') | Значение домена божества, например, "Свет", "Тьма" и т\.д\. |
+35
View File
@@ -0,0 +1,35 @@
#### [Pf2eModel](index.md 'index')
### [Pf2eModel\.Model\.Enum](Pf2eModel.Model.Enum.md 'Pf2eModel\.Model\.Enum')
## DeityType Enum
Тип божества\.
```csharp
public enum DeityType
```
### Fields
<a name='Pf2eModel.Model.Enum.DeityType.Deity'></a>
`Deity` 0
Божество\.
<a name='Pf2eModel.Model.Enum.DeityType.Pantheon'></a>
`Pantheon` 1
Пантеон\.
<a name='Pf2eModel.Model.Enum.DeityType.Covenant'></a>
`Covenant` 2
Ковенант\.
<a name='Pf2eModel.Model.Enum.DeityType.Philosophy'></a>
`Philosophy` 3
Философия\.
@@ -0,0 +1,13 @@
#### [Pf2eModel](index.md 'index')
### [Pf2eModel\.Model\.Structure](Pf2eModel.Model.Structure.md 'Pf2eModel\.Model\.Structure').[Domain](Domain.md 'Pf2eModel\.Model\.Structure\.Domain')
## Domain\.AdvancedApocryphalSpell Property
Продвинутое апокрифическое заклинание домена\.
```csharp
public virtual Pf2eModel.Model.Structure.Spell? AdvancedApocryphalSpell { get; set; }
```
#### Property Value
[Spell](Spell.md 'Pf2eModel\.Model\.Structure\.Spell')
@@ -0,0 +1,13 @@
#### [Pf2eModel](index.md 'index')
### [Pf2eModel\.Model\.Structure](Pf2eModel.Model.Structure.md 'Pf2eModel\.Model\.Structure').[Domain](Domain.md 'Pf2eModel\.Model\.Structure\.Domain')
## Domain\.AdvancedApocryphalSpellId Property
Идентификатор продвинутого апокрифического заклинания домена\.
```csharp
public System.Nullable<int> AdvancedApocryphalSpellId { get; set; }
```
#### Property Value
[System\.Nullable&lt;](https://docs.microsoft.com/en-us/dotnet/api/System.Nullable-1 'System\.Nullable\`1')[System\.Int32](https://docs.microsoft.com/en-us/dotnet/api/System.Int32 'System\.Int32')[&gt;](https://docs.microsoft.com/en-us/dotnet/api/System.Nullable-1 'System\.Nullable\`1')
@@ -0,0 +1,13 @@
#### [Pf2eModel](index.md 'index')
### [Pf2eModel\.Model\.Structure](Pf2eModel.Model.Structure.md 'Pf2eModel\.Model\.Structure').[Domain](Domain.md 'Pf2eModel\.Model\.Structure\.Domain')
## Domain\.AdvancedDomainSpell Property
Продвинутое заклинание домена\.
```csharp
public virtual Pf2eModel.Model.Structure.Spell AdvancedDomainSpell { get; set; }
```
#### Property Value
[Spell](Spell.md 'Pf2eModel\.Model\.Structure\.Spell')
@@ -0,0 +1,13 @@
#### [Pf2eModel](index.md 'index')
### [Pf2eModel\.Model\.Structure](Pf2eModel.Model.Structure.md 'Pf2eModel\.Model\.Structure').[Domain](Domain.md 'Pf2eModel\.Model\.Structure\.Domain')
## Domain\.AdvancedDomainSpellId Property
Идентификатор продвинутого заклинания домена\.
```csharp
public int AdvancedDomainSpellId { get; set; }
```
#### Property Value
[System\.Int32](https://docs.microsoft.com/en-us/dotnet/api/System.Int32 'System\.Int32')
@@ -0,0 +1,13 @@
#### [Pf2eModel](index.md 'index')
### [Pf2eModel\.Model\.Structure](Pf2eModel.Model.Structure.md 'Pf2eModel\.Model\.Structure').[Domain](Domain.md 'Pf2eModel\.Model\.Structure\.Domain')
## Domain\.ApocryphalSpell Property
Апокрифическое заклинание домена\.
```csharp
public virtual Pf2eModel.Model.Structure.Spell? ApocryphalSpell { get; set; }
```
#### Property Value
[Spell](Spell.md 'Pf2eModel\.Model\.Structure\.Spell')
@@ -0,0 +1,13 @@
#### [Pf2eModel](index.md 'index')
### [Pf2eModel\.Model\.Structure](Pf2eModel.Model.Structure.md 'Pf2eModel\.Model\.Structure').[Domain](Domain.md 'Pf2eModel\.Model\.Structure\.Domain')
## Domain\.ApocryphalSpellId Property
Идентификатор апокрифического заклинания домена\.
```csharp
public System.Nullable<int> ApocryphalSpellId { get; set; }
```
#### Property Value
[System\.Nullable&lt;](https://docs.microsoft.com/en-us/dotnet/api/System.Nullable-1 'System\.Nullable\`1')[System\.Int32](https://docs.microsoft.com/en-us/dotnet/api/System.Int32 'System\.Int32')[&gt;](https://docs.microsoft.com/en-us/dotnet/api/System.Nullable-1 'System\.Nullable\`1')
@@ -0,0 +1,13 @@
#### [Pf2eModel](index.md 'index')
### [Pf2eModel\.Model\.Structure](Pf2eModel.Model.Structure.md 'Pf2eModel\.Model\.Structure').[Domain](Domain.md 'Pf2eModel\.Model\.Structure\.Domain')
## Domain\.DeityDomains Property
Связи с божествами, которые используют этот домен\.
```csharp
public virtual System.Collections.Generic.ICollection<Pf2eModel.Model.Structure.DeityRelation.DeityDomain> DeityDomains { get; set; }
```
#### Property Value
[System\.Collections\.Generic\.ICollection&lt;](https://docs.microsoft.com/en-us/dotnet/api/System.Collections.Generic.ICollection-1 'System\.Collections\.Generic\.ICollection\`1')[DeityDomain](DeityDomain.md 'Pf2eModel\.Model\.Structure\.DeityRelation\.DeityDomain')[&gt;](https://docs.microsoft.com/en-us/dotnet/api/System.Collections.Generic.ICollection-1 'System\.Collections\.Generic\.ICollection\`1')
@@ -0,0 +1,13 @@
#### [Pf2eModel](index.md 'index')
### [Pf2eModel\.Model\.Structure](Pf2eModel.Model.Structure.md 'Pf2eModel\.Model\.Structure').[Domain](Domain.md 'Pf2eModel\.Model\.Structure\.Domain')
## Domain\.DomainSpell Property
Заклинание домена\.
```csharp
public virtual Pf2eModel.Model.Structure.Spell DomainSpell { get; set; }
```
#### Property Value
[Spell](Spell.md 'Pf2eModel\.Model\.Structure\.Spell')
@@ -0,0 +1,13 @@
#### [Pf2eModel](index.md 'index')
### [Pf2eModel\.Model\.Structure](Pf2eModel.Model.Structure.md 'Pf2eModel\.Model\.Structure').[Domain](Domain.md 'Pf2eModel\.Model\.Structure\.Domain')
## Domain\.DomainSpellId Property
Идентификатор заклинания домена\.
```csharp
public int DomainSpellId { get; set; }
```
#### Property Value
[System\.Int32](https://docs.microsoft.com/en-us/dotnet/api/System.Int32 'System\.Int32')
+15
View File
@@ -0,0 +1,15 @@
#### [Pf2eModel](index.md 'index')
### [Pf2eModel\.Model\.Structure](Pf2eModel.Model.Structure.md 'Pf2eModel\.Model\.Structure').[Domain](Domain.md 'Pf2eModel\.Model\.Structure\.Domain')
## Domain\.Entity Property
Корневая сущность\.
```csharp
public Pf2eModel.Model.Base.Entity Entity { get; set; }
```
Implements [Entity](IEntity.Entity.md 'Pf2eModel\.Model\.IEntity\.Entity')
#### Property Value
[Entity](Entity.md 'Pf2eModel\.Model\.Base\.Entity')
+15
View File
@@ -0,0 +1,15 @@
#### [Pf2eModel](index.md 'index')
### [Pf2eModel\.Model\.Structure](Pf2eModel.Model.Structure.md 'Pf2eModel\.Model\.Structure').[Domain](Domain.md 'Pf2eModel\.Model\.Structure\.Domain')
## Domain\.Id Property
Идентификатор сущности\.
```csharp
public int Id { get; set; }
```
Implements [Id](IEntity.Id.md 'Pf2eModel\.Model\.IEntity\.Id')
#### Property Value
[System\.Int32](https://docs.microsoft.com/en-us/dotnet/api/System.Int32 'System\.Int32')
+28
View File
@@ -0,0 +1,28 @@
#### [Pf2eModel](index.md 'index')
### [Pf2eModel\.Model\.Structure](Pf2eModel.Model.Structure.md 'Pf2eModel\.Model\.Structure')
## Domain Class
Домен\.
```csharp
public class Domain : Pf2eModel.Model.IEntity
```
Inheritance [System\.Object](https://docs.microsoft.com/en-us/dotnet/api/System.Object 'System\.Object') &#129106; Domain
Implements [IEntity](IEntity.md 'Pf2eModel\.Model\.IEntity')
| Properties | |
| :--- | :--- |
| [AdvancedApocryphalSpell](Domain.AdvancedApocryphalSpell.md 'Pf2eModel\.Model\.Structure\.Domain\.AdvancedApocryphalSpell') | Продвинутое апокрифическое заклинание домена\. |
| [AdvancedApocryphalSpellId](Domain.AdvancedApocryphalSpellId.md 'Pf2eModel\.Model\.Structure\.Domain\.AdvancedApocryphalSpellId') | Идентификатор продвинутого апокрифического заклинания домена\. |
| [AdvancedDomainSpell](Domain.AdvancedDomainSpell.md 'Pf2eModel\.Model\.Structure\.Domain\.AdvancedDomainSpell') | Продвинутое заклинание домена\. |
| [AdvancedDomainSpellId](Domain.AdvancedDomainSpellId.md 'Pf2eModel\.Model\.Structure\.Domain\.AdvancedDomainSpellId') | Идентификатор продвинутого заклинания домена\. |
| [ApocryphalSpell](Domain.ApocryphalSpell.md 'Pf2eModel\.Model\.Structure\.Domain\.ApocryphalSpell') | Апокрифическое заклинание домена\. |
| [ApocryphalSpellId](Domain.ApocryphalSpellId.md 'Pf2eModel\.Model\.Structure\.Domain\.ApocryphalSpellId') | Идентификатор апокрифического заклинания домена\. |
| [DeityDomains](Domain.DeityDomains.md 'Pf2eModel\.Model\.Structure\.Domain\.DeityDomains') | Связи с божествами, которые используют этот домен\. |
| [DomainSpell](Domain.DomainSpell.md 'Pf2eModel\.Model\.Structure\.Domain\.DomainSpell') | Заклинание домена\. |
| [DomainSpellId](Domain.DomainSpellId.md 'Pf2eModel\.Model\.Structure\.Domain\.DomainSpellId') | Идентификатор заклинания домена\. |
| [Entity](Domain.Entity.md 'Pf2eModel\.Model\.Structure\.Domain\.Entity') | Корневая сущность\. |
| [Id](Domain.Id.md 'Pf2eModel\.Model\.Structure\.Domain\.Id') | Идентификатор сущности\. |
+13 -7
View File
@@ -82,44 +82,50 @@ public enum EntityType
Состояние\.
<a name='Pf2eModel.Model.Enum.EntityType.Domain'></a>
`Domain` 12
Домен божества\.
<a name='Pf2eModel.Model.Enum.EntityType.Deity'></a>
`Deity` 12
`Deity` 13
Божество\.
<a name='Pf2eModel.Model.Enum.EntityType.Feat'></a>
`Feat` 13
`Feat` 14
Навык\.
<a name='Pf2eModel.Model.Enum.EntityType.Heritage'></a>
`Heritage` 14
`Heritage` 15
Наследие\.
<a name='Pf2eModel.Model.Enum.EntityType.Spell'></a>
`Spell` 15
`Spell` 16
Заклианиние\.
<a name='Pf2eModel.Model.Enum.EntityType.Ritual'></a>
`Ritual` 16
`Ritual` 17
Ритуал\.
<a name='Pf2eModel.Model.Enum.EntityType.Language'></a>
`Language` 17
`Language` 18
Язык\.
<a name='Pf2eModel.Model.Enum.EntityType.Rule'></a>
`Rule` 18
`Rule` 19
Правило\.
+1
View File
@@ -17,6 +17,7 @@ Derived
&#8627; [Class](Class.md 'Pf2eModel\.Model\.Structure\.Class')
&#8627; [Condition](Condition.md 'Pf2eModel\.Model\.Structure\.Condition')
&#8627; [Deity](Deity.md 'Pf2eModel\.Model\.Structure\.Deity')
&#8627; [Domain](Domain.md 'Pf2eModel\.Model\.Structure\.Domain')
&#8627; [Feat](Feat.md 'Pf2eModel\.Model\.Structure\.Feat')
&#8627; [Heritage](Heritage.md 'Pf2eModel\.Model\.Structure\.Heritage')
&#8627; [Language](Language.md 'Pf2eModel\.Model\.Structure\.Language')
@@ -11,9 +11,9 @@
| [AttributeValues](AttributeValues.md 'Pf2eModel\.Model\.Enum\.AttributeValues') | Перечисление значений атрибутов\. |
| [ClassProgressionType](ClassProgressionType.md 'Pf2eModel\.Model\.Enum\.ClassProgressionType') | Тип элемента прогрессии класса\. |
| [ConditionGroup](ConditionGroup.md 'Pf2eModel\.Model\.Enum\.ConditionGroup') | Тип состояния |
| [DeityCategory](DeityCategory.md 'Pf2eModel\.Model\.Enum\.DeityCategory') | Тип божества\. |
| [DeityFonts](DeityFonts.md 'Pf2eModel\.Model\.Enum\.DeityFonts') | Тип божественной силы\. |
| [DeitySanctification](DeitySanctification.md 'Pf2eModel\.Model\.Enum\.DeitySanctification') | Тип освящения божества\. |
| [DeityType](DeityType.md 'Pf2eModel\.Model\.Enum\.DeityType') | Тип божества\. |
| [ElementEnum](ElementEnum.md 'Pf2eModel\.Model\.Enum\.ElementEnum') | Перечисление элементов\. |
| [EntityRarity](EntityRarity.md 'Pf2eModel\.Model\.Enum\.EntityRarity') | Перечисление редкости сущности\. |
| [EntityType](EntityType.md 'Pf2eModel\.Model\.Enum\.EntityType') | Тип сущности\. |
@@ -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') | Традиция заклинания\. |
@@ -14,6 +14,7 @@
| [Class](Class.md 'Pf2eModel\.Model\.Structure\.Class') | Класс\. |
| [Condition](Condition.md 'Pf2eModel\.Model\.Structure\.Condition') | Состояние\. |
| [Deity](Deity.md 'Pf2eModel\.Model\.Structure\.Deity') | Божество\. |
| [Domain](Domain.md 'Pf2eModel\.Model\.Structure\.Domain') | Домен\. |
| [Feat](Feat.md 'Pf2eModel\.Model\.Structure\.Feat') | Способность\. |
| [Heritage](Heritage.md 'Pf2eModel\.Model\.Structure\.Heritage') | Наследие\. |
| [Language](Language.md 'Pf2eModel\.Model\.Structure\.Language') | Язык\. |
@@ -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
Спонтанное заклинательство\.
+8 -2
View File
@@ -16,14 +16,20 @@ public enum TraitType
Обычный признак\.
<a name='Pf2eModel.Model.Enum.TraitType.Alignment'></a>
`Alignment` 1
Мировоззрение\.
<a name='Pf2eModel.Model.Enum.TraitType.Class'></a>
`Class` 1
`Class` 2
Признак класса\.
<a name='Pf2eModel.Model.Enum.TraitType.Tradition'></a>
`Tradition` 2
`Tradition` 3
Признак традиции\.
@@ -26,6 +26,11 @@ internal class AonprdBuilderGlobals
/// </summary>
public Dictionary<string, int> TraitIds { get; } = [];
/// <summary>
/// Список идентификаторов сущностей, которые нужно игнорировать при обработке.
/// </summary>
public List<string> Ignore { get; } = [];
/// <summary>
/// Словарей суффиксов для сущностей
/// </summary>
@@ -63,6 +68,8 @@ internal class AonprdBuilderGlobals
if (json is not null)
{
Ignore = json.SelectToken("Ignore")?.ToObject<List<string>>() ?? [];
SlugSuffixes = JsonToDictionary(json, "SlugSuffixes");
LegacyRemasterExtra = JsonToDictionary(json, "LegacyRemasterExtra");
MergeSources = JsonToDictionary(json, "MergeSources");
@@ -100,7 +100,14 @@ internal abstract class AbstractEntityProcessor(
/// </summary>
public virtual void Check()
{
if (Globals.MergeSources.ContainsKey(Input.GetRequired<string>("id")))
string id = Input.GetRequired<string>("id");
if (Globals.Ignore.Contains(id))
{
throw new SkipItemException(Name, "игнорируется.");
}
if (Globals.MergeSources.ContainsKey(id))
{
throw new SkipItemException(Name, "помечено на слияние.");
}
@@ -217,7 +224,7 @@ internal abstract class AbstractEntityProcessor(
EntitySource entitySource = new()
{
Entity = Entity,
SourceId = Globals.SourceIds[sourceName],
SourceId = Globals.SourceIds[sourceName.Trim()],
Suffix = StringHelper.ResolveSourceSuffix(
Input.GetRequired<string>("source_markdown")
),
@@ -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;
}
@@ -0,0 +1,261 @@
using System.Linq;
using System.Text.RegularExpressions;
using Newtonsoft.Json.Linq;
using Pf2eDataScrapper.Helpers;
using Pf2eDataScrapper.Importers.Implementations.Aonprd.Helpers;
using Pf2eDataScrapper.Processors;
using Pf2eDataScrapper.Processors.Attributes;
using Pf2eModel;
using Pf2eModel.Model.Common;
using Pf2eModel.Model.Common.I18n;
using Pf2eModel.Model.Enum;
using Pf2eModel.Model.Structure;
using Pf2eModel.Model.Structure.DeityRelation;
using StringHelper = Pf2eDataScrapper.Importers.Implementations.Aonprd.Helpers.StringHelper;
namespace Pf2eDataScrapper.Importers.Implementations.Aonprd.Processors.Types;
[ProcessorCollection(
"aonprd:deity",
InnerType = "deity",
CompendiumType = ProcessorCompendiumEnum.Aonprd,
Description = "Божества",
Group = ProcessorGroupEnum.AonprdEntities
)]
[ProcessorDependencies(["aonprd:domain", "aonprd:spell", "aonprd:trait", "aonprd:source"])]
internal partial class DeityProcessor(
ProcessorInput input,
StringHelper stringHelper,
DatabaseHelper helper,
AonprdBuilderGlobals globals
) : AbstractEntityProcessor(input, stringHelper, helper, globals)
{
/// <inheritdoc/>
public override EntityType Type => EntityType.Deity;
/// <inheritdoc/>
public override Deity Object { get; } = new();
/// <inheritdoc/>
protected override void Add() => Context.Deities.Add(Object);
/// <inheritdoc/>
public override void Process()
{
base.Process();
// Установка категории божества
Object.Category = Input.GetRequired<string>("deity_category");
ProcessFonts();
// Обработка атрибутов
ProcessAttributes();
// Обработка доменов
ProcessDomains();
// Обработка заклинаний
ProcessSpells();
// Обработка оружия
ProcessWeapons();
// Обработка навыков
ProcessSkills();
// Обработка текстов описания
ProcessTexts();
// Обработка освящения - в Foundry!
}
/// <inheritdoc/>
protected override void AddTraits()
{
// У божеств нет признаков. Не знаю, зачем они на Архивах.
}
/// <summary>
/// Обработка божественной силы.
/// </summary>
private void ProcessFonts()
{
JArray fonts = Input.GetOptional<JArray>("divine_font") ?? [];
switch (fonts.Count)
{
case 0:
Object.Fonts = DeityFonts.None;
return;
// Если есть и Heal, и Harm
case 2:
Object.Fonts = DeityFonts.Any;
return;
default:
{
// Определяем тип по первому элементу
string font = fonts[0].ToString();
Object.Fonts = Input.Enum<DeityFonts>(font);
break;
}
}
}
/// <summary>
/// Обработка атрибутов божества.
/// </summary>
private void ProcessAttributes()
{
JArray attributes = Input.GetOptional<JArray>("attribute") ?? [];
foreach (JToken token in attributes)
{
AttributeValues attribute = Input.Enum<AttributeValues>(token.ToString());
Object.DeityAttributes.Add(new() { Deity = Object, Attribute = attribute });
}
}
/// <summary>
/// Обработка доменов божества.
/// </summary>
private void ProcessDomains()
{
// Обработка основных доменов
string primaryDomainsMarkdown = Input.GetRequired<string>("domain_primary_markdown");
ProcessDomainMarkdown(primaryDomainsMarkdown, true);
// Обработка альтернативных доменов
string alternateDomainsMarkdown = Input.GetRequired<string>("domain_alternate_markdown");
ProcessDomainMarkdown(alternateDomainsMarkdown, false);
}
/// <summary>
/// Обработка markdown-строки с доменами.
/// </summary>
/// <param name="markdown">Markdown-строка с доменами.</param>
/// <param name="isPrimary">Флаг, указывающий, являются ли домены основными.</param>
private void ProcessDomainMarkdown(string markdown, bool isPrimary)
{
// Разделяем markdown на отдельные ссылки
MatchCollection matches = MarkdownLinkRegex().Matches(markdown);
foreach (Match match in matches)
{
string domainName = match.Groups[1].Value;
// Ищем домен в базе данных
Domain? domain = Context.Domains.FirstOrDefault(d =>
Pf2eDbContext.LocaleSearch(d.Entity.Name, domainName)
);
if (domain != null)
{
Object.DeityDomains.Add(
new()
{
Deity = Object,
Domain = domain,
IsPrimary = isPrimary,
Value = domainName,
}
);
}
}
}
/// <summary>
/// Обработка заклинаний божества.
/// </summary>
private void ProcessSpells()
{
string spellsMarkdown = Input.GetRequired<string>("spell_markdown");
MatchCollection matches = MarkdownLinkRegex().Matches(spellsMarkdown);
foreach (Match match in matches)
{
string spellName = match.Groups[1].Value;
// Ищем заклинание в базе данных
Spell? spell = Context.Spells.FirstOrDefault(s =>
Pf2eDbContext.LocaleSearch(s.Entity.Name, spellName)
);
if (spell != null)
{
Object.DeitySpells.Add(
new()
{
Deity = Object,
Spell = spell,
Level = spell.Level,
}
);
}
}
}
/// <summary>
/// Обработка оружия божества.
/// </summary>
private void ProcessWeapons()
{
string weaponsMarkdown = Input.GetRequired<string>("favored_weapon_markdown");
MatchCollection matches = MarkdownLinkRegex().Matches(weaponsMarkdown);
foreach (Match match in matches)
{
string weaponName = match.Groups[1].Value;
Object.DeityWeapons.Add(new() { Deity = Object, Weapon = weaponName });
}
}
/// <summary>
/// Обработка навыков божества.
/// </summary>
private void ProcessSkills()
{
string skillsMarkdown = Input.GetRequired<string>("skill_markdown");
MatchCollection matches = MarkdownLinkRegex().Matches(skillsMarkdown);
foreach (Match match in matches)
{
string skillName = match.Groups[1].Value;
// Ищем навык в базе данных
Training? training = Context.Trainings.FirstOrDefault(t =>
Pf2eDbContext.LocaleSearch(t.Name, skillName)
);
if (training != null)
{
Object.Skills.Add(training);
}
}
}
/// <summary>
/// Обработка текстов описания божества.
/// </summary>
private void ProcessTexts()
{
Object.Edicts[LocaleType.English] = Input.GetRequired<string>("edict");
Object.Anathema[LocaleType.English] = Input.GetRequired<string>("anathema");
Object.ReligiousSymbol[LocaleType.English] = Input.GetOptional<string>(
"religious_symbol",
""
);
Object.SacredAnimal[LocaleType.English] = Input.GetOptional<string>("sacred_animal", "");
Object.AreaOfConcern[LocaleType.English] = Input.GetOptional<string>(
"area_of_concern_raw",
""
);
}
/// <summary>
/// Регулярное выражение для извлечения названия из markdown-ссылки.
/// </summary>
/// <returns>Скомпилированное регулярное выражение.</returns>
[GeneratedRegex(@"\[([^\]]+)\]\([^)]+\)")]
private static partial Regex MarkdownLinkRegex();
}
@@ -0,0 +1,119 @@
using System;
using System.Linq;
using System.Text.RegularExpressions;
using Pf2eDataScrapper.Helpers;
using Pf2eDataScrapper.Importers.Implementations.Aonprd.Helpers;
using Pf2eDataScrapper.Processors;
using Pf2eDataScrapper.Processors.Attributes;
using Pf2eModel;
using Pf2eModel.Model.Enum;
using Pf2eModel.Model.Structure;
using StringHelper = Pf2eDataScrapper.Importers.Implementations.Aonprd.Helpers.StringHelper;
namespace Pf2eDataScrapper.Importers.Implementations.Aonprd.Processors.Types;
[ProcessorCollection(
"aonprd:domain",
InnerType = "domain",
CompendiumType = ProcessorCompendiumEnum.Aonprd,
Description = "Домены",
Group = ProcessorGroupEnum.AonprdEntities
)]
[ProcessorDependencies(["aonprd:spell"])]
internal partial class DomainProcessor(
ProcessorInput input,
StringHelper stringHelper,
DatabaseHelper helper,
AonprdBuilderGlobals globals
) : AbstractEntityProcessor(input, stringHelper, helper, globals)
{
/// <inheritdoc/>
public override EntityType Type => EntityType.Domain;
/// <inheritdoc/>
public override Domain Object { get; } = new();
/// <inheritdoc/>
protected override void Add() => Context.Domains.Add(Object);
/// <inheritdoc/>
public override void Process()
{
base.Process();
// Обработка заклинаний домена
ProcessDomainSpells();
}
/// <summary>
/// Обработка заклинаний, связанных с доменом.
/// </summary>
private void ProcessDomainSpells()
{
// Обработка основного заклинания домена
string domainSpellMarkdown = Input.GetRequired<string>("domain_spell_markdown");
Object.DomainSpellId = GetSpellIdFromMarkdown(domainSpellMarkdown);
// Обработка продвинутого заклинания домена
string advancedDomainSpellMarkdown = Input.GetRequired<string>(
"advanced_domain_spell_markdown"
);
Object.AdvancedDomainSpellId = GetSpellIdFromMarkdown(advancedDomainSpellMarkdown);
// Обработка апокрифического заклинания (если есть)
string? apocryphalSpellMarkdown = Input.GetOptional<string>("apocryphal_spell_markdown");
if (!string.IsNullOrEmpty(apocryphalSpellMarkdown))
{
Object.ApocryphalSpellId = GetSpellIdFromMarkdown(apocryphalSpellMarkdown);
}
// Обработка продвинутого апокрифического заклинания (если есть)
string? advancedApocryphalSpellMarkdown = Input.GetOptional<string>(
"advanced_apocryphal_spell_markdown"
);
if (!string.IsNullOrEmpty(advancedApocryphalSpellMarkdown))
{
Object.AdvancedApocryphalSpellId = GetSpellIdFromMarkdown(
advancedApocryphalSpellMarkdown
);
}
}
/// <summary>
/// Получение идентификатора заклинания из markdown-строки.
/// </summary>
/// <param name="markdown">Markdown-строка с информацией о заклинании.</param>
/// <returns>Идентификатор заклинания.</returns>
private int GetSpellIdFromMarkdown(string markdown)
{
// Используем регулярное выражение для извлечения названия заклинания
// Формат: [Название заклинания](/Spells.aspx?ID=XXX)
Match match = MarkdownLinkRegex().Match(markdown);
if (!match.Success)
{
throw new InvalidOperationException($"Invalid markdown format: {markdown}");
}
string spellName = match.Groups[1].Value;
// Поиск заклинания в базе данных
Spell? spell = Context.Spells.FirstOrDefault(s =>
Pf2eDbContext.LocaleSearch(s.Entity.Name, spellName)
);
if (spell == null)
{
throw new InvalidOperationException($"Spell '{spellName}' not found in database");
}
return spell.Id;
}
/// <summary>
/// Регулярное выражение для извлечения названия из markdown-ссылки.
/// </summary>
/// <returns>Скомпилированное регулярное выражение.</returns>
[GeneratedRegex(@"\[([^\]]+)\]\([^)]+\)")]
private static partial Regex MarkdownLinkRegex();
}
@@ -0,0 +1,88 @@
using System;
using System.Collections.Generic;
using Microsoft.Extensions.DependencyInjection;
using Pf2eDataScrapper.Helpers;
using Pf2eDataScrapper.Importers.Implementations.Aonprd.Helpers;
using Pf2eDataScrapper.Importers.Implementations.Aonprd.Processors.Subclasses;
using Pf2eDataScrapper.Processors.Attributes;
using Pf2eDataScrapper.Processors.Definitions;
using Pf2eDataScrapper.Processors.Factory;
using Pf2eModel;
using Pf2eModel.Model.Base;
using Pf2eModel.Model.Enum;
using Pf2eModel.Model.Structure;
namespace Pf2eDataScrapper.Importers.Implementations.Aonprd.Processors.Types;
[ProcessorFactory(
"aonprd:trait-alignments",
ProcessorType = typeof(TraitAlignmentsProcessor),
Description = "Трейты мировоззрений",
Group = ProcessorGroupEnum.AonprdPreparation,
Parallel = false
)]
internal class TraitAlignmentsProcessorFactory(IServiceProvider serviceProvider)
: AbstractProcessorFactory
{
public IServiceProvider ServiceProvider { get; } = serviceProvider;
public List<string> Alignments { get; } = ["LG", "NG", "CG", "LN", "N", "CN", "LE", "NE", "CE"];
public override int Count()
{
return Alignments.Count;
}
public override IEnumerable<Tuple<string, IProcessor>> GetEnumerator()
{
foreach (string alignment in Alignments)
{
TraitAlignmentsProcessor processor =
ActivatorUtilities.CreateInstance<TraitAlignmentsProcessor>(
ServiceProvider,
alignment
);
yield return new($"{alignment}", processor);
}
}
}
internal class TraitAlignmentsProcessor(
string alignment,
DatabaseHelper helper,
AonprdBuilderGlobals globals
) : IProcessor
{
public string Alignment { get; } = alignment;
public DatabaseHelper Helper { get; } = helper;
public AonprdBuilderGlobals Globals { get; } = globals;
public Pf2eDbContext Context { get; } = new();
public Entity Entity { get; set; } = null!;
public Trait Trait { get; set; } = null!;
public void Process()
{
Entity = new()
{
Name = new() { ["en"] = Alignment },
Type = EntityType.Trait,
Img = "",
Description = "",
Rarity = EntityRarity.Common,
IsTranslated = false,
IsChecked = false,
Slug = Helper.GenerateSlug(Alignment),
};
Trait = new() { Entity = Entity, Type = TraitType.Alignment };
}
public void Save()
{
Context.Entities.Add(Entity);
Context.Traits.Add(Trait);
Globals.TraitIds[Alignment] = Entity.Id;
}
}
@@ -16,7 +16,9 @@ namespace Pf2eDataScrapper.Importers.Implementations.Aonprd.Processors.Types;
Description = "Признаки",
Group = ProcessorGroupEnum.AonprdEntities
)]
[ProcessorDependencies(["aonprd:external", "aonprd:source"])]
[ProcessorDependencies(
["aonprd:external", "aonprd:source", "aonprd:source", "aonprd:trait-alignments"]
)]
internal class TraitProcessor(
ProcessorInput input,
StringHelper stringHelper,
@@ -1,5 +1,8 @@
{
"Aonprd": {
"Ignore": [
"domain-38"
],
"SlugSuffixes": {
"spell-843": "initial",
"feat-455": "initial",
@@ -13,7 +13,7 @@ using Pf2eModel.Model.Enum;
namespace Pf2eModel.Migrations
{
[DbContext(typeof(Pf2eDbContext))]
[Migration("20250602061959_1")]
[Migration("20250914093120_1")]
partial class _1
{
/// <inheritdoc />
@@ -24,17 +24,17 @@ 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" });
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", "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", "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" });
@@ -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);
@@ -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")
@@ -1122,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");
@@ -1154,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);
});
@@ -1189,6 +1249,12 @@ namespace Pf2eModel.Migrations
.HasColumnOrder(2)
.HasComment("Идентификатор божества");
b.Property<int>("DomainId")
.HasColumnType("integer")
.HasColumnName("domain_id")
.HasColumnOrder(4)
.HasComment("Идентификатор домена");
b.Property<bool>("IsPrimary")
.HasColumnType("boolean")
.HasColumnName("is_primary")
@@ -1200,7 +1266,7 @@ namespace Pf2eModel.Migrations
.HasMaxLength(255)
.HasColumnType("character varying(255)")
.HasColumnName("value")
.HasColumnOrder(4);
.HasColumnOrder(5);
b.HasKey("Id")
.HasName("pk_deity_domains");
@@ -1208,6 +1274,9 @@ namespace Pf2eModel.Migrations
b.HasIndex("DeityId")
.HasDatabaseName("ix_deity_domains_deity_id");
b.HasIndex("DomainId")
.HasDatabaseName("ix_deity_domains_domain_id");
b.ToTable("deity_domains", (string)null);
});
@@ -1286,6 +1355,56 @@ namespace Pf2eModel.Migrations
b.ToTable("deity_weapons", (string)null);
});
modelBuilder.Entity("Pf2eModel.Model.Structure.Domain", b =>
{
b.Property<int>("Id")
.HasColumnType("integer")
.HasColumnName("id")
.HasColumnOrder(1)
.HasComment("Идентификатор");
b.Property<int?>("AdvancedApocryphalSpellId")
.HasColumnType("integer")
.HasColumnName("advanced_apocryphal_spell_id")
.HasColumnOrder(5)
.HasComment("Продвинутое апокрифическое заклинание домена");
b.Property<int>("AdvancedDomainSpellId")
.HasColumnType("integer")
.HasColumnName("advanced_domain_spell_id")
.HasColumnOrder(3)
.HasComment("Продвинутое заклинание домена");
b.Property<int?>("ApocryphalSpellId")
.HasColumnType("integer")
.HasColumnName("apocryphal_spell_id")
.HasColumnOrder(4)
.HasComment("Апокрифическое заклинание домена");
b.Property<int>("DomainSpellId")
.HasColumnType("integer")
.HasColumnName("domain_spell_id")
.HasColumnOrder(2)
.HasComment("Заклинание домена");
b.HasKey("Id")
.HasName("pk_domains");
b.HasIndex("AdvancedApocryphalSpellId")
.HasDatabaseName("ix_domains_advanced_apocryphal_spell_id");
b.HasIndex("AdvancedDomainSpellId")
.HasDatabaseName("ix_domains_advanced_domain_spell_id");
b.HasIndex("ApocryphalSpellId")
.HasDatabaseName("ix_domains_apocryphal_spell_id");
b.HasIndex("DomainSpellId")
.HasDatabaseName("ix_domains_domain_spell_id");
b.ToTable("domains", (string)null);
});
modelBuilder.Entity("Pf2eModel.Model.Structure.Feat", b =>
{
b.Property<int>("Id")
@@ -2400,7 +2519,16 @@ namespace Pf2eModel.Migrations
.IsRequired()
.HasConstraintName("fk_deity_domains_deities_deity_id");
b.HasOne("Pf2eModel.Model.Structure.Domain", "Domain")
.WithMany("DeityDomains")
.HasForeignKey("DomainId")
.OnDelete(DeleteBehavior.Cascade)
.IsRequired()
.HasConstraintName("fk_deity_domains_domains_domain_id");
b.Navigation("Deity");
b.Navigation("Domain");
});
modelBuilder.Entity("Pf2eModel.Model.Structure.DeityRelation.DeitySpell", b =>
@@ -2436,6 +2564,52 @@ namespace Pf2eModel.Migrations
b.Navigation("Deity");
});
modelBuilder.Entity("Pf2eModel.Model.Structure.Domain", b =>
{
b.HasOne("Pf2eModel.Model.Structure.Spell", "AdvancedApocryphalSpell")
.WithMany()
.HasForeignKey("AdvancedApocryphalSpellId")
.OnDelete(DeleteBehavior.SetNull)
.HasConstraintName("fk_domains_spells_advanced_apocryphal_spell_id");
b.HasOne("Pf2eModel.Model.Structure.Spell", "AdvancedDomainSpell")
.WithMany()
.HasForeignKey("AdvancedDomainSpellId")
.OnDelete(DeleteBehavior.Cascade)
.IsRequired()
.HasConstraintName("fk_domains_spells_advanced_domain_spell_id");
b.HasOne("Pf2eModel.Model.Structure.Spell", "ApocryphalSpell")
.WithMany()
.HasForeignKey("ApocryphalSpellId")
.OnDelete(DeleteBehavior.SetNull)
.HasConstraintName("fk_domains_spells_apocryphal_spell_id");
b.HasOne("Pf2eModel.Model.Structure.Spell", "DomainSpell")
.WithMany()
.HasForeignKey("DomainSpellId")
.OnDelete(DeleteBehavior.Cascade)
.IsRequired()
.HasConstraintName("fk_domains_spells_domain_spell_id");
b.HasOne("Pf2eModel.Model.Base.Entity", "Entity")
.WithOne()
.HasForeignKey("Pf2eModel.Model.Structure.Domain", "Id")
.OnDelete(DeleteBehavior.Cascade)
.IsRequired()
.HasConstraintName("fk_domains_entities_id");
b.Navigation("AdvancedApocryphalSpell");
b.Navigation("AdvancedDomainSpell");
b.Navigation("ApocryphalSpell");
b.Navigation("DomainSpell");
b.Navigation("Entity");
});
modelBuilder.Entity("Pf2eModel.Model.Structure.Feat", b =>
{
b.HasOne("Pf2eModel.Model.Base.Entity", "Entity")
@@ -2726,6 +2900,11 @@ namespace Pf2eModel.Migrations
b.Navigation("DeityWeapons");
});
modelBuilder.Entity("Pf2eModel.Model.Structure.Domain", b =>
{
b.Navigation("DeityDomains");
});
modelBuilder.Entity("Pf2eModel.Model.Structure.Feat", b =>
{
b.Navigation("FeatPrerequisites");
@@ -14,17 +14,17 @@ 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")
.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,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,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")
@@ -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(
@@ -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: "Дополнительные навыки")
},
@@ -233,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 =>
{
@@ -777,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,
@@ -791,27 +800,6 @@ namespace Pf2eModel.Migrations
onDelete: ReferentialAction.Cascade);
});
migrationBuilder.CreateTable(
name: "deity_domains",
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: "Идентификатор божества"),
is_primary = table.Column<bool>(type: "boolean", nullable: false, comment: "Флаг основного домена"),
value = table.Column<string>(type: "character varying(255)", maxLength: 255, nullable: false)
},
constraints: table =>
{
table.PrimaryKey("pk_deity_domains", x => x.id);
table.ForeignKey(
name: "fk_deity_domains_deities_deity_id",
column: x => x.deity_id,
principalTable: "deities",
principalColumn: "id",
onDelete: ReferentialAction.Cascade);
});
migrationBuilder.CreateTable(
name: "deity_training",
columns: table => new
@@ -1002,6 +990,51 @@ namespace Pf2eModel.Migrations
onDelete: ReferentialAction.Cascade);
});
migrationBuilder.CreateTable(
name: "domains",
columns: table => new
{
id = table.Column<int>(type: "integer", nullable: false, comment: "Идентификатор"),
domain_spell_id = table.Column<int>(type: "integer", nullable: false, comment: "Заклинание домена"),
advanced_domain_spell_id = table.Column<int>(type: "integer", nullable: false, comment: "Продвинутое заклинание домена"),
apocryphal_spell_id = table.Column<int>(type: "integer", nullable: true, comment: "Апокрифическое заклинание домена"),
advanced_apocryphal_spell_id = table.Column<int>(type: "integer", nullable: true, comment: "Продвинутое апокрифическое заклинание домена")
},
constraints: table =>
{
table.PrimaryKey("pk_domains", x => x.id);
table.ForeignKey(
name: "fk_domains_entities_id",
column: x => x.id,
principalTable: "entities",
principalColumn: "id",
onDelete: ReferentialAction.Cascade);
table.ForeignKey(
name: "fk_domains_spells_advanced_apocryphal_spell_id",
column: x => x.advanced_apocryphal_spell_id,
principalTable: "spells",
principalColumn: "id",
onDelete: ReferentialAction.SetNull);
table.ForeignKey(
name: "fk_domains_spells_advanced_domain_spell_id",
column: x => x.advanced_domain_spell_id,
principalTable: "spells",
principalColumn: "id",
onDelete: ReferentialAction.Cascade);
table.ForeignKey(
name: "fk_domains_spells_apocryphal_spell_id",
column: x => x.apocryphal_spell_id,
principalTable: "spells",
principalColumn: "id",
onDelete: ReferentialAction.SetNull);
table.ForeignKey(
name: "fk_domains_spells_domain_spell_id",
column: x => x.domain_spell_id,
principalTable: "spells",
principalColumn: "id",
onDelete: ReferentialAction.Cascade);
});
migrationBuilder.CreateTable(
name: "spell_areas",
columns: table => new
@@ -1145,6 +1178,34 @@ namespace Pf2eModel.Migrations
onDelete: ReferentialAction.Cascade);
});
migrationBuilder.CreateTable(
name: "deity_domains",
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: "Идентификатор божества"),
is_primary = table.Column<bool>(type: "boolean", nullable: false, comment: "Флаг основного домена"),
domain_id = table.Column<int>(type: "integer", nullable: false, comment: "Идентификатор домена"),
value = table.Column<string>(type: "character varying(255)", maxLength: 255, nullable: false)
},
constraints: table =>
{
table.PrimaryKey("pk_deity_domains", x => x.id);
table.ForeignKey(
name: "fk_deity_domains_deities_deity_id",
column: x => x.deity_id,
principalTable: "deities",
principalColumn: "id",
onDelete: ReferentialAction.Cascade);
table.ForeignKey(
name: "fk_deity_domains_domains_domain_id",
column: x => x.domain_id,
principalTable: "domains",
principalColumn: "id",
onDelete: ReferentialAction.Cascade);
});
migrationBuilder.CreateTable(
name: "subclass_provided_entities",
columns: table => new
@@ -1267,11 +1328,21 @@ 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",
column: "deity_id");
migrationBuilder.CreateIndex(
name: "ix_deity_domains_domain_id",
table: "deity_domains",
column: "domain_id");
migrationBuilder.CreateIndex(
name: "ix_deity_spells_deity_id",
table: "deity_spells",
@@ -1292,6 +1363,26 @@ namespace Pf2eModel.Migrations
table: "deity_weapons",
column: "deity_id");
migrationBuilder.CreateIndex(
name: "ix_domains_advanced_apocryphal_spell_id",
table: "domains",
column: "advanced_apocryphal_spell_id");
migrationBuilder.CreateIndex(
name: "ix_domains_advanced_domain_spell_id",
table: "domains",
column: "advanced_domain_spell_id");
migrationBuilder.CreateIndex(
name: "ix_domains_apocryphal_spell_id",
table: "domains",
column: "apocryphal_spell_id");
migrationBuilder.CreateIndex(
name: "ix_domains_domain_spell_id",
table: "domains",
column: "domain_spell_id");
migrationBuilder.CreateIndex(
name: "ix_entity_aliases_entity_id",
table: "entity_aliases",
@@ -1520,6 +1611,9 @@ namespace Pf2eModel.Migrations
migrationBuilder.DropTable(
name: "backgrounds");
migrationBuilder.DropTable(
name: "domains");
migrationBuilder.DropTable(
name: "deities");
@@ -1541,9 +1635,6 @@ namespace Pf2eModel.Migrations
migrationBuilder.DropTable(
name: "rituals");
migrationBuilder.DropTable(
name: "spells");
migrationBuilder.DropTable(
name: "subclasses");
@@ -1553,6 +1644,9 @@ namespace Pf2eModel.Migrations
migrationBuilder.DropTable(
name: "feats");
migrationBuilder.DropTable(
name: "spells");
migrationBuilder.DropTable(
name: "subclass_groups");
@@ -21,17 +21,17 @@ 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" });
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", "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", "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" });
@@ -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);
@@ -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")
@@ -1119,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");
@@ -1151,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);
});
@@ -1186,6 +1246,12 @@ namespace Pf2eModel.Migrations
.HasColumnOrder(2)
.HasComment("Идентификатор божества");
b.Property<int>("DomainId")
.HasColumnType("integer")
.HasColumnName("domain_id")
.HasColumnOrder(4)
.HasComment("Идентификатор домена");
b.Property<bool>("IsPrimary")
.HasColumnType("boolean")
.HasColumnName("is_primary")
@@ -1197,7 +1263,7 @@ namespace Pf2eModel.Migrations
.HasMaxLength(255)
.HasColumnType("character varying(255)")
.HasColumnName("value")
.HasColumnOrder(4);
.HasColumnOrder(5);
b.HasKey("Id")
.HasName("pk_deity_domains");
@@ -1205,6 +1271,9 @@ namespace Pf2eModel.Migrations
b.HasIndex("DeityId")
.HasDatabaseName("ix_deity_domains_deity_id");
b.HasIndex("DomainId")
.HasDatabaseName("ix_deity_domains_domain_id");
b.ToTable("deity_domains", (string)null);
});
@@ -1283,6 +1352,56 @@ namespace Pf2eModel.Migrations
b.ToTable("deity_weapons", (string)null);
});
modelBuilder.Entity("Pf2eModel.Model.Structure.Domain", b =>
{
b.Property<int>("Id")
.HasColumnType("integer")
.HasColumnName("id")
.HasColumnOrder(1)
.HasComment("Идентификатор");
b.Property<int?>("AdvancedApocryphalSpellId")
.HasColumnType("integer")
.HasColumnName("advanced_apocryphal_spell_id")
.HasColumnOrder(5)
.HasComment("Продвинутое апокрифическое заклинание домена");
b.Property<int>("AdvancedDomainSpellId")
.HasColumnType("integer")
.HasColumnName("advanced_domain_spell_id")
.HasColumnOrder(3)
.HasComment("Продвинутое заклинание домена");
b.Property<int?>("ApocryphalSpellId")
.HasColumnType("integer")
.HasColumnName("apocryphal_spell_id")
.HasColumnOrder(4)
.HasComment("Апокрифическое заклинание домена");
b.Property<int>("DomainSpellId")
.HasColumnType("integer")
.HasColumnName("domain_spell_id")
.HasColumnOrder(2)
.HasComment("Заклинание домена");
b.HasKey("Id")
.HasName("pk_domains");
b.HasIndex("AdvancedApocryphalSpellId")
.HasDatabaseName("ix_domains_advanced_apocryphal_spell_id");
b.HasIndex("AdvancedDomainSpellId")
.HasDatabaseName("ix_domains_advanced_domain_spell_id");
b.HasIndex("ApocryphalSpellId")
.HasDatabaseName("ix_domains_apocryphal_spell_id");
b.HasIndex("DomainSpellId")
.HasDatabaseName("ix_domains_domain_spell_id");
b.ToTable("domains", (string)null);
});
modelBuilder.Entity("Pf2eModel.Model.Structure.Feat", b =>
{
b.Property<int>("Id")
@@ -2397,7 +2516,16 @@ namespace Pf2eModel.Migrations
.IsRequired()
.HasConstraintName("fk_deity_domains_deities_deity_id");
b.HasOne("Pf2eModel.Model.Structure.Domain", "Domain")
.WithMany("DeityDomains")
.HasForeignKey("DomainId")
.OnDelete(DeleteBehavior.Cascade)
.IsRequired()
.HasConstraintName("fk_deity_domains_domains_domain_id");
b.Navigation("Deity");
b.Navigation("Domain");
});
modelBuilder.Entity("Pf2eModel.Model.Structure.DeityRelation.DeitySpell", b =>
@@ -2433,6 +2561,52 @@ namespace Pf2eModel.Migrations
b.Navigation("Deity");
});
modelBuilder.Entity("Pf2eModel.Model.Structure.Domain", b =>
{
b.HasOne("Pf2eModel.Model.Structure.Spell", "AdvancedApocryphalSpell")
.WithMany()
.HasForeignKey("AdvancedApocryphalSpellId")
.OnDelete(DeleteBehavior.SetNull)
.HasConstraintName("fk_domains_spells_advanced_apocryphal_spell_id");
b.HasOne("Pf2eModel.Model.Structure.Spell", "AdvancedDomainSpell")
.WithMany()
.HasForeignKey("AdvancedDomainSpellId")
.OnDelete(DeleteBehavior.Cascade)
.IsRequired()
.HasConstraintName("fk_domains_spells_advanced_domain_spell_id");
b.HasOne("Pf2eModel.Model.Structure.Spell", "ApocryphalSpell")
.WithMany()
.HasForeignKey("ApocryphalSpellId")
.OnDelete(DeleteBehavior.SetNull)
.HasConstraintName("fk_domains_spells_apocryphal_spell_id");
b.HasOne("Pf2eModel.Model.Structure.Spell", "DomainSpell")
.WithMany()
.HasForeignKey("DomainSpellId")
.OnDelete(DeleteBehavior.Cascade)
.IsRequired()
.HasConstraintName("fk_domains_spells_domain_spell_id");
b.HasOne("Pf2eModel.Model.Base.Entity", "Entity")
.WithOne()
.HasForeignKey("Pf2eModel.Model.Structure.Domain", "Id")
.OnDelete(DeleteBehavior.Cascade)
.IsRequired()
.HasConstraintName("fk_domains_entities_id");
b.Navigation("AdvancedApocryphalSpell");
b.Navigation("AdvancedDomainSpell");
b.Navigation("ApocryphalSpell");
b.Navigation("DomainSpell");
b.Navigation("Entity");
});
modelBuilder.Entity("Pf2eModel.Model.Structure.Feat", b =>
{
b.HasOne("Pf2eModel.Model.Base.Entity", "Entity")
@@ -2723,6 +2897,11 @@ namespace Pf2eModel.Migrations
b.Navigation("DeityWeapons");
});
modelBuilder.Entity("Pf2eModel.Model.Structure.Domain", b =>
{
b.Navigation("DeityDomains");
});
modelBuilder.Entity("Pf2eModel.Model.Structure.Feat", b =>
{
b.Navigation("FeatPrerequisites");
@@ -5,7 +5,7 @@ namespace Pf2eModel.Model.Enum;
/// <summary>
/// Тип божества.
/// </summary>
public enum DeityCategory
public enum DeityType
{
/// <summary>
/// Божество.
+6
View File
@@ -79,6 +79,12 @@ public enum EntityType
[PgName("condition")]
Condition,
/// <summary>
/// Домен божества.
/// </summary>
[PgName("domain")]
Domain,
/// <summary>
/// Божество.
/// </summary>
+27
View File
@@ -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,
}
+6
View File
@@ -13,6 +13,12 @@ public enum TraitType
[PgName("regular")]
Regular,
/// <summary>
/// Мировоззрение.
/// </summary>
[PgName("alignment")]
Alignment,
/// <summary>
/// Признак класса.
/// </summary>
+3 -3
View File
@@ -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>
/// Традиция заклинаний класса.
+48 -5
View File
@@ -3,6 +3,7 @@ using System.ComponentModel.DataAnnotations.Schema;
using Microsoft.EntityFrameworkCore;
using Pf2eModel.Model.Base;
using Pf2eModel.Model.Common;
using Pf2eModel.Model.Common.I18n;
using Pf2eModel.Model.Enum;
using Pf2eModel.Model.Structure.DeityRelation;
@@ -29,31 +30,73 @@ 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 = 7)]
[Comment("Заветы божества")]
public LocaleString Edicts { get; set; } = [];
/// <summary>
/// Анафемы божества.
/// </summary>
[Column(Order = 8)]
[Comment("Анафемы божества")]
public LocaleString Anathema { get; set; } = [];
/// <summary>
/// Религиозный символ божества.
/// </summary>
[Column(Order = 9)]
[Comment("Религиозный символ божества")]
public LocaleString ReligiousSymbol { get; set; } = [];
/// <summary>
/// Священное животное божества.
/// </summary>
[Column(Order = 10)]
[Comment("Священное животное божества")]
public LocaleString SacredAnimal { get; set; } = [];
/// <summary>
/// Область покровительства божества.
/// </summary>
[Column(Order = 11)]
[Comment("Область покровительства божества")]
public LocaleString AreaOfConcern { get; set; } = [];
/// <summary>
/// Атрибуты божества.
/// </summary>
public ICollection<DeityAttribute> DeityAttributes { get; set; } = new List<DeityAttribute>();
@@ -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; }
@@ -1,6 +1,7 @@
using System.ComponentModel.DataAnnotations;
using System.ComponentModel.DataAnnotations.Schema;
using Microsoft.EntityFrameworkCore;
using Pf2eModel.Model.Structure;
namespace Pf2eModel.Model.Structure.DeityRelation;
@@ -25,6 +26,13 @@ public class DeityDomain
[Comment("Идентификатор божества")]
public int DeityId { get; set; }
/// <summary>
/// Идентификатор домена.
/// </summary>
[Column(Order = 4)]
[Comment("Идентификатор домена")]
public int DomainId { get; set; }
/// <summary>
/// Флаг, указывающий, является ли домен основным для божества.
/// </summary>
@@ -35,7 +43,7 @@ public class DeityDomain
/// <summary>
/// Значение домена божества, например, "Свет", "Тьма" и т.д.
/// </summary>
[Column(Order = 4)]
[Column(Order = 5)]
[MaxLength(Pf2eDbContext.NameLength)]
public string Value { get; set; } = null!;
@@ -43,4 +51,9 @@ public class DeityDomain
/// Божество, к которому относится домен.
/// </summary>
public virtual Deity Deity { get; set; } = null!;
/// <summary>
/// Домен, связанный с божеством.
/// </summary>
public virtual Domain Domain { get; set; } = null!;
}
+78
View File
@@ -0,0 +1,78 @@
using System.ComponentModel.DataAnnotations;
using System.ComponentModel.DataAnnotations.Schema;
using Microsoft.EntityFrameworkCore;
using Pf2eModel.Model.Base;
using Pf2eModel.Model.Enum;
using Pf2eModel.Model.Structure.DeityRelation;
namespace Pf2eModel.Model.Structure;
/// <summary>
/// Домен.
/// </summary>
[EntityOfType(EntityType.Domain)]
public class Domain : IEntity
{
/// <inheritdoc/>
[Key]
[DatabaseGenerated(DatabaseGeneratedOption.None)]
[Column(Order = 1)]
[Comment("Идентификатор")]
public int Id { get; set; }
/// <inheritdoc/>
public Entity Entity { get; set; } = null!;
/// <summary>
/// Идентификатор заклинания домена.
/// </summary>
[Column(Order = 2)]
[Comment("Заклинание домена")]
public int DomainSpellId { get; set; }
/// <summary>
/// Идентификатор продвинутого заклинания домена.
/// </summary>
[Column(Order = 3)]
[Comment("Продвинутое заклинание домена")]
public int AdvancedDomainSpellId { get; set; }
/// <summary>
/// Идентификатор апокрифического заклинания домена.
/// </summary>
[Column(Order = 4)]
[Comment("Апокрифическое заклинание домена")]
public int? ApocryphalSpellId { get; set; }
/// <summary>
/// Идентификатор продвинутого апокрифического заклинания домена.
/// </summary>
[Column(Order = 5)]
[Comment("Продвинутое апокрифическое заклинание домена")]
public int? AdvancedApocryphalSpellId { get; set; }
/// <summary>
/// Заклинание домена.
/// </summary>
public virtual Spell DomainSpell { get; set; } = null!;
/// <summary>
/// Продвинутое заклинание домена.
/// </summary>
public virtual Spell AdvancedDomainSpell { get; set; } = null!;
/// <summary>
/// Апокрифическое заклинание домена.
/// </summary>
public virtual Spell? ApocryphalSpell { get; set; }
/// <summary>
/// Продвинутое апокрифическое заклинание домена.
/// </summary>
public virtual Spell? AdvancedApocryphalSpell { get; set; }
/// <summary>
/// Связи с божествами, которые используют этот домен.
/// </summary>
public virtual ICollection<DeityDomain> DeityDomains { get; set; } = new List<DeityDomain>();
}
+3 -1
View File
@@ -89,6 +89,8 @@ public partial class Pf2eDbContext : DbContext
public virtual DbSet<DeityWeapon> DeityWeapons { get; set; }
public virtual DbSet<Domain> Domains { get; set; }
public virtual DbSet<Entity> Entities { get; set; }
public virtual DbSet<EntityAlias> EntityAliases { get; set; }
@@ -161,7 +163,7 @@ public partial class Pf2eDbContext : DbContext
.MapEnum<AttributeValues>()
.MapEnum<ClassProgressionType>()
.MapEnum<ConditionGroup>()
.MapEnum<DeityCategory>()
.MapEnum<DeityType>()
.MapEnum<DeityFonts>()
.MapEnum<DeitySanctification>()
.MapEnum<ElementEnum>()
+42
View File
@@ -393,11 +393,53 @@ public partial class Pf2eDbContext
BindEntity(entity);
});
// Domain
modelBuilder.Entity<Domain>(entity =>
{
BindEntity(entity);
entity
.HasOne(d => d.DomainSpell)
.WithMany()
.HasForeignKey(d => d.DomainSpellId)
.OnDelete(DeleteBehavior.Cascade);
entity
.HasOne(d => d.AdvancedDomainSpell)
.WithMany()
.HasForeignKey(d => d.AdvancedDomainSpellId)
.OnDelete(DeleteBehavior.Cascade);
entity
.HasOne(d => d.ApocryphalSpell)
.WithMany()
.HasForeignKey(d => d.ApocryphalSpellId)
.OnDelete(DeleteBehavior.SetNull);
entity
.HasOne(d => d.AdvancedApocryphalSpell)
.WithMany()
.HasForeignKey(d => d.AdvancedApocryphalSpellId)
.OnDelete(DeleteBehavior.SetNull);
entity
.HasMany(d => d.DeityDomains)
.WithOne(dd => dd.Domain)
.HasForeignKey(dd => dd.DomainId)
.OnDelete(DeleteBehavior.Cascade);
});
// Deity
modelBuilder.Entity<Deity>(entity =>
{
BindEntity(entity);
BindLocaleString(entity, d => d.Anathema);
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)
.WithOne(e => e.Deity)