diff --git a/Documentation/Pf2eDataScrapper/AbstractEntityProcessor.md b/Documentation/Pf2eDataScrapper/AbstractEntityProcessor.md index eecf028..2e23884 100644 --- a/Documentation/Pf2eDataScrapper/AbstractEntityProcessor.md +++ b/Documentation/Pf2eDataScrapper/AbstractEntityProcessor.md @@ -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') diff --git a/Documentation/Pf2eDataScrapper/AonprdBuilderGlobals.Ignore.md b/Documentation/Pf2eDataScrapper/AonprdBuilderGlobals.Ignore.md new file mode 100644 index 0000000..15714cc --- /dev/null +++ b/Documentation/Pf2eDataScrapper/AonprdBuilderGlobals.Ignore.md @@ -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 Ignore { get; } +``` + +#### Property Value +[System\.Collections\.Generic\.List<](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')[>](https://docs.microsoft.com/en-us/dotnet/api/System.Collections.Generic.List-1 'System\.Collections\.Generic\.List\`1') \ No newline at end of file diff --git a/Documentation/Pf2eDataScrapper/AonprdBuilderGlobals.md b/Documentation/Pf2eDataScrapper/AonprdBuilderGlobals.md index 0ee21b8..472a542 100644 --- a/Documentation/Pf2eDataScrapper/AonprdBuilderGlobals.md +++ b/Documentation/Pf2eDataScrapper/AonprdBuilderGlobals.md @@ -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') | Словарей суффиксов для сущностей | diff --git a/Documentation/Pf2eDataScrapper/DeityProcessor.Add().md b/Documentation/Pf2eDataScrapper/DeityProcessor.Add().md new file mode 100644 index 0000000..53e3815 --- /dev/null +++ b/Documentation/Pf2eDataScrapper/DeityProcessor.Add().md @@ -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(); +``` \ No newline at end of file diff --git a/Documentation/Pf2eDataScrapper/DeityProcessor.MarkdownLinkRegex().md b/Documentation/Pf2eDataScrapper/DeityProcessor.MarkdownLinkRegex().md new file mode 100644 index 0000000..6117686 --- /dev/null +++ b/Documentation/Pf2eDataScrapper/DeityProcessor.MarkdownLinkRegex().md @@ -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:
+ +```csharp +\\[([^\\]]+)\\]\\([^)]+\\) +```
+Explanation:
+ +```csharp +○ Match '['.
+○ 1st capture group.
+ ○ Match a character other than ']' atomically at least once.
+○ Match the string "](".
+○ Match a character other than ')' atomically at least once.
+○ Match ')'.
+``` \ No newline at end of file diff --git a/Documentation/Pf2eDataScrapper/DeityProcessor.Object.md b/Documentation/Pf2eDataScrapper/DeityProcessor.Object.md new file mode 100644 index 0000000..fe58ea6 --- /dev/null +++ b/Documentation/Pf2eDataScrapper/DeityProcessor.Object.md @@ -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') \ No newline at end of file diff --git a/Documentation/Pf2eDataScrapper/DeityProcessor.Process().md b/Documentation/Pf2eDataScrapper/DeityProcessor.Process().md new file mode 100644 index 0000000..122f4c4 --- /dev/null +++ b/Documentation/Pf2eDataScrapper/DeityProcessor.Process().md @@ -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\(\)') \ No newline at end of file diff --git a/Documentation/Pf2eDataScrapper/DeityProcessor.ProcessAttributes().md b/Documentation/Pf2eDataScrapper/DeityProcessor.ProcessAttributes().md new file mode 100644 index 0000000..7f26201 --- /dev/null +++ b/Documentation/Pf2eDataScrapper/DeityProcessor.ProcessAttributes().md @@ -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(); +``` \ No newline at end of file diff --git a/Documentation/Pf2eDataScrapper/DeityProcessor.ProcessDomainMarkdown(string,bool).md b/Documentation/Pf2eDataScrapper/DeityProcessor.ProcessDomainMarkdown(string,bool).md new file mode 100644 index 0000000..3387c04 --- /dev/null +++ b/Documentation/Pf2eDataScrapper/DeityProcessor.ProcessDomainMarkdown(string,bool).md @@ -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 + + + +`markdown` [System\.String](https://docs.microsoft.com/en-us/dotnet/api/System.String 'System\.String') + +Markdown\-строка с доменами\. + + + +`isPrimary` [System\.Boolean](https://docs.microsoft.com/en-us/dotnet/api/System.Boolean 'System\.Boolean') + +Флаг, указывающий, являются ли домены основными\. \ No newline at end of file diff --git a/Documentation/Pf2eDataScrapper/DeityProcessor.ProcessDomains().md b/Documentation/Pf2eDataScrapper/DeityProcessor.ProcessDomains().md new file mode 100644 index 0000000..fe0752f --- /dev/null +++ b/Documentation/Pf2eDataScrapper/DeityProcessor.ProcessDomains().md @@ -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(); +``` \ No newline at end of file diff --git a/Documentation/Pf2eDataScrapper/DeityProcessor.ProcessFonts().md b/Documentation/Pf2eDataScrapper/DeityProcessor.ProcessFonts().md new file mode 100644 index 0000000..00b7312 --- /dev/null +++ b/Documentation/Pf2eDataScrapper/DeityProcessor.ProcessFonts().md @@ -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(); +``` \ No newline at end of file diff --git a/Documentation/Pf2eDataScrapper/DeityProcessor.ProcessSanctification().md b/Documentation/Pf2eDataScrapper/DeityProcessor.ProcessSanctification().md new file mode 100644 index 0000000..714a0b7 --- /dev/null +++ b/Documentation/Pf2eDataScrapper/DeityProcessor.ProcessSanctification().md @@ -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\.ProcessSanctification\(\) Method + +Обработка освящения\. + +```csharp +private void ProcessSanctification(); +``` \ No newline at end of file diff --git a/Documentation/Pf2eDataScrapper/DeityProcessor.ProcessSkills().md b/Documentation/Pf2eDataScrapper/DeityProcessor.ProcessSkills().md new file mode 100644 index 0000000..66e0991 --- /dev/null +++ b/Documentation/Pf2eDataScrapper/DeityProcessor.ProcessSkills().md @@ -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(); +``` \ No newline at end of file diff --git a/Documentation/Pf2eDataScrapper/DeityProcessor.ProcessSpells().md b/Documentation/Pf2eDataScrapper/DeityProcessor.ProcessSpells().md new file mode 100644 index 0000000..96509de --- /dev/null +++ b/Documentation/Pf2eDataScrapper/DeityProcessor.ProcessSpells().md @@ -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(); +``` \ No newline at end of file diff --git a/Documentation/Pf2eDataScrapper/DeityProcessor.ProcessWeapons().md b/Documentation/Pf2eDataScrapper/DeityProcessor.ProcessWeapons().md new file mode 100644 index 0000000..37aadd1 --- /dev/null +++ b/Documentation/Pf2eDataScrapper/DeityProcessor.ProcessWeapons().md @@ -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(); +``` \ No newline at end of file diff --git a/Documentation/Pf2eDataScrapper/DeityProcessor.Type.md b/Documentation/Pf2eDataScrapper/DeityProcessor.Type.md new file mode 100644 index 0000000..666cb6b --- /dev/null +++ b/Documentation/Pf2eDataScrapper/DeityProcessor.Type.md @@ -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') \ No newline at end of file diff --git a/Documentation/Pf2eDataScrapper/DeityProcessor.md b/Documentation/Pf2eDataScrapper/DeityProcessor.md new file mode 100644 index 0000000..ece2701 --- /dev/null +++ b/Documentation/Pf2eDataScrapper/DeityProcessor.md @@ -0,0 +1,29 @@ +#### [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') 🡒 [AbstractInputProcessor](AbstractInputProcessor.md 'Pf2eDataScrapper\.Processors\.Definitions\.AbstractInputProcessor') 🡒 [AbstractEntityProcessor](AbstractEntityProcessor.md 'Pf2eDataScrapper\.Importers\.Implementations\.Aonprd\.Processors\.AbstractEntityProcessor') 🡒 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\(\)') | Добавление основной сущности в контекст базы данных\. | +| [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\(\)') | Обработка божественной силы\. | +| [ProcessSanctification\(\)](DeityProcessor.ProcessSanctification().md 'Pf2eDataScrapper\.Importers\.Implementations\.Aonprd\.Processors\.Types\.DeityProcessor\.ProcessSanctification\(\)') | Обработка освящения\. | +| [ProcessSkills\(\)](DeityProcessor.ProcessSkills().md 'Pf2eDataScrapper\.Importers\.Implementations\.Aonprd\.Processors\.Types\.DeityProcessor\.ProcessSkills\(\)') | Обработка навыков божества\. | +| [ProcessSpells\(\)](DeityProcessor.ProcessSpells().md 'Pf2eDataScrapper\.Importers\.Implementations\.Aonprd\.Processors\.Types\.DeityProcessor\.ProcessSpells\(\)') | Обработка заклинаний божества\. | +| [ProcessWeapons\(\)](DeityProcessor.ProcessWeapons().md 'Pf2eDataScrapper\.Importers\.Implementations\.Aonprd\.Processors\.Types\.DeityProcessor\.ProcessWeapons\(\)') | Обработка оружия божества\. | diff --git a/Documentation/Pf2eDataScrapper/DomainProcessor.Add().md b/Documentation/Pf2eDataScrapper/DomainProcessor.Add().md new file mode 100644 index 0000000..d8faf07 --- /dev/null +++ b/Documentation/Pf2eDataScrapper/DomainProcessor.Add().md @@ -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(); +``` \ No newline at end of file diff --git a/Documentation/Pf2eDataScrapper/DomainProcessor.GetSpellIdFromMarkdown(string).md b/Documentation/Pf2eDataScrapper/DomainProcessor.GetSpellIdFromMarkdown(string).md new file mode 100644 index 0000000..998ccf7 --- /dev/null +++ b/Documentation/Pf2eDataScrapper/DomainProcessor.GetSpellIdFromMarkdown(string).md @@ -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 + + + +`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') +Идентификатор заклинания\. \ No newline at end of file diff --git a/Documentation/Pf2eDataScrapper/DomainProcessor.MarkdownLinkRegex().md b/Documentation/Pf2eDataScrapper/DomainProcessor.MarkdownLinkRegex().md new file mode 100644 index 0000000..7247162 --- /dev/null +++ b/Documentation/Pf2eDataScrapper/DomainProcessor.MarkdownLinkRegex().md @@ -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:
+ +```csharp +\\[([^\\]]+)\\]\\([^)]+\\) +```
+Explanation:
+ +```csharp +○ Match '['.
+○ 1st capture group.
+ ○ Match a character other than ']' atomically at least once.
+○ Match the string "](".
+○ Match a character other than ')' atomically at least once.
+○ Match ')'.
+``` \ No newline at end of file diff --git a/Documentation/Pf2eDataScrapper/DomainProcessor.Object.md b/Documentation/Pf2eDataScrapper/DomainProcessor.Object.md new file mode 100644 index 0000000..3a40e65 --- /dev/null +++ b/Documentation/Pf2eDataScrapper/DomainProcessor.Object.md @@ -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') \ No newline at end of file diff --git a/Documentation/Pf2eDataScrapper/DomainProcessor.Process().md b/Documentation/Pf2eDataScrapper/DomainProcessor.Process().md new file mode 100644 index 0000000..ac5d519 --- /dev/null +++ b/Documentation/Pf2eDataScrapper/DomainProcessor.Process().md @@ -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\(\)') \ No newline at end of file diff --git a/Documentation/Pf2eDataScrapper/DomainProcessor.ProcessDomainSpells().md b/Documentation/Pf2eDataScrapper/DomainProcessor.ProcessDomainSpells().md new file mode 100644 index 0000000..70f82ae --- /dev/null +++ b/Documentation/Pf2eDataScrapper/DomainProcessor.ProcessDomainSpells().md @@ -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(); +``` \ No newline at end of file diff --git a/Documentation/Pf2eDataScrapper/DomainProcessor.Type.md b/Documentation/Pf2eDataScrapper/DomainProcessor.Type.md new file mode 100644 index 0000000..efed438 --- /dev/null +++ b/Documentation/Pf2eDataScrapper/DomainProcessor.Type.md @@ -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') \ No newline at end of file diff --git a/Documentation/Pf2eDataScrapper/DomainProcessor.md b/Documentation/Pf2eDataScrapper/DomainProcessor.md new file mode 100644 index 0000000..0d616dd --- /dev/null +++ b/Documentation/Pf2eDataScrapper/DomainProcessor.md @@ -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') 🡒 [AbstractInputProcessor](AbstractInputProcessor.md 'Pf2eDataScrapper\.Processors\.Definitions\.AbstractInputProcessor') 🡒 [AbstractEntityProcessor](AbstractEntityProcessor.md 'Pf2eDataScrapper\.Importers\.Implementations\.Aonprd\.Processors\.AbstractEntityProcessor') 🡒 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\(\)') | Обработка заклинаний, связанных с доменом\. | diff --git a/Documentation/Pf2eDataScrapper/Pf2eDataScrapper.Importers.Implementations.Aonprd.Processors.Types.md b/Documentation/Pf2eDataScrapper/Pf2eDataScrapper.Importers.Implementations.Aonprd.Processors.Types.md index 03f2a85..8c51b04 100644 --- a/Documentation/Pf2eDataScrapper/Pf2eDataScrapper.Importers.Implementations.Aonprd.Processors.Types.md +++ b/Documentation/Pf2eDataScrapper/Pf2eDataScrapper.Importers.Implementations.Aonprd.Processors.Types.md @@ -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') | | diff --git a/Documentation/Pf2eModel/DeityDomain.Domain.md b/Documentation/Pf2eModel/DeityDomain.Domain.md new file mode 100644 index 0000000..048533b --- /dev/null +++ b/Documentation/Pf2eModel/DeityDomain.Domain.md @@ -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') \ No newline at end of file diff --git a/Documentation/Pf2eModel/DeityDomain.DomainId.md b/Documentation/Pf2eModel/DeityDomain.DomainId.md new file mode 100644 index 0000000..3e90ac3 --- /dev/null +++ b/Documentation/Pf2eModel/DeityDomain.DomainId.md @@ -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') \ No newline at end of file diff --git a/Documentation/Pf2eModel/DeityDomain.md b/Documentation/Pf2eModel/DeityDomain.md index b7bcfb1..3a7ebd9 100644 --- a/Documentation/Pf2eModel/DeityDomain.md +++ b/Documentation/Pf2eModel/DeityDomain.md @@ -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') | Значение домена божества, например, "Свет", "Тьма" и т\.д\. | diff --git a/Documentation/Pf2eModel/Domain.AdvancedApocryphalSpell.md b/Documentation/Pf2eModel/Domain.AdvancedApocryphalSpell.md new file mode 100644 index 0000000..c8534fc --- /dev/null +++ b/Documentation/Pf2eModel/Domain.AdvancedApocryphalSpell.md @@ -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') \ No newline at end of file diff --git a/Documentation/Pf2eModel/Domain.AdvancedApocryphalSpellId.md b/Documentation/Pf2eModel/Domain.AdvancedApocryphalSpellId.md new file mode 100644 index 0000000..f1fab1a --- /dev/null +++ b/Documentation/Pf2eModel/Domain.AdvancedApocryphalSpellId.md @@ -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 AdvancedApocryphalSpellId { get; set; } +``` + +#### Property Value +[System\.Nullable<](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')[>](https://docs.microsoft.com/en-us/dotnet/api/System.Nullable-1 'System\.Nullable\`1') \ No newline at end of file diff --git a/Documentation/Pf2eModel/Domain.AdvancedDomainSpell.md b/Documentation/Pf2eModel/Domain.AdvancedDomainSpell.md new file mode 100644 index 0000000..6254b3a --- /dev/null +++ b/Documentation/Pf2eModel/Domain.AdvancedDomainSpell.md @@ -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') \ No newline at end of file diff --git a/Documentation/Pf2eModel/Domain.AdvancedDomainSpellId.md b/Documentation/Pf2eModel/Domain.AdvancedDomainSpellId.md new file mode 100644 index 0000000..dea80a1 --- /dev/null +++ b/Documentation/Pf2eModel/Domain.AdvancedDomainSpellId.md @@ -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') \ No newline at end of file diff --git a/Documentation/Pf2eModel/Domain.ApocryphalSpell.md b/Documentation/Pf2eModel/Domain.ApocryphalSpell.md new file mode 100644 index 0000000..c1e5985 --- /dev/null +++ b/Documentation/Pf2eModel/Domain.ApocryphalSpell.md @@ -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') \ No newline at end of file diff --git a/Documentation/Pf2eModel/Domain.ApocryphalSpellId.md b/Documentation/Pf2eModel/Domain.ApocryphalSpellId.md new file mode 100644 index 0000000..8799f79 --- /dev/null +++ b/Documentation/Pf2eModel/Domain.ApocryphalSpellId.md @@ -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 ApocryphalSpellId { get; set; } +``` + +#### Property Value +[System\.Nullable<](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')[>](https://docs.microsoft.com/en-us/dotnet/api/System.Nullable-1 'System\.Nullable\`1') \ No newline at end of file diff --git a/Documentation/Pf2eModel/Domain.DeityDomains.md b/Documentation/Pf2eModel/Domain.DeityDomains.md new file mode 100644 index 0000000..d1fb34b --- /dev/null +++ b/Documentation/Pf2eModel/Domain.DeityDomains.md @@ -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 DeityDomains { get; set; } +``` + +#### Property Value +[System\.Collections\.Generic\.ICollection<](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')[>](https://docs.microsoft.com/en-us/dotnet/api/System.Collections.Generic.ICollection-1 'System\.Collections\.Generic\.ICollection\`1') \ No newline at end of file diff --git a/Documentation/Pf2eModel/Domain.DomainSpell.md b/Documentation/Pf2eModel/Domain.DomainSpell.md new file mode 100644 index 0000000..a1bce17 --- /dev/null +++ b/Documentation/Pf2eModel/Domain.DomainSpell.md @@ -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') \ No newline at end of file diff --git a/Documentation/Pf2eModel/Domain.DomainSpellId.md b/Documentation/Pf2eModel/Domain.DomainSpellId.md new file mode 100644 index 0000000..3170956 --- /dev/null +++ b/Documentation/Pf2eModel/Domain.DomainSpellId.md @@ -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') \ No newline at end of file diff --git a/Documentation/Pf2eModel/Domain.Entity.md b/Documentation/Pf2eModel/Domain.Entity.md new file mode 100644 index 0000000..0dba2ed --- /dev/null +++ b/Documentation/Pf2eModel/Domain.Entity.md @@ -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') \ No newline at end of file diff --git a/Documentation/Pf2eModel/Domain.Id.md b/Documentation/Pf2eModel/Domain.Id.md new file mode 100644 index 0000000..52e6d53 --- /dev/null +++ b/Documentation/Pf2eModel/Domain.Id.md @@ -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') \ No newline at end of file diff --git a/Documentation/Pf2eModel/Domain.md b/Documentation/Pf2eModel/Domain.md new file mode 100644 index 0000000..d71231d --- /dev/null +++ b/Documentation/Pf2eModel/Domain.md @@ -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') 🡒 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') | Идентификатор сущности\. | diff --git a/Documentation/Pf2eModel/EntityType.md b/Documentation/Pf2eModel/EntityType.md index e2fc266..76d4704 100644 --- a/Documentation/Pf2eModel/EntityType.md +++ b/Documentation/Pf2eModel/EntityType.md @@ -82,44 +82,50 @@ public enum EntityType Состояние\. + + +`Domain` 12 + +Домен божества\. + -`Deity` 12 +`Deity` 13 Божество\. -`Feat` 13 +`Feat` 14 Навык\. -`Heritage` 14 +`Heritage` 15 Наследие\. -`Spell` 15 +`Spell` 16 Заклианиние\. -`Ritual` 16 +`Ritual` 17 Ритуал\. -`Language` 17 +`Language` 18 Язык\. -`Rule` 18 +`Rule` 19 Правило\. \ No newline at end of file diff --git a/Documentation/Pf2eModel/IEntity.md b/Documentation/Pf2eModel/IEntity.md index 4cdc981..5383d58 100644 --- a/Documentation/Pf2eModel/IEntity.md +++ b/Documentation/Pf2eModel/IEntity.md @@ -17,6 +17,7 @@ Derived ↳ [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') diff --git a/Documentation/Pf2eModel/Pf2eModel.Model.Structure.md b/Documentation/Pf2eModel/Pf2eModel.Model.Structure.md index cb0d2ca..c8e971b 100644 --- a/Documentation/Pf2eModel/Pf2eModel.Model.Structure.md +++ b/Documentation/Pf2eModel/Pf2eModel.Model.Structure.md @@ -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') | Язык\. | diff --git a/Documentation/Pf2eModel/TraitType.md b/Documentation/Pf2eModel/TraitType.md index 5b27d88..3355aaa 100644 --- a/Documentation/Pf2eModel/TraitType.md +++ b/Documentation/Pf2eModel/TraitType.md @@ -16,14 +16,20 @@ public enum TraitType Обычный признак\. + + +`Alignment` 1 + +Мировоззрение\. + -`Class` 1 +`Class` 2 Признак класса\. -`Tradition` 2 +`Tradition` 3 Признак традиции\. \ No newline at end of file diff --git a/Pf2eDataScrapper/Importers/Implementations/Aonprd/Helpers/AonprdBuilderGlobals.cs b/Pf2eDataScrapper/Importers/Implementations/Aonprd/Helpers/AonprdBuilderGlobals.cs index 71787da..ed69a49 100644 --- a/Pf2eDataScrapper/Importers/Implementations/Aonprd/Helpers/AonprdBuilderGlobals.cs +++ b/Pf2eDataScrapper/Importers/Implementations/Aonprd/Helpers/AonprdBuilderGlobals.cs @@ -26,6 +26,11 @@ internal class AonprdBuilderGlobals /// public Dictionary TraitIds { get; } = []; + /// + /// Список идентификаторов сущностей, которые нужно игнорировать при обработке. + /// + public List Ignore { get; } = []; + /// /// Словарей суффиксов для сущностей /// @@ -63,6 +68,8 @@ internal class AonprdBuilderGlobals if (json is not null) { + Ignore = json.SelectToken("Ignore")?.ToObject>() ?? []; + SlugSuffixes = JsonToDictionary(json, "SlugSuffixes"); LegacyRemasterExtra = JsonToDictionary(json, "LegacyRemasterExtra"); MergeSources = JsonToDictionary(json, "MergeSources"); diff --git a/Pf2eDataScrapper/Importers/Implementations/Aonprd/Processors/AbstractEntityProcessor.cs b/Pf2eDataScrapper/Importers/Implementations/Aonprd/Processors/AbstractEntityProcessor.cs index 4d19957..25cfcc7 100644 --- a/Pf2eDataScrapper/Importers/Implementations/Aonprd/Processors/AbstractEntityProcessor.cs +++ b/Pf2eDataScrapper/Importers/Implementations/Aonprd/Processors/AbstractEntityProcessor.cs @@ -100,7 +100,14 @@ internal abstract class AbstractEntityProcessor( /// public virtual void Check() { - if (Globals.MergeSources.ContainsKey(Input.GetRequired("id"))) + string id = Input.GetRequired("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("source_markdown") ), diff --git a/Pf2eDataScrapper/Importers/Implementations/Aonprd/Processors/Types/DeityProcessor.cs b/Pf2eDataScrapper/Importers/Implementations/Aonprd/Processors/Types/DeityProcessor.cs new file mode 100644 index 0000000..bcaf0b4 --- /dev/null +++ b/Pf2eDataScrapper/Importers/Implementations/Aonprd/Processors/Types/DeityProcessor.cs @@ -0,0 +1,247 @@ +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.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) +{ + /// + public override EntityType Type => EntityType.Deity; + + /// + public override Deity Object { get; } = new(); + + /// + protected override void Add() => Context.Deities.Add(Object); + + /// + public override void Process() + { + base.Process(); + + // Установка категории божества + Object.Category = Input.EnumRequired("deity_category"); + + // Обработка божественной силы + ProcessFonts(); + + // Обработка освящения + ProcessSanctification(); + + // Обработка атрибутов + ProcessAttributes(); + + // Обработка доменов + ProcessDomains(); + + // Обработка заклинаний + ProcessSpells(); + + // Обработка оружия + ProcessWeapons(); + + // Обработка навыков + ProcessSkills(); + } + + /// + /// Обработка божественной силы. + /// + private void ProcessFonts() + { + JArray fonts = Input.GetOptional("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(font); + break; + } + } + } + + /// + /// Обработка освящения. + /// + private void ProcessSanctification() + { + // По умолчанию любое освящение + Object.Sanctification = DeitySanctification.Any; + Object.SanctificationMust = false; + } + + /// + /// Обработка атрибутов божества. + /// + private void ProcessAttributes() + { + JArray attributes = Input.GetOptional("attribute") ?? []; + foreach (JToken token in attributes) + { + AttributeValues attribute = Input.Enum(token.ToString()); + Object.DeityAttributes.Add(new() { Deity = Object, Attribute = attribute }); + } + } + + /// + /// Обработка доменов божества. + /// + private void ProcessDomains() + { + // Обработка основных доменов + string primaryDomainsMarkdown = Input.GetRequired("domain_primary_markdown"); + ProcessDomainMarkdown(primaryDomainsMarkdown, true); + + // Обработка альтернативных доменов + string alternateDomainsMarkdown = Input.GetRequired("domain_alternate_markdown"); + ProcessDomainMarkdown(alternateDomainsMarkdown, false); + } + + /// + /// Обработка markdown-строки с доменами. + /// + /// Markdown-строка с доменами. + /// Флаг, указывающий, являются ли домены основными. + 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, + } + ); + } + } + } + + /// + /// Обработка заклинаний божества. + /// + private void ProcessSpells() + { + string spellsMarkdown = Input.GetRequired("spell_markdown"); + MatchCollection matches = MarkdownLinkRegex().Matches(spellsMarkdown); + + int level = 1; + 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 = level, + } + ); + } + level++; + } + } + + /// + /// Обработка оружия божества. + /// + private void ProcessWeapons() + { + string weaponsMarkdown = Input.GetRequired("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 }); + } + } + + /// + /// Обработка навыков божества. + /// + private void ProcessSkills() + { + string skillsMarkdown = Input.GetRequired("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); + } + } + } + + /// + /// Регулярное выражение для извлечения названия из markdown-ссылки. + /// + /// Скомпилированное регулярное выражение. + [GeneratedRegex(@"\[([^\]]+)\]\([^)]+\)")] + private static partial Regex MarkdownLinkRegex(); +} diff --git a/Pf2eDataScrapper/Importers/Implementations/Aonprd/Processors/Types/DomainProcessor.cs b/Pf2eDataScrapper/Importers/Implementations/Aonprd/Processors/Types/DomainProcessor.cs new file mode 100644 index 0000000..dc7edf9 --- /dev/null +++ b/Pf2eDataScrapper/Importers/Implementations/Aonprd/Processors/Types/DomainProcessor.cs @@ -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) +{ + /// + public override EntityType Type => EntityType.Domain; + + /// + public override Domain Object { get; } = new(); + + /// + protected override void Add() => Context.Domains.Add(Object); + + /// + public override void Process() + { + base.Process(); + + // Обработка заклинаний домена + ProcessDomainSpells(); + } + + /// + /// Обработка заклинаний, связанных с доменом. + /// + private void ProcessDomainSpells() + { + // Обработка основного заклинания домена + string domainSpellMarkdown = Input.GetRequired("domain_spell_markdown"); + Object.DomainSpellId = GetSpellIdFromMarkdown(domainSpellMarkdown); + + // Обработка продвинутого заклинания домена + string advancedDomainSpellMarkdown = Input.GetRequired( + "advanced_domain_spell_markdown" + ); + Object.AdvancedDomainSpellId = GetSpellIdFromMarkdown(advancedDomainSpellMarkdown); + + // Обработка апокрифического заклинания (если есть) + string? apocryphalSpellMarkdown = Input.GetOptional("apocryphal_spell_markdown"); + if (!string.IsNullOrEmpty(apocryphalSpellMarkdown)) + { + Object.ApocryphalSpellId = GetSpellIdFromMarkdown(apocryphalSpellMarkdown); + } + + // Обработка продвинутого апокрифического заклинания (если есть) + string? advancedApocryphalSpellMarkdown = Input.GetOptional( + "advanced_apocryphal_spell_markdown" + ); + if (!string.IsNullOrEmpty(advancedApocryphalSpellMarkdown)) + { + Object.AdvancedApocryphalSpellId = GetSpellIdFromMarkdown( + advancedApocryphalSpellMarkdown + ); + } + } + + /// + /// Получение идентификатора заклинания из markdown-строки. + /// + /// Markdown-строка с информацией о заклинании. + /// Идентификатор заклинания. + 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; + } + + /// + /// Регулярное выражение для извлечения названия из markdown-ссылки. + /// + /// Скомпилированное регулярное выражение. + [GeneratedRegex(@"\[([^\]]+)\]\([^)]+\)")] + private static partial Regex MarkdownLinkRegex(); +} diff --git a/Pf2eDataScrapper/Resources/ImportAdaptation.json b/Pf2eDataScrapper/Resources/ImportAdaptation.json index 0a012bc..71fe152 100644 --- a/Pf2eDataScrapper/Resources/ImportAdaptation.json +++ b/Pf2eDataScrapper/Resources/ImportAdaptation.json @@ -1,5 +1,8 @@ { "Aonprd": { + "Ignore": [ + "domain-38" + ], "SlugSuffixes": { "spell-843": "initial", "feat-455": "initial", diff --git a/Pf2eModel/Migrations/20250913071004_1.Designer.cs b/Pf2eModel/Migrations/20250913084534_1.Designer.cs similarity index 95% rename from Pf2eModel/Migrations/20250913071004_1.Designer.cs rename to Pf2eModel/Migrations/20250913084534_1.Designer.cs index c30439f..ba9d372 100644 --- a/Pf2eModel/Migrations/20250913071004_1.Designer.cs +++ b/Pf2eModel/Migrations/20250913084534_1.Designer.cs @@ -13,7 +13,7 @@ using Pf2eModel.Model.Enum; namespace Pf2eModel.Migrations { [DbContext(typeof(Pf2eDbContext))] - [Migration("20250913071004_1")] + [Migration("20250913084534_1")] partial class _1 { /// @@ -34,7 +34,7 @@ namespace Pf2eModel.Migrations NpgsqlModelBuilderExtensions.HasPostgresEnum(modelBuilder, "deity_sanctification", new[] { "any", "holy", "unholy" }); 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" }); @@ -1195,6 +1195,12 @@ namespace Pf2eModel.Migrations .HasColumnOrder(2) .HasComment("Идентификатор божества"); + b.Property("DomainId") + .HasColumnType("integer") + .HasColumnName("domain_id") + .HasColumnOrder(4) + .HasComment("Идентификатор домена"); + b.Property("IsPrimary") .HasColumnType("boolean") .HasColumnName("is_primary") @@ -1206,7 +1212,7 @@ namespace Pf2eModel.Migrations .HasMaxLength(255) .HasColumnType("character varying(255)") .HasColumnName("value") - .HasColumnOrder(4); + .HasColumnOrder(5); b.HasKey("Id") .HasName("pk_deity_domains"); @@ -1214,6 +1220,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); }); @@ -1292,6 +1301,56 @@ namespace Pf2eModel.Migrations b.ToTable("deity_weapons", (string)null); }); + modelBuilder.Entity("Pf2eModel.Model.Structure.Domain", b => + { + b.Property("Id") + .HasColumnType("integer") + .HasColumnName("id") + .HasColumnOrder(1) + .HasComment("Идентификатор"); + + b.Property("AdvancedApocryphalSpellId") + .HasColumnType("integer") + .HasColumnName("advanced_apocryphal_spell_id") + .HasColumnOrder(5) + .HasComment("Продвинутое апокрифическое заклинание домена"); + + b.Property("AdvancedDomainSpellId") + .HasColumnType("integer") + .HasColumnName("advanced_domain_spell_id") + .HasColumnOrder(3) + .HasComment("Продвинутое заклинание домена"); + + b.Property("ApocryphalSpellId") + .HasColumnType("integer") + .HasColumnName("apocryphal_spell_id") + .HasColumnOrder(4) + .HasComment("Апокрифическое заклинание домена"); + + b.Property("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("Id") @@ -2406,7 +2465,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 => @@ -2442,6 +2510,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") @@ -2732,6 +2846,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"); diff --git a/Pf2eModel/Migrations/20250913071004_1.cs b/Pf2eModel/Migrations/20250913084534_1.cs similarity index 95% rename from Pf2eModel/Migrations/20250913071004_1.cs rename to Pf2eModel/Migrations/20250913084534_1.cs index 85c952c..cbb6fd7 100644 --- a/Pf2eModel/Migrations/20250913071004_1.cs +++ b/Pf2eModel/Migrations/20250913084534_1.cs @@ -24,7 +24,7 @@ namespace Pf2eModel.Migrations .Annotation("Npgsql:Enum:deity_sanctification", "any,holy,unholy") .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") @@ -792,27 +792,6 @@ namespace Pf2eModel.Migrations onDelete: ReferentialAction.Cascade); }); - migrationBuilder.CreateTable( - name: "deity_domains", - columns: table => new - { - id = table.Column(type: "integer", nullable: false, comment: "Идентификатор") - .Annotation("Npgsql:ValueGenerationStrategy", NpgsqlValueGenerationStrategy.IdentityByDefaultColumn), - deity_id = table.Column(type: "integer", nullable: false, comment: "Идентификатор божества"), - is_primary = table.Column(type: "boolean", nullable: false, comment: "Флаг основного домена"), - value = table.Column(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 @@ -1003,6 +982,51 @@ namespace Pf2eModel.Migrations onDelete: ReferentialAction.Cascade); }); + migrationBuilder.CreateTable( + name: "domains", + columns: table => new + { + id = table.Column(type: "integer", nullable: false, comment: "Идентификатор"), + domain_spell_id = table.Column(type: "integer", nullable: false, comment: "Заклинание домена"), + advanced_domain_spell_id = table.Column(type: "integer", nullable: false, comment: "Продвинутое заклинание домена"), + apocryphal_spell_id = table.Column(type: "integer", nullable: true, comment: "Апокрифическое заклинание домена"), + advanced_apocryphal_spell_id = table.Column(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 @@ -1146,6 +1170,34 @@ namespace Pf2eModel.Migrations onDelete: ReferentialAction.Cascade); }); + migrationBuilder.CreateTable( + name: "deity_domains", + columns: table => new + { + id = table.Column(type: "integer", nullable: false, comment: "Идентификатор") + .Annotation("Npgsql:ValueGenerationStrategy", NpgsqlValueGenerationStrategy.IdentityByDefaultColumn), + deity_id = table.Column(type: "integer", nullable: false, comment: "Идентификатор божества"), + is_primary = table.Column(type: "boolean", nullable: false, comment: "Флаг основного домена"), + domain_id = table.Column(type: "integer", nullable: false, comment: "Идентификатор домена"), + value = table.Column(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 @@ -1273,6 +1325,11 @@ namespace Pf2eModel.Migrations 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", @@ -1293,6 +1350,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", @@ -1521,6 +1598,9 @@ namespace Pf2eModel.Migrations migrationBuilder.DropTable( name: "backgrounds"); + migrationBuilder.DropTable( + name: "domains"); + migrationBuilder.DropTable( name: "deities"); @@ -1542,9 +1622,6 @@ namespace Pf2eModel.Migrations migrationBuilder.DropTable( name: "rituals"); - migrationBuilder.DropTable( - name: "spells"); - migrationBuilder.DropTable( name: "subclasses"); @@ -1554,6 +1631,9 @@ namespace Pf2eModel.Migrations migrationBuilder.DropTable( name: "feats"); + migrationBuilder.DropTable( + name: "spells"); + migrationBuilder.DropTable( name: "subclass_groups"); diff --git a/Pf2eModel/Migrations/Pf2eDbContextModelSnapshot.cs b/Pf2eModel/Migrations/Pf2eDbContextModelSnapshot.cs index 288db0a..55354e5 100644 --- a/Pf2eModel/Migrations/Pf2eDbContextModelSnapshot.cs +++ b/Pf2eModel/Migrations/Pf2eDbContextModelSnapshot.cs @@ -31,7 +31,7 @@ namespace Pf2eModel.Migrations NpgsqlModelBuilderExtensions.HasPostgresEnum(modelBuilder, "deity_sanctification", new[] { "any", "holy", "unholy" }); 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" }); @@ -1192,6 +1192,12 @@ namespace Pf2eModel.Migrations .HasColumnOrder(2) .HasComment("Идентификатор божества"); + b.Property("DomainId") + .HasColumnType("integer") + .HasColumnName("domain_id") + .HasColumnOrder(4) + .HasComment("Идентификатор домена"); + b.Property("IsPrimary") .HasColumnType("boolean") .HasColumnName("is_primary") @@ -1203,7 +1209,7 @@ namespace Pf2eModel.Migrations .HasMaxLength(255) .HasColumnType("character varying(255)") .HasColumnName("value") - .HasColumnOrder(4); + .HasColumnOrder(5); b.HasKey("Id") .HasName("pk_deity_domains"); @@ -1211,6 +1217,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); }); @@ -1289,6 +1298,56 @@ namespace Pf2eModel.Migrations b.ToTable("deity_weapons", (string)null); }); + modelBuilder.Entity("Pf2eModel.Model.Structure.Domain", b => + { + b.Property("Id") + .HasColumnType("integer") + .HasColumnName("id") + .HasColumnOrder(1) + .HasComment("Идентификатор"); + + b.Property("AdvancedApocryphalSpellId") + .HasColumnType("integer") + .HasColumnName("advanced_apocryphal_spell_id") + .HasColumnOrder(5) + .HasComment("Продвинутое апокрифическое заклинание домена"); + + b.Property("AdvancedDomainSpellId") + .HasColumnType("integer") + .HasColumnName("advanced_domain_spell_id") + .HasColumnOrder(3) + .HasComment("Продвинутое заклинание домена"); + + b.Property("ApocryphalSpellId") + .HasColumnType("integer") + .HasColumnName("apocryphal_spell_id") + .HasColumnOrder(4) + .HasComment("Апокрифическое заклинание домена"); + + b.Property("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("Id") @@ -2403,7 +2462,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 => @@ -2439,6 +2507,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") @@ -2729,6 +2843,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"); diff --git a/Pf2eModel/Model/Enum/TraitType.cs b/Pf2eModel/Model/Enum/TraitType.cs index 379ec1f..00f87d5 100644 --- a/Pf2eModel/Model/Enum/TraitType.cs +++ b/Pf2eModel/Model/Enum/TraitType.cs @@ -13,6 +13,12 @@ public enum TraitType [PgName("regular")] Regular, + /// + /// Мировоззрение. + /// + [PgName("alignment")] + Alignment, + /// /// Признак класса. /// diff --git a/Pf2eModel/Model/Structure/Domain.cs b/Pf2eModel/Model/Structure/Domain.cs index b783f57..6a98924 100644 --- a/Pf2eModel/Model/Structure/Domain.cs +++ b/Pf2eModel/Model/Structure/Domain.cs @@ -23,40 +23,32 @@ public class Domain : IEntity /// public Entity Entity { get; set; } = null!; - /// - /// Название домена. - /// - [Column(Order = 2)] - [MaxLength(Pf2eDbContext.NameLength)] - [Comment("Название домена")] - public string Name { get; set; } = null!; - /// /// Идентификатор заклинания домена. /// - [Column(Order = 3)] - [Comment("Идентификатор заклинания домена")] + [Column(Order = 2)] + [Comment("Заклинание домена")] public int DomainSpellId { get; set; } /// /// Идентификатор продвинутого заклинания домена. /// - [Column(Order = 4)] - [Comment("Идентификатор продвинутого заклинания домена")] + [Column(Order = 3)] + [Comment("Продвинутое заклинание домена")] public int AdvancedDomainSpellId { get; set; } /// /// Идентификатор апокрифического заклинания домена. /// - [Column(Order = 5)] - [Comment("Идентификатор апокрифического заклинания домена")] + [Column(Order = 4)] + [Comment("Апокрифическое заклинание домена")] public int? ApocryphalSpellId { get; set; } /// /// Идентификатор продвинутого апокрифического заклинания домена. /// - [Column(Order = 6)] - [Comment("Идентификатор продвинутого апокрифического заклинания домена")] + [Column(Order = 5)] + [Comment("Продвинутое апокрифическое заклинание домена")] public int? AdvancedApocryphalSpellId { get; set; } ///