From e1ec15d03ef83357377118f4fea302d8cc43e88c Mon Sep 17 00:00:00 2001 From: kozhilya Date: Fri, 18 Apr 2025 12:20:15 +0400 Subject: [PATCH] =?UTF-8?q?=D0=92=D1=8B=D0=BD=D0=B5=D1=81=D0=B5=D0=BD?= =?UTF-8?q?=D0=B8=D0=B5=20=D0=BC=D0=BE=D0=B4=D0=B5=D0=BB=D0=B8=20=D0=B2=20?= =?UTF-8?q?=D0=BE=D1=82=D0=B4=D0=B5=D0=BB=D1=8C=D0=BD=D1=8B=D0=B9=20=D0=BF?= =?UTF-8?q?=D1=80=D0=BE=D0=B5=D0=BA=D1=82?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- DatabaseViewer/App.config | 6 + DatabaseViewer/DatabaseViewer.csproj | 89 + DatabaseViewer/MainViewerForm.Designer.cs | 140 ++ DatabaseViewer/MainViewerForm.cs | 25 + DatabaseViewer/MainViewerForm.resx | 123 + DatabaseViewer/Program.cs | 22 + DatabaseViewer/Properties/AssemblyInfo.cs | 33 + .../Properties/Resources.Designer.cs | 71 + DatabaseViewer/Properties/Resources.resx | 117 + .../Properties/Settings.Designer.cs | 30 + DatabaseViewer/Properties/Settings.settings | 7 + Pf2eDataScrapper.sln | 11 +- Pf2eDataScrapper/Importers/DatabaseHelper.cs | 2 +- .../Aonprd/Compendium/AonprdReference.cs | 3 +- .../Aonprd/DataBuilder/AbstractProcessor.cs | 12 +- .../Aonprd/DataBuilder/AonprdEnumResolver.cs | 69 + .../DataBuilder/Processors/ActionProcessor.cs | 4 +- .../DataBuilder/Processors/TraitProcessor.cs | 4 +- .../DataBuilder/AbstractProcessor.cs | 12 +- .../DataBuilder/Processors/ActionProcessor.cs | 12 +- .../Processors/ConditionProcessor.cs | 4 +- .../Migrations/20250418062802_1.Designer.cs | 2054 ----------------- .../Migrations/20250418062802_1.cs | 1199 ---------- .../20250418063636_EnumUpdate.Designer.cs | 2054 ----------------- .../Migrations/20250418063636_EnumUpdate.cs | 106 - .../Migrations/Pf2eDbContextModelSnapshot.cs | 2051 ---------------- Pf2eDataScrapper/Model/Enum/ActionType.cs | 30 - Pf2eDataScrapper/Model/IEntity.cs | 11 - Pf2eDataScrapper/Pf2eDataScrapper.csproj | 8 +- Pf2eDataScrapper/Program.cs | 2 + .../20250418062358_Function.Designer.cs | 6 +- .../Migrations/20250418062358_Function.cs | 2 +- .../Model/Base/Entity.cs | 12 +- .../Model/Base/EntityAlias.cs | 4 +- .../Model/Base/Keywords/Keyword.cs | 2 +- .../Model/Base/Keywords/KeywordAlias.cs | 2 +- .../Model/Base/Source/EntitySource.cs | 2 +- .../Model/Base/Source/Source.cs | 4 +- .../Model/Base/Targets/EntityExternal.cs | 2 +- .../Model/Base/Targets/ExternalTarget.cs | 2 +- .../Model/Common/Frequency.cs | 2 +- .../Model/Common/Language.cs | 4 +- .../Model/Common/Training.cs | 2 +- .../Model/Enum/ActionCategory.cs | 2 +- Pf2eModel/Model/Enum/ActionType.cs | 24 + .../Model/Enum/AliasType.cs | 2 +- .../Model/Enum/AncestryVision.cs | 2 +- .../Model/Enum/AttributeValues.cs | 2 +- .../Model/Enum/ClassProgressionType.cs | 2 +- .../Model/Enum/ConditionGroup.cs | 2 +- .../Model/Enum/DeityCategory.cs | 2 +- .../Model/Enum/DeityFonts.cs | 2 +- .../Model/Enum/DeitySanctification.cs | 2 +- .../Model/Enum/EntityRarity.cs | 2 +- .../Model/Enum/EntityType.cs | 2 +- .../Model/Enum/FeatActionType.cs | 2 +- .../Model/Enum/FeatCategory.cs | 2 +- .../Model/Enum/Size.cs | 2 +- .../Model/Enum/SourceCategory.cs | 10 +- .../Model/Enum/SpellAreaType.cs | 2 +- .../Model/Enum/SpellDamageCategory.cs | 2 +- .../Model/Enum/SpellDamageKinds.cs | 2 +- .../Model/Enum/TrainingStage.cs | 2 +- .../Model/Enum/TraitType.cs | 2 +- Pf2eModel/Model/IEntity.cs | 11 + .../Model/Pf2eDbContext.cs | 37 +- .../Model/Pf2eDbContextModel.cs | 28 +- .../Model/Structure/Action.cs | 6 +- .../Model/Structure/Ancestry.cs | 8 +- .../AncestryRelation/AncestryBoost.cs | 2 +- .../AncestryRelation/AncestryItem.cs | 4 +- .../AncestryRelation/AncestryLanguage.cs | 4 +- .../Model/Structure/Background.cs | 6 +- .../BackgroundRelation/BackgroundBoost.cs | 4 +- .../BackgroundRelation/BackgroundItem.cs | 4 +- .../BackgroundRelation/BackgroundTraining.cs | 6 +- .../Model/Structure/Class.cs | 6 +- .../ClassRelation/ClassKeyAbility.cs | 4 +- .../ClassRelation/ClassProgression.cs | 6 +- .../Structure/ClassRelation/ClassTraining.cs | 4 +- .../Model/Structure/Condition.cs | 6 +- .../Model/Structure/Deity.cs | 10 +- .../Structure/DeityRelation/DeityAttribute.cs | 4 +- .../Structure/DeityRelation/DeityDomain.cs | 2 +- .../Structure/DeityRelation/DeitySpell.cs | 2 +- .../Structure/DeityRelation/DeityWeapon.cs | 2 +- .../Model/Structure/Feat.cs | 8 +- .../FeatRelation/FeatPrerequisite.cs | 2 +- .../Model/Structure/Heritage.cs | 4 +- .../Model/Structure/Spell.cs | 6 +- .../Structure/SpellRelation/SpellArea.cs | 4 +- .../Structure/SpellRelation/SpellDamage.cs | 4 +- .../Structure/SpellRelation/SpellDefense.cs | 2 +- .../Structure/SpellRelation/SpellRitual.cs | 2 +- .../Model/Structure/Trait.cs | 6 +- Pf2eModel/Pf2eModel.csproj | 24 + 96 files changed, 974 insertions(+), 7683 deletions(-) create mode 100644 DatabaseViewer/App.config create mode 100644 DatabaseViewer/DatabaseViewer.csproj create mode 100644 DatabaseViewer/MainViewerForm.Designer.cs create mode 100644 DatabaseViewer/MainViewerForm.cs create mode 100644 DatabaseViewer/MainViewerForm.resx create mode 100644 DatabaseViewer/Program.cs create mode 100644 DatabaseViewer/Properties/AssemblyInfo.cs create mode 100644 DatabaseViewer/Properties/Resources.Designer.cs create mode 100644 DatabaseViewer/Properties/Resources.resx create mode 100644 DatabaseViewer/Properties/Settings.Designer.cs create mode 100644 DatabaseViewer/Properties/Settings.settings create mode 100644 Pf2eDataScrapper/Importers/Implementations/Aonprd/DataBuilder/AonprdEnumResolver.cs delete mode 100644 Pf2eDataScrapper/Migrations/20250418062802_1.Designer.cs delete mode 100644 Pf2eDataScrapper/Migrations/20250418062802_1.cs delete mode 100644 Pf2eDataScrapper/Migrations/20250418063636_EnumUpdate.Designer.cs delete mode 100644 Pf2eDataScrapper/Migrations/20250418063636_EnumUpdate.cs delete mode 100644 Pf2eDataScrapper/Migrations/Pf2eDbContextModelSnapshot.cs delete mode 100644 Pf2eDataScrapper/Model/Enum/ActionType.cs delete mode 100644 Pf2eDataScrapper/Model/IEntity.cs rename {Pf2eDataScrapper => Pf2eModel}/Migrations/20250418062358_Function.Designer.cs (84%) rename {Pf2eDataScrapper => Pf2eModel}/Migrations/20250418062358_Function.cs (97%) rename {Pf2eDataScrapper => Pf2eModel}/Model/Base/Entity.cs (88%) rename {Pf2eDataScrapper => Pf2eModel}/Model/Base/EntityAlias.cs (87%) rename {Pf2eDataScrapper => Pf2eModel}/Model/Base/Keywords/Keyword.cs (90%) rename {Pf2eDataScrapper => Pf2eModel}/Model/Base/Keywords/KeywordAlias.cs (91%) rename {Pf2eDataScrapper => Pf2eModel}/Model/Base/Source/EntitySource.cs (94%) rename {Pf2eDataScrapper => Pf2eModel}/Model/Base/Source/Source.cs (87%) rename {Pf2eDataScrapper => Pf2eModel}/Model/Base/Targets/EntityExternal.cs (94%) rename {Pf2eDataScrapper => Pf2eModel}/Model/Base/Targets/ExternalTarget.cs (93%) rename {Pf2eDataScrapper => Pf2eModel}/Model/Common/Frequency.cs (91%) rename {Pf2eDataScrapper => Pf2eModel}/Model/Common/Language.cs (88%) rename {Pf2eDataScrapper => Pf2eModel}/Model/Common/Training.cs (90%) rename {Pf2eDataScrapper => Pf2eModel}/Model/Enum/ActionCategory.cs (92%) create mode 100644 Pf2eModel/Model/Enum/ActionType.cs rename {Pf2eDataScrapper => Pf2eModel}/Model/Enum/AliasType.cs (86%) rename {Pf2eDataScrapper => Pf2eModel}/Model/Enum/AncestryVision.cs (82%) rename {Pf2eDataScrapper => Pf2eModel}/Model/Enum/AttributeValues.cs (88%) rename {Pf2eDataScrapper => Pf2eModel}/Model/Enum/ClassProgressionType.cs (89%) rename {Pf2eDataScrapper => Pf2eModel}/Model/Enum/ConditionGroup.cs (87%) rename {Pf2eDataScrapper => Pf2eModel}/Model/Enum/DeityCategory.cs (84%) rename {Pf2eDataScrapper => Pf2eModel}/Model/Enum/DeityFonts.cs (81%) rename {Pf2eDataScrapper => Pf2eModel}/Model/Enum/DeitySanctification.cs (79%) rename {Pf2eDataScrapper => Pf2eModel}/Model/Enum/EntityRarity.cs (83%) rename {Pf2eDataScrapper => Pf2eModel}/Model/Enum/EntityType.cs (93%) rename {Pf2eDataScrapper => Pf2eModel}/Model/Enum/FeatActionType.cs (83%) rename {Pf2eDataScrapper => Pf2eModel}/Model/Enum/FeatCategory.cs (93%) rename {Pf2eDataScrapper => Pf2eModel}/Model/Enum/Size.cs (72%) rename {Pf2eDataScrapper => Pf2eModel}/Model/Enum/SourceCategory.cs (52%) rename {Pf2eDataScrapper => Pf2eModel}/Model/Enum/SpellAreaType.cs (88%) rename {Pf2eDataScrapper => Pf2eModel}/Model/Enum/SpellDamageCategory.cs (77%) rename {Pf2eDataScrapper => Pf2eModel}/Model/Enum/SpellDamageKinds.cs (79%) rename {Pf2eDataScrapper => Pf2eModel}/Model/Enum/TrainingStage.cs (74%) rename {Pf2eDataScrapper => Pf2eModel}/Model/Enum/TraitType.cs (76%) create mode 100644 Pf2eModel/Model/IEntity.cs rename {Pf2eDataScrapper => Pf2eModel}/Model/Pf2eDbContext.cs (84%) rename {Pf2eDataScrapper => Pf2eModel}/Model/Pf2eDbContextModel.cs (95%) rename {Pf2eDataScrapper => Pf2eModel}/Model/Structure/Action.cs (87%) rename {Pf2eDataScrapper => Pf2eModel}/Model/Structure/Ancestry.cs (84%) rename {Pf2eDataScrapper => Pf2eModel}/Model/Structure/AncestryRelation/AncestryBoost.cs (89%) rename {Pf2eDataScrapper => Pf2eModel}/Model/Structure/AncestryRelation/AncestryItem.cs (83%) rename {Pf2eDataScrapper => Pf2eModel}/Model/Structure/AncestryRelation/AncestryLanguage.cs (83%) rename {Pf2eDataScrapper => Pf2eModel}/Model/Structure/Background.cs (80%) rename {Pf2eDataScrapper => Pf2eModel}/Model/Structure/BackgroundRelation/BackgroundBoost.cs (82%) rename {Pf2eDataScrapper => Pf2eModel}/Model/Structure/BackgroundRelation/BackgroundItem.cs (83%) rename {Pf2eDataScrapper => Pf2eModel}/Model/Structure/BackgroundRelation/BackgroundTraining.cs (81%) rename {Pf2eDataScrapper => Pf2eModel}/Model/Structure/Class.cs (85%) rename {Pf2eDataScrapper => Pf2eModel}/Model/Structure/ClassRelation/ClassKeyAbility.cs (82%) rename {Pf2eDataScrapper => Pf2eModel}/Model/Structure/ClassRelation/ClassProgression.cs (82%) rename {Pf2eDataScrapper => Pf2eModel}/Model/Structure/ClassRelation/ClassTraining.cs (87%) rename {Pf2eDataScrapper => Pf2eModel}/Model/Structure/Condition.cs (79%) rename {Pf2eDataScrapper => Pf2eModel}/Model/Structure/Deity.cs (84%) rename {Pf2eDataScrapper => Pf2eModel}/Model/Structure/DeityRelation/DeityAttribute.cs (80%) rename {Pf2eDataScrapper => Pf2eModel}/Model/Structure/DeityRelation/DeityDomain.cs (90%) rename {Pf2eDataScrapper => Pf2eModel}/Model/Structure/DeityRelation/DeitySpell.cs (90%) rename {Pf2eDataScrapper => Pf2eModel}/Model/Structure/DeityRelation/DeityWeapon.cs (89%) rename {Pf2eDataScrapper => Pf2eModel}/Model/Structure/Feat.cs (85%) rename {Pf2eDataScrapper => Pf2eModel}/Model/Structure/FeatRelation/FeatPrerequisite.cs (89%) rename {Pf2eDataScrapper => Pf2eModel}/Model/Structure/Heritage.cs (84%) rename {Pf2eDataScrapper => Pf2eModel}/Model/Structure/Spell.cs (91%) rename {Pf2eDataScrapper => Pf2eModel}/Model/Structure/SpellRelation/SpellArea.cs (84%) rename {Pf2eDataScrapper => Pf2eModel}/Model/Structure/SpellRelation/SpellDamage.cs (90%) rename {Pf2eDataScrapper => Pf2eModel}/Model/Structure/SpellRelation/SpellDefense.cs (91%) rename {Pf2eDataScrapper => Pf2eModel}/Model/Structure/SpellRelation/SpellRitual.cs (91%) rename {Pf2eDataScrapper => Pf2eModel}/Model/Structure/Trait.cs (79%) create mode 100644 Pf2eModel/Pf2eModel.csproj diff --git a/DatabaseViewer/App.config b/DatabaseViewer/App.config new file mode 100644 index 0000000..56efbc7 --- /dev/null +++ b/DatabaseViewer/App.config @@ -0,0 +1,6 @@ + + + + + + \ No newline at end of file diff --git a/DatabaseViewer/DatabaseViewer.csproj b/DatabaseViewer/DatabaseViewer.csproj new file mode 100644 index 0000000..f1d9613 --- /dev/null +++ b/DatabaseViewer/DatabaseViewer.csproj @@ -0,0 +1,89 @@ + + + + + Debug + AnyCPU + {9590B32F-4C69-48FA-AD0F-E482FB4728AB} + WinExe + DatabaseViewer + DatabaseViewer + v4.7.2 + 512 + true + true + + + AnyCPU + true + full + false + bin\Debug\ + DEBUG;TRACE + prompt + 4 + + + AnyCPU + pdbonly + true + bin\Release\ + TRACE + prompt + 4 + + + + + + + + + + + + + + + + + Form + + + MainViewerForm.cs + + + + + MainViewerForm.cs + + + ResXFileCodeGenerator + Resources.Designer.cs + Designer + + + True + Resources.resx + + + SettingsSingleFileGenerator + Settings.Designer.cs + + + True + Settings.settings + True + + + + + + + + {ff82896a-92ca-4c63-8fdc-959ecc513773} + Pf2eDataScrapper + + + + \ No newline at end of file diff --git a/DatabaseViewer/MainViewerForm.Designer.cs b/DatabaseViewer/MainViewerForm.Designer.cs new file mode 100644 index 0000000..1baf642 --- /dev/null +++ b/DatabaseViewer/MainViewerForm.Designer.cs @@ -0,0 +1,140 @@ +namespace DatabaseViewer +{ + partial class MainViewerForm + { + /// + /// Обязательная переменная конструктора. + /// + private System.ComponentModel.IContainer components = null; + + /// + /// Освободить все используемые ресурсы. + /// + /// истинно, если управляемый ресурс должен быть удален; иначе ложно. + protected override void Dispose(bool disposing) + { + if (disposing && (components != null)) + { + components.Dispose(); + } + base.Dispose(disposing); + } + + #region Код, автоматически созданный конструктором форм Windows + + /// + /// Требуемый метод для поддержки конструктора — не изменяйте + /// содержимое этого метода с помощью редактора кода. + /// + private void InitializeComponent() + { + this.RootSplitContainer = new System.Windows.Forms.SplitContainer(); + this.InnerSplitContainer = new System.Windows.Forms.SplitContainer(); + this.EntityDataGridView = new System.Windows.Forms.DataGridView(); + this.menuStrip1 = new System.Windows.Forms.MenuStrip(); + this.TypeListBox = new System.Windows.Forms.ListBox(); + ((System.ComponentModel.ISupportInitialize)(this.RootSplitContainer)).BeginInit(); + this.RootSplitContainer.Panel1.SuspendLayout(); + this.RootSplitContainer.Panel2.SuspendLayout(); + this.RootSplitContainer.SuspendLayout(); + ((System.ComponentModel.ISupportInitialize)(this.InnerSplitContainer)).BeginInit(); + this.InnerSplitContainer.Panel1.SuspendLayout(); + this.InnerSplitContainer.SuspendLayout(); + ((System.ComponentModel.ISupportInitialize)(this.EntityDataGridView)).BeginInit(); + this.SuspendLayout(); + // + // RootSplitContainer + // + this.RootSplitContainer.Dock = System.Windows.Forms.DockStyle.Fill; + this.RootSplitContainer.Location = new System.Drawing.Point(0, 24); + this.RootSplitContainer.Name = "RootSplitContainer"; + // + // RootSplitContainer.Panel1 + // + this.RootSplitContainer.Panel1.Controls.Add(this.TypeListBox); + this.RootSplitContainer.Panel1MinSize = 200; + // + // RootSplitContainer.Panel2 + // + this.RootSplitContainer.Panel2.Controls.Add(this.InnerSplitContainer); + this.RootSplitContainer.Panel2MinSize = 400; + this.RootSplitContainer.Size = new System.Drawing.Size(984, 687); + this.RootSplitContainer.SplitterDistance = 200; + this.RootSplitContainer.TabIndex = 0; + // + // InnerSplitContainer + // + this.InnerSplitContainer.Dock = System.Windows.Forms.DockStyle.Fill; + this.InnerSplitContainer.Location = new System.Drawing.Point(0, 0); + this.InnerSplitContainer.Name = "InnerSplitContainer"; + this.InnerSplitContainer.Orientation = System.Windows.Forms.Orientation.Horizontal; + // + // InnerSplitContainer.Panel1 + // + this.InnerSplitContainer.Panel1.Controls.Add(this.EntityDataGridView); + this.InnerSplitContainer.Size = new System.Drawing.Size(780, 687); + this.InnerSplitContainer.SplitterDistance = 328; + this.InnerSplitContainer.TabIndex = 0; + // + // EntityDataGridView + // + this.EntityDataGridView.AllowUserToAddRows = false; + this.EntityDataGridView.AllowUserToDeleteRows = false; + this.EntityDataGridView.ColumnHeadersHeightSizeMode = System.Windows.Forms.DataGridViewColumnHeadersHeightSizeMode.AutoSize; + this.EntityDataGridView.Dock = System.Windows.Forms.DockStyle.Fill; + this.EntityDataGridView.Location = new System.Drawing.Point(0, 0); + this.EntityDataGridView.Name = "EntityDataGridView"; + this.EntityDataGridView.ReadOnly = true; + this.EntityDataGridView.Size = new System.Drawing.Size(780, 328); + this.EntityDataGridView.TabIndex = 0; + // + // menuStrip1 + // + this.menuStrip1.Location = new System.Drawing.Point(0, 0); + this.menuStrip1.Name = "menuStrip1"; + this.menuStrip1.Size = new System.Drawing.Size(984, 24); + this.menuStrip1.TabIndex = 1; + this.menuStrip1.Text = "menuStrip1"; + // + // TypeListBox + // + this.TypeListBox.Dock = System.Windows.Forms.DockStyle.Fill; + this.TypeListBox.FormattingEnabled = true; + this.TypeListBox.Location = new System.Drawing.Point(0, 0); + this.TypeListBox.Name = "TypeListBox"; + this.TypeListBox.Size = new System.Drawing.Size(200, 687); + this.TypeListBox.TabIndex = 0; + // + // MainViewerForm + // + this.AutoScaleDimensions = new System.Drawing.SizeF(6F, 13F); + this.AutoScaleMode = System.Windows.Forms.AutoScaleMode.Font; + this.ClientSize = new System.Drawing.Size(984, 711); + this.Controls.Add(this.RootSplitContainer); + this.Controls.Add(this.menuStrip1); + this.MainMenuStrip = this.menuStrip1; + this.Name = "MainViewerForm"; + this.Text = "Form1"; + this.RootSplitContainer.Panel1.ResumeLayout(false); + this.RootSplitContainer.Panel2.ResumeLayout(false); + ((System.ComponentModel.ISupportInitialize)(this.RootSplitContainer)).EndInit(); + this.RootSplitContainer.ResumeLayout(false); + this.InnerSplitContainer.Panel1.ResumeLayout(false); + ((System.ComponentModel.ISupportInitialize)(this.InnerSplitContainer)).EndInit(); + this.InnerSplitContainer.ResumeLayout(false); + ((System.ComponentModel.ISupportInitialize)(this.EntityDataGridView)).EndInit(); + this.ResumeLayout(false); + this.PerformLayout(); + + } + + #endregion + + private System.Windows.Forms.SplitContainer RootSplitContainer; + private System.Windows.Forms.SplitContainer InnerSplitContainer; + private System.Windows.Forms.DataGridView EntityDataGridView; + private System.Windows.Forms.MenuStrip menuStrip1; + private System.Windows.Forms.ListBox TypeListBox; + } +} + diff --git a/DatabaseViewer/MainViewerForm.cs b/DatabaseViewer/MainViewerForm.cs new file mode 100644 index 0000000..8793c7e --- /dev/null +++ b/DatabaseViewer/MainViewerForm.cs @@ -0,0 +1,25 @@ +using System; +using System.Collections.Generic; +using System.ComponentModel; +using System.Data; +using System.Drawing; +using System.Linq; +using System.Text; +using System.Threading.Tasks; +using System.Windows.Forms; +using Pf2eDataScrapper.Model; + +namespace DatabaseViewer +{ + public partial class MainViewerForm : Form + { + public Pf2eDbContext Context; + + public MainViewerForm() + { + InitializeComponent(); + + + } + } +} diff --git a/DatabaseViewer/MainViewerForm.resx b/DatabaseViewer/MainViewerForm.resx new file mode 100644 index 0000000..d5494e3 --- /dev/null +++ b/DatabaseViewer/MainViewerForm.resx @@ -0,0 +1,123 @@ + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + text/microsoft-resx + + + 2.0 + + + System.Resources.ResXResourceReader, System.Windows.Forms, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089 + + + System.Resources.ResXResourceWriter, System.Windows.Forms, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089 + + + 17, 17 + + \ No newline at end of file diff --git a/DatabaseViewer/Program.cs b/DatabaseViewer/Program.cs new file mode 100644 index 0000000..5352fa5 --- /dev/null +++ b/DatabaseViewer/Program.cs @@ -0,0 +1,22 @@ +using System; +using System.Collections.Generic; +using System.Linq; +using System.Threading.Tasks; +using System.Windows.Forms; + +namespace DatabaseViewer +{ + internal static class Program + { + /// + /// Главная точка входа для приложения. + /// + [STAThread] + static void Main() + { + Application.EnableVisualStyles(); + Application.SetCompatibleTextRenderingDefault(false); + Application.Run(new MainViewerForm()); + } + } +} diff --git a/DatabaseViewer/Properties/AssemblyInfo.cs b/DatabaseViewer/Properties/AssemblyInfo.cs new file mode 100644 index 0000000..db090ef --- /dev/null +++ b/DatabaseViewer/Properties/AssemblyInfo.cs @@ -0,0 +1,33 @@ +using System.Reflection; +using System.Runtime.CompilerServices; +using System.Runtime.InteropServices; + +// Общие сведения об этой сборке предоставляются следующим набором +// набора атрибутов. Измените значения этих атрибутов для изменения сведений, +// связанных со сборкой. +[assembly: AssemblyTitle("DatabaseViewer")] +[assembly: AssemblyDescription("")] +[assembly: AssemblyConfiguration("")] +[assembly: AssemblyCompany("")] +[assembly: AssemblyProduct("DatabaseViewer")] +[assembly: AssemblyCopyright("Copyright © 2025")] +[assembly: AssemblyTrademark("")] +[assembly: AssemblyCulture("")] + +// Установка значения False для параметра ComVisible делает типы в этой сборке невидимыми +// для компонентов COM. Если необходимо обратиться к типу в этой сборке через +// COM, следует установить атрибут ComVisible в TRUE для этого типа. +[assembly: ComVisible(false)] + +// Следующий GUID служит для идентификации библиотеки типов, если этот проект будет видимым для COM +[assembly: Guid("9590b32f-4c69-48fa-ad0f-e482fb4728ab")] + +// Сведения о версии сборки состоят из указанных ниже четырех значений: +// +// Основной номер версии +// Дополнительный номер версии +// Номер сборки +// Редакция +// +[assembly: AssemblyVersion("1.0.0.0")] +[assembly: AssemblyFileVersion("1.0.0.0")] diff --git a/DatabaseViewer/Properties/Resources.Designer.cs b/DatabaseViewer/Properties/Resources.Designer.cs new file mode 100644 index 0000000..ebd25de --- /dev/null +++ b/DatabaseViewer/Properties/Resources.Designer.cs @@ -0,0 +1,71 @@ +//------------------------------------------------------------------------------ +// +// Этот код создан программным средством. +// Версия среды выполнения: 4.0.30319.42000 +// +// Изменения в этом файле могут привести к неправильному поведению и будут утрачены, если +// код создан повторно. +// +//------------------------------------------------------------------------------ + +namespace DatabaseViewer.Properties +{ + + + /// + /// Класс ресурсов со строгим типом для поиска локализованных строк и пр. + /// + // Этот класс был автоматически создан при помощи StronglyTypedResourceBuilder + // класс с помощью таких средств, как ResGen или Visual Studio. + // Для добавления или удаления члена измените файл .ResX, а затем перезапустите ResGen + // с параметром /str или заново постройте свой VS-проект. + [global::System.CodeDom.Compiler.GeneratedCodeAttribute("System.Resources.Tools.StronglyTypedResourceBuilder", "4.0.0.0")] + [global::System.Diagnostics.DebuggerNonUserCodeAttribute()] + [global::System.Runtime.CompilerServices.CompilerGeneratedAttribute()] + internal class Resources + { + + private static global::System.Resources.ResourceManager resourceMan; + + private static global::System.Globalization.CultureInfo resourceCulture; + + [global::System.Diagnostics.CodeAnalysis.SuppressMessageAttribute("Microsoft.Performance", "CA1811:AvoidUncalledPrivateCode")] + internal Resources() + { + } + + /// + /// Возврат кэшированного экземпляра ResourceManager, используемого этим классом. + /// + [global::System.ComponentModel.EditorBrowsableAttribute(global::System.ComponentModel.EditorBrowsableState.Advanced)] + internal static global::System.Resources.ResourceManager ResourceManager + { + get + { + if ((resourceMan == null)) + { + global::System.Resources.ResourceManager temp = new global::System.Resources.ResourceManager("DatabaseViewer.Properties.Resources", typeof(Resources).Assembly); + resourceMan = temp; + } + return resourceMan; + } + } + + /// + /// Переопределяет свойство CurrentUICulture текущего потока для всех + /// подстановки ресурсов с помощью этого класса ресурсов со строгим типом. + /// + [global::System.ComponentModel.EditorBrowsableAttribute(global::System.ComponentModel.EditorBrowsableState.Advanced)] + internal static global::System.Globalization.CultureInfo Culture + { + get + { + return resourceCulture; + } + set + { + resourceCulture = value; + } + } + } +} diff --git a/DatabaseViewer/Properties/Resources.resx b/DatabaseViewer/Properties/Resources.resx new file mode 100644 index 0000000..af7dbeb --- /dev/null +++ b/DatabaseViewer/Properties/Resources.resx @@ -0,0 +1,117 @@ + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + text/microsoft-resx + + + 2.0 + + + System.Resources.ResXResourceReader, System.Windows.Forms, Version=2.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089 + + + System.Resources.ResXResourceWriter, System.Windows.Forms, Version=2.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089 + + \ No newline at end of file diff --git a/DatabaseViewer/Properties/Settings.Designer.cs b/DatabaseViewer/Properties/Settings.Designer.cs new file mode 100644 index 0000000..7cbd24e --- /dev/null +++ b/DatabaseViewer/Properties/Settings.Designer.cs @@ -0,0 +1,30 @@ +//------------------------------------------------------------------------------ +// +// This code was generated by a tool. +// Runtime Version:4.0.30319.42000 +// +// Changes to this file may cause incorrect behavior and will be lost if +// the code is regenerated. +// +//------------------------------------------------------------------------------ + +namespace DatabaseViewer.Properties +{ + + + [global::System.Runtime.CompilerServices.CompilerGeneratedAttribute()] + [global::System.CodeDom.Compiler.GeneratedCodeAttribute("Microsoft.VisualStudio.Editors.SettingsDesigner.SettingsSingleFileGenerator", "11.0.0.0")] + internal sealed partial class Settings : global::System.Configuration.ApplicationSettingsBase + { + + private static Settings defaultInstance = ((Settings) (global::System.Configuration.ApplicationSettingsBase.Synchronized(new Settings()))); + + public static Settings Default + { + get + { + return defaultInstance; + } + } + } +} diff --git a/DatabaseViewer/Properties/Settings.settings b/DatabaseViewer/Properties/Settings.settings new file mode 100644 index 0000000..3964565 --- /dev/null +++ b/DatabaseViewer/Properties/Settings.settings @@ -0,0 +1,7 @@ + + + + + + + diff --git a/Pf2eDataScrapper.sln b/Pf2eDataScrapper.sln index 13b25e5..cb8e73e 100644 --- a/Pf2eDataScrapper.sln +++ b/Pf2eDataScrapper.sln @@ -1,9 +1,12 @@  Microsoft Visual Studio Solution File, Format Version 12.00 # Visual Studio Version 17 -VisualStudioVersion = 17.13.35919.96 d17.13 +VisualStudioVersion = 17.13.35919.96 MinimumVisualStudioVersion = 10.0.40219.1 Project("{FAE04EC0-301F-11D3-BF4B-00C04F79EFBC}") = "Pf2eDataScrapper", "Pf2eDataScrapper\Pf2eDataScrapper.csproj", "{FF82896A-92CA-4C63-8FDC-959ECC513773}" + ProjectSection(ProjectDependencies) = postProject + {D32B7787-D912-4B21-B341-7C1F42F62D36} = {D32B7787-D912-4B21-B341-7C1F42F62D36} + EndProjectSection EndProject Project("{2150E333-8FDC-42A3-9474-1A3956D46DE8}") = "Элементы решения", "Элементы решения", "{754FC069-D67B-A9D7-50A1-8D1CA196D8F1}" ProjectSection(SolutionItems) = preProject @@ -12,6 +15,8 @@ Project("{2150E333-8FDC-42A3-9474-1A3956D46DE8}") = "Элементы решен EndProject Project("{2150E333-8FDC-42A3-9474-1A3956D46DE8}") = "output", "output", "{36D591C7-65C7-A0D1-1CBC-10CDE441BDC8}" EndProject +Project("{FAE04EC0-301F-11D3-BF4B-00C04F79EFBC}") = "Pf2eModel", "Pf2eModel\Pf2eModel.csproj", "{D32B7787-D912-4B21-B341-7C1F42F62D36}" +EndProject Global GlobalSection(SolutionConfigurationPlatforms) = preSolution Debug|Any CPU = Debug|Any CPU @@ -22,6 +27,10 @@ Global {FF82896A-92CA-4C63-8FDC-959ECC513773}.Debug|Any CPU.Build.0 = Debug|Any CPU {FF82896A-92CA-4C63-8FDC-959ECC513773}.Release|Any CPU.ActiveCfg = Release|Any CPU {FF82896A-92CA-4C63-8FDC-959ECC513773}.Release|Any CPU.Build.0 = Release|Any CPU + {D32B7787-D912-4B21-B341-7C1F42F62D36}.Debug|Any CPU.ActiveCfg = Debug|Any CPU + {D32B7787-D912-4B21-B341-7C1F42F62D36}.Debug|Any CPU.Build.0 = Debug|Any CPU + {D32B7787-D912-4B21-B341-7C1F42F62D36}.Release|Any CPU.ActiveCfg = Release|Any CPU + {D32B7787-D912-4B21-B341-7C1F42F62D36}.Release|Any CPU.Build.0 = Release|Any CPU EndGlobalSection GlobalSection(SolutionProperties) = preSolution HideSolutionNode = FALSE diff --git a/Pf2eDataScrapper/Importers/DatabaseHelper.cs b/Pf2eDataScrapper/Importers/DatabaseHelper.cs index 1b950c2..f6c5208 100644 --- a/Pf2eDataScrapper/Importers/DatabaseHelper.cs +++ b/Pf2eDataScrapper/Importers/DatabaseHelper.cs @@ -1,4 +1,4 @@ -using Pf2eDataScrapper.Model; +using Pf2eModel.Model; using Slugify; namespace Pf2eDataScrapper.Importers; diff --git a/Pf2eDataScrapper/Importers/Implementations/Aonprd/Compendium/AonprdReference.cs b/Pf2eDataScrapper/Importers/Implementations/Aonprd/Compendium/AonprdReference.cs index a54b95b..0558e90 100644 --- a/Pf2eDataScrapper/Importers/Implementations/Aonprd/Compendium/AonprdReference.cs +++ b/Pf2eDataScrapper/Importers/Implementations/Aonprd/Compendium/AonprdReference.cs @@ -1,5 +1,4 @@ - -namespace Pf2eDataScrapper.Importers.Implementations.Aonprd.Compendium; +namespace Pf2eDataScrapper.Importers.Implementations.Aonprd.Compendium; internal class AonprdReference(string id, string file) { diff --git a/Pf2eDataScrapper/Importers/Implementations/Aonprd/DataBuilder/AbstractProcessor.cs b/Pf2eDataScrapper/Importers/Implementations/Aonprd/DataBuilder/AbstractProcessor.cs index 64c8997..7be2b55 100644 --- a/Pf2eDataScrapper/Importers/Implementations/Aonprd/DataBuilder/AbstractProcessor.cs +++ b/Pf2eDataScrapper/Importers/Implementations/Aonprd/DataBuilder/AbstractProcessor.cs @@ -1,11 +1,11 @@ using LinqToDB; using Newtonsoft.Json.Linq; -using Pf2eDataScrapper.Model; -using Pf2eDataScrapper.Model.Base; -using Pf2eDataScrapper.Model.Base.Source; -using Pf2eDataScrapper.Model.Base.Targets; -using Pf2eDataScrapper.Model.Enum; -using Pf2eDataScrapper.Model.Structure; +using Pf2eModel.Model; +using Pf2eModel.Model.Base; +using Pf2eModel.Model.Base.Source; +using Pf2eModel.Model.Base.Targets; +using Pf2eModel.Model.Enum; +using Pf2eModel.Model.Structure; using System.Security.Cryptography; using System.Text; using System.Text.RegularExpressions; diff --git a/Pf2eDataScrapper/Importers/Implementations/Aonprd/DataBuilder/AonprdEnumResolver.cs b/Pf2eDataScrapper/Importers/Implementations/Aonprd/DataBuilder/AonprdEnumResolver.cs new file mode 100644 index 0000000..bb9bedf --- /dev/null +++ b/Pf2eDataScrapper/Importers/Implementations/Aonprd/DataBuilder/AonprdEnumResolver.cs @@ -0,0 +1,69 @@ +using Pf2eDataScrapper.Importers.Repositories; +using Pf2eModel.Model.Enum; +using System; +using System.Collections.Generic; +using System.Linq; +using System.Reflection; +using System.Text; +using System.Threading.Tasks; +using static LinqToDB.Reflection.Methods.LinqToDB.Insert; + +namespace Pf2eDataScrapper.Importers.Implementations.Aonprd.DataBuilder; +public static class AonprdEnumResolver +{ + private static readonly ICollection Solvers = [ + new Solver(new() { + { "Single Action", ActionType.SingleAction }, + { "Reaction or One Action", ActionType.SingleAction }, + { "Free Action or One Action", ActionType.SingleAction }, + { "Two Actions", ActionType.TwoActions }, + { "Three Actions", ActionType.ThreeActions }, + { "Single Action to Three Actions", ActionType.SingleToThreeActions }, + { "Single Action or more Actions", ActionType.SingleToThreeActions }, + { "Single Action or Two Actions", ActionType.SingleToTwoActions }, + { "Single Action to Two Actions", ActionType.SingleToTwoActions }, + }), + + new Solver(new() { + { "Rulebooks", SourceCategory.Rulebooks }, + { "Adventure Paths", SourceCategory.AdventurePaths }, + { "Lost Omens", SourceCategory.LostOmens }, + { "Adventures", SourceCategory.Adventures }, + { "Comics", SourceCategory.Comics }, + { "Blog Posts", SourceCategory.BlogPosts }, + { "Society", SourceCategory.Society }, + }), + ]; + + public static T ResolveEventArgs(string value) where T : struct, Enum + { + Type type = typeof(T); + + Solver? solver = Solvers.FirstOrDefault(s => s.Type == type); + + if (solver is null || solver.GetType() != typeof(Solver)) + { + throw new EnumResolverEnumUnknownException(type); + } + + Solver tSolver = (Solver) solver; + + return tSolver.Data.TryGetValue(value, out var data) ? data : throw new EnumResolverValueUnknownException(type, value); + } + + private abstract class Solver + { + public abstract Type Type { get; } + } + + private class Solver(Dictionary data) : Solver where T : struct, Enum + { + public override Type Type { get; } = typeof(T); + public Dictionary Data { get; } = data; + } + + public class EnumResolverEnumUnknownException(Type t) : Exception($"Can't resolve type '{t.FullName}': Solver not defined"); + + public class EnumResolverValueUnknownException(Type t, string value) : Exception($"Can't resolve type '{t.FullName}': Value '{value}' is not matched"); + +} diff --git a/Pf2eDataScrapper/Importers/Implementations/Aonprd/DataBuilder/Processors/ActionProcessor.cs b/Pf2eDataScrapper/Importers/Implementations/Aonprd/DataBuilder/Processors/ActionProcessor.cs index 160e487..a8854cf 100644 --- a/Pf2eDataScrapper/Importers/Implementations/Aonprd/DataBuilder/Processors/ActionProcessor.cs +++ b/Pf2eDataScrapper/Importers/Implementations/Aonprd/DataBuilder/Processors/ActionProcessor.cs @@ -1,5 +1,5 @@ using Newtonsoft.Json.Linq; -using Pf2eDataScrapper.Model.Enum; +using Pf2eModel.Model.Enum; namespace Pf2eDataScrapper.Importers.Implementations.Aonprd.DataBuilder.Processors; @@ -8,7 +8,7 @@ internal class ActionProcessor(ProcessorInput input) : AbstractProcessor(input) { public override EntityType Type => EntityType.Action; - public override Model.Structure.Action Object { get; } = new(); + public override Pf2eModel.Model.Structure.Action Object { get; } = new(); public override void Process() { diff --git a/Pf2eDataScrapper/Importers/Implementations/Aonprd/DataBuilder/Processors/TraitProcessor.cs b/Pf2eDataScrapper/Importers/Implementations/Aonprd/DataBuilder/Processors/TraitProcessor.cs index 47433fc..a94ac09 100644 --- a/Pf2eDataScrapper/Importers/Implementations/Aonprd/DataBuilder/Processors/TraitProcessor.cs +++ b/Pf2eDataScrapper/Importers/Implementations/Aonprd/DataBuilder/Processors/TraitProcessor.cs @@ -1,5 +1,5 @@ -using Pf2eDataScrapper.Model.Enum; -using Pf2eDataScrapper.Model.Structure; +using Pf2eModel.Model.Enum; +using Pf2eModel.Model.Structure; namespace Pf2eDataScrapper.Importers.Implementations.Aonprd.DataBuilder.Processors; diff --git a/Pf2eDataScrapper/Importers/Implementations/Pf2eFoundry/DataBuilder/AbstractProcessor.cs b/Pf2eDataScrapper/Importers/Implementations/Pf2eFoundry/DataBuilder/AbstractProcessor.cs index 9a25466..fc5b23f 100644 --- a/Pf2eDataScrapper/Importers/Implementations/Pf2eFoundry/DataBuilder/AbstractProcessor.cs +++ b/Pf2eDataScrapper/Importers/Implementations/Pf2eFoundry/DataBuilder/AbstractProcessor.cs @@ -1,11 +1,11 @@ using Newtonsoft.Json.Linq; using Pf2eDataScrapper.Importers.Implementations.Aonprd.DataBuilder; -using Pf2eDataScrapper.Model; -using Pf2eDataScrapper.Model.Base; -using Pf2eDataScrapper.Model.Base.Source; -using Pf2eDataScrapper.Model.Base.Targets; -using Pf2eDataScrapper.Model.Enum; -using Pf2eDataScrapper.Model.Structure; +using Pf2eModel.Model; +using Pf2eModel.Model.Base; +using Pf2eModel.Model.Base.Source; +using Pf2eModel.Model.Base.Targets; +using Pf2eModel.Model.Enum; +using Pf2eModel.Model.Structure; using System.Security.Cryptography; using System.Text; diff --git a/Pf2eDataScrapper/Importers/Implementations/Pf2eFoundry/DataBuilder/Processors/ActionProcessor.cs b/Pf2eDataScrapper/Importers/Implementations/Pf2eFoundry/DataBuilder/Processors/ActionProcessor.cs index c7ad38c..3b42d95 100644 --- a/Pf2eDataScrapper/Importers/Implementations/Pf2eFoundry/DataBuilder/Processors/ActionProcessor.cs +++ b/Pf2eDataScrapper/Importers/Implementations/Pf2eFoundry/DataBuilder/Processors/ActionProcessor.cs @@ -1,5 +1,5 @@ using Newtonsoft.Json.Linq; -using Pf2eDataScrapper.Model.Enum; +using Pf2eModel.Model.Enum; namespace Pf2eDataScrapper.Importers.Implementations.Pf2eFoundry.DataBuilder.Processors; @@ -8,17 +8,17 @@ internal class ActionProcessor(JObject input) : AbstractProcessor(input) { public override EntityType Type => EntityType.Action; - public override Model.Structure.Action Object { get; } = new(); + public override Pf2eModel.Model.Structure.Action Object { get; } = new(); public override void Process() { base.Process(); - + /* Object.Type = EnumRequired("system.actionType.value"); - // Object.Category = EnumOptional("system.category", ActionCategory.Unknown); + Object.Category = EnumOptional("system.category", ActionCategory.Unknown); Object.Actions = GetOptional("system.actions.value"); - // Object.DeathNote = GetOptional("system.deathNote"); - + Object.DeathNote = GetOptional("system.deathNote"); + */ JObject extra = new() { { "selfEffect", Input.SelectToken("system.selfEffect") } diff --git a/Pf2eDataScrapper/Importers/Implementations/Pf2eFoundry/DataBuilder/Processors/ConditionProcessor.cs b/Pf2eDataScrapper/Importers/Implementations/Pf2eFoundry/DataBuilder/Processors/ConditionProcessor.cs index a185340..33e7434 100644 --- a/Pf2eDataScrapper/Importers/Implementations/Pf2eFoundry/DataBuilder/Processors/ConditionProcessor.cs +++ b/Pf2eDataScrapper/Importers/Implementations/Pf2eFoundry/DataBuilder/Processors/ConditionProcessor.cs @@ -1,6 +1,6 @@ using Newtonsoft.Json.Linq; -using Pf2eDataScrapper.Model.Enum; -using Pf2eDataScrapper.Model.Structure; +using Pf2eModel.Model.Enum; +using Pf2eModel.Model.Structure; namespace Pf2eDataScrapper.Importers.Implementations.Pf2eFoundry.DataBuilder.Processors; diff --git a/Pf2eDataScrapper/Migrations/20250418062802_1.Designer.cs b/Pf2eDataScrapper/Migrations/20250418062802_1.Designer.cs deleted file mode 100644 index 5c3eea7..0000000 --- a/Pf2eDataScrapper/Migrations/20250418062802_1.Designer.cs +++ /dev/null @@ -1,2054 +0,0 @@ -// -using System; -using Microsoft.EntityFrameworkCore; -using Microsoft.EntityFrameworkCore.Infrastructure; -using Microsoft.EntityFrameworkCore.Migrations; -using Microsoft.EntityFrameworkCore.Storage.ValueConversion; -using Npgsql.EntityFrameworkCore.PostgreSQL.Metadata; -using Pf2eDataScrapper.Model; -using Pf2eDataScrapper.Model.Enum; - -#nullable disable - -namespace Pf2eDataScrapper.Migrations -{ - [DbContext(typeof(Pf2eDbContext))] - [Migration("20250418062802_1")] - partial class _1 - { - /// - protected override void BuildTargetModel(ModelBuilder modelBuilder) - { -#pragma warning disable 612, 618 - modelBuilder - .HasAnnotation("ProductVersion", "9.0.4") - .HasAnnotation("Relational:MaxIdentifierLength", 63); - - NpgsqlModelBuilderExtensions.HasPostgresEnum(modelBuilder, "action_category", new[] { "unknown", "offensive", "defensive", "interaction", "familiar", "army_tactic", "army_war_action", "kingdom_activity", "kingdom_feat", "kingdom_feature" }); - NpgsqlModelBuilderExtensions.HasPostgresEnum(modelBuilder, "action_type", new[] { "none", "1_action", "2_actions", "3_actions", "1-3_actions", "1-2_actions" }); - NpgsqlModelBuilderExtensions.HasPostgresEnum(modelBuilder, "alias_type", new[] { "legacy", "english", "legacy_english", "hobby", "other" }); - NpgsqlModelBuilderExtensions.HasPostgresEnum(modelBuilder, "ancestry_vision", new[] { "normal", "low-light-vision", "darkvision" }); - NpgsqlModelBuilderExtensions.HasPostgresEnum(modelBuilder, "attribute_values", new[] { "any", "str", "dex", "con", "int", "wis", "cha" }); - NpgsqlModelBuilderExtensions.HasPostgresEnum(modelBuilder, "class_progression_type", new[] { "entity", "ancestry_feat", "class_feat", "general_feat", "skill_feat", "skill_increase" }); - NpgsqlModelBuilderExtensions.HasPostgresEnum(modelBuilder, "condition_group", new[] { "unknown", "senses", "abilities", "death", "attitudes", "detection" }); - NpgsqlModelBuilderExtensions.HasPostgresEnum(modelBuilder, "deity_category", new[] { "deity", "pantheon", "covenant", "philosophy" }); - NpgsqlModelBuilderExtensions.HasPostgresEnum(modelBuilder, "deity_fonts", new[] { "none", "heal", "harm", "any" }); - NpgsqlModelBuilderExtensions.HasPostgresEnum(modelBuilder, "deity_sanctification", new[] { "holy", "unholy", "any" }); - NpgsqlModelBuilderExtensions.HasPostgresEnum(modelBuilder, "entity_rarity", new[] { "common", "uncommon", "rare", "unique" }); - NpgsqlModelBuilderExtensions.HasPostgresEnum(modelBuilder, "entity_type", new[] { "unknown", "trait", "action", "ancestry", "background", "backpack", "campaign_feature", "class", "condition", "deity", "feat", "heritage", "spell" }); - NpgsqlModelBuilderExtensions.HasPostgresEnum(modelBuilder, "feat_action_type", new[] { "passive", "action", "reaction", "free" }); - NpgsqlModelBuilderExtensions.HasPostgresEnum(modelBuilder, "feat_category", new[] { "ancestryfeature", "classfeature", "calling", "class", "skill", "general", "ancestry", "bonus", "deityboon", "curse", "pfsboon", "campaign_feature" }); - NpgsqlModelBuilderExtensions.HasPostgresEnum(modelBuilder, "size", new[] { "med", "tiny" }); - NpgsqlModelBuilderExtensions.HasPostgresEnum(modelBuilder, "source_category", new[] { "rulebook", "adventure-path", "lost-omens" }); - NpgsqlModelBuilderExtensions.HasPostgresEnum(modelBuilder, "spell_area_type", new[] { "burst", "emanation", "cone", "line", "square", "cube", "cylinder" }); - NpgsqlModelBuilderExtensions.HasPostgresEnum(modelBuilder, "spell_damage_category", new[] { "persistent", "splash" }); - NpgsqlModelBuilderExtensions.HasPostgresEnum(modelBuilder, "spell_damage_kinds", new[] { "damage", "healing", "any" }); - NpgsqlModelBuilderExtensions.HasPostgresEnum(modelBuilder, "training_stage", new[] { "untrained", "trained", "expert", "master", "legendary" }); - NpgsqlModelBuilderExtensions.HasPostgresEnum(modelBuilder, "trait_type", new[] { "regular", "tradition" }); - NpgsqlModelBuilderExtensions.UseIdentityByDefaultColumns(modelBuilder); - - modelBuilder.Entity("DeityTraining", b => - { - b.Property("DeityId") - .HasColumnType("integer") - .HasColumnName("deity_id"); - - b.Property("SkillsId") - .HasColumnType("integer") - .HasColumnName("skills_id"); - - b.HasKey("DeityId", "SkillsId") - .HasName("pk_deity_training"); - - b.HasIndex("SkillsId") - .HasDatabaseName("ix_deity_training_skills_id"); - - b.ToTable("deity_training", (string)null); - }); - - modelBuilder.Entity("EntityKeyword", b => - { - b.Property("EntitiesId") - .HasColumnType("integer") - .HasColumnName("entities_id"); - - b.Property("KeywordsId") - .HasColumnType("integer") - .HasColumnName("keywords_id"); - - b.HasKey("EntitiesId", "KeywordsId") - .HasName("pk_entity_keyword"); - - b.HasIndex("KeywordsId") - .HasDatabaseName("ix_entity_keyword_keywords_id"); - - b.ToTable("entity_keyword", (string)null); - }); - - modelBuilder.Entity("EntityTrait", b => - { - b.Property("EntitiesId") - .HasColumnType("integer") - .HasColumnName("entities_id"); - - b.Property("TraitsId") - .HasColumnType("integer") - .HasColumnName("traits_id"); - - b.HasKey("EntitiesId", "TraitsId") - .HasName("pk_entity_trait"); - - b.HasIndex("TraitsId") - .HasDatabaseName("ix_entity_trait_traits_id"); - - b.ToTable("entity_trait", (string)null); - }); - - modelBuilder.Entity("Pf2eDataScrapper.Model.Base.Entity", b => - { - b.Property("Id") - .ValueGeneratedOnAdd() - .HasColumnType("integer") - .HasColumnName("id") - .HasColumnOrder(1); - - NpgsqlPropertyBuilderExtensions.UseIdentityByDefaultColumn(b.Property("Id")); - - b.Property("Description") - .IsRequired() - .HasColumnType("text") - .HasColumnName("description") - .HasColumnOrder(6) - .HasComment("Текстовое описание объекта"); - - b.Property("Img") - .IsRequired() - .HasMaxLength(255) - .HasColumnType("character varying(255)") - .HasColumnName("img") - .HasColumnOrder(5) - .HasComment("Изображение объекта"); - - b.Property("IsChecked") - .HasColumnType("boolean") - .HasColumnName("is_checked") - .HasColumnOrder(9) - .HasComment("Флаг, указывающий, что объект был проверен и не требует автоматической перезаписи"); - - b.Property("IsTranslated") - .HasColumnType("boolean") - .HasColumnName("is_translated") - .HasColumnOrder(8) - .HasComment("Флаг, указывающий, что у объекта существует перевод"); - - b.Property("Name") - .IsRequired() - .HasMaxLength(255) - .HasColumnType("character varying(255)") - .HasColumnName("name") - .HasColumnOrder(2) - .HasComment("Отображаемое имя"); - - b.Property("Rarity") - .HasColumnType("entity_rarity") - .HasColumnName("rarity") - .HasColumnOrder(7); - - b.Property("Slug") - .IsRequired() - .HasMaxLength(255) - .HasColumnType("character varying(255)") - .HasColumnName("slug") - .HasColumnOrder(4) - .HasComment("Часть имени в URL"); - - b.Property("Type") - .HasColumnType("entity_type") - .HasColumnName("type") - .HasColumnOrder(3) - .HasComment("Тип объекта"); - - b.HasKey("Id") - .HasName("pk_entities"); - - b.ToTable("entities", (string)null); - }); - - modelBuilder.Entity("Pf2eDataScrapper.Model.Base.EntityAlias", b => - { - b.Property("EntityId") - .HasColumnType("integer") - .HasColumnName("entity_id") - .HasColumnOrder(1); - - b.Property("Type") - .HasColumnType("alias_type") - .HasColumnName("type") - .HasColumnOrder(2); - - b.Property("Alias") - .IsRequired() - .HasMaxLength(255) - .HasColumnType("character varying(255)") - .HasColumnName("alias") - .HasColumnOrder(3); - - b.HasKey("EntityId", "Type") - .HasName("pk_entity_aliases"); - - b.ToTable("entity_aliases", (string)null); - }); - - modelBuilder.Entity("Pf2eDataScrapper.Model.Base.Keywords.Keyword", b => - { - b.Property("Id") - .ValueGeneratedOnAdd() - .HasColumnType("integer") - .HasColumnName("id") - .HasColumnOrder(1); - - NpgsqlPropertyBuilderExtensions.UseIdentityByDefaultColumn(b.Property("Id")); - - b.Property("Slug") - .IsRequired() - .HasColumnType("text") - .HasColumnName("slug") - .HasColumnOrder(2); - - b.HasKey("Id") - .HasName("pk_keywords"); - - b.ToTable("keywords", (string)null); - }); - - modelBuilder.Entity("Pf2eDataScrapper.Model.Base.Keywords.KeywordAlias", b => - { - b.Property("Id") - .ValueGeneratedOnAdd() - .HasColumnType("integer") - .HasColumnName("id") - .HasColumnOrder(1); - - NpgsqlPropertyBuilderExtensions.UseIdentityByDefaultColumn(b.Property("Id")); - - b.Property("KeywordId") - .HasColumnType("integer") - .HasColumnName("keyword_id") - .HasColumnOrder(2); - - b.Property("Value") - .IsRequired() - .HasMaxLength(255) - .HasColumnType("character varying(255)") - .HasColumnName("value") - .HasColumnOrder(3); - - b.HasKey("Id") - .HasName("pk_keyword_aliases"); - - b.HasIndex("KeywordId") - .HasDatabaseName("ix_keyword_aliases_keyword_id"); - - b.ToTable("keyword_aliases", (string)null); - }); - - modelBuilder.Entity("Pf2eDataScrapper.Model.Base.Source.EntitySource", b => - { - b.Property("EntityId") - .HasColumnType("integer") - .HasColumnName("entity_id") - .HasColumnOrder(1); - - b.Property("SourceId") - .HasColumnType("integer") - .HasColumnName("source_id") - .HasColumnOrder(2); - - b.Property("IsRemaster") - .HasColumnType("boolean") - .HasColumnName("is_remaster") - .HasColumnOrder(4) - .HasComment("Флаг, указывающий, что объект является частью ремастера"); - - b.Property("Suffix") - .IsRequired() - .HasMaxLength(255) - .HasColumnType("character varying(255)") - .HasColumnName("suffix") - .HasColumnOrder(3) - .HasComment("Номер страницы, эррата и т.д."); - - b.HasKey("EntityId", "SourceId") - .HasName("pk_entity_sources"); - - b.HasIndex("SourceId") - .HasDatabaseName("ix_entity_sources_source_id"); - - b.ToTable("entity_sources", (string)null); - }); - - modelBuilder.Entity("Pf2eDataScrapper.Model.Base.Source.Source", b => - { - b.Property("Id") - .ValueGeneratedOnAdd() - .HasColumnType("integer") - .HasColumnName("id") - .HasColumnOrder(1); - - NpgsqlPropertyBuilderExtensions.UseIdentityByDefaultColumn(b.Property("Id")); - - b.Property("Category") - .HasColumnType("source_category") - .HasColumnName("category") - .HasColumnOrder(3); - - b.Property("Name") - .IsRequired() - .HasMaxLength(255) - .HasColumnType("character varying(255)") - .HasColumnName("name") - .HasColumnOrder(2); - - b.Property("ReleaseDate") - .HasColumnType("date") - .HasColumnName("release_date") - .HasColumnOrder(4); - - b.HasKey("Id") - .HasName("pk_sources"); - - b.ToTable("sources", (string)null); - }); - - modelBuilder.Entity("Pf2eDataScrapper.Model.Base.Targets.EntityExternal", b => - { - b.Property("EntityId") - .HasColumnType("integer") - .HasColumnName("entity_id") - .HasColumnOrder(0); - - b.Property("TargetId") - .HasColumnType("integer") - .HasColumnName("target_id") - .HasColumnOrder(1); - - b.Property("Md5") - .IsRequired() - .HasMaxLength(32) - .HasColumnType("character varying(32)") - .HasColumnName("md5") - .HasColumnOrder(3) - .HasComment("Контроль версии объекта"); - - b.Property("Suffix") - .IsRequired() - .HasMaxLength(255) - .HasColumnType("character varying(255)") - .HasColumnName("suffix") - .HasColumnOrder(2) - .HasComment("Часть URL до объекта. Для источников Foundry - полный UUID объекта"); - - b.HasKey("EntityId", "TargetId") - .HasName("pk_entity_externals"); - - b.HasIndex("TargetId") - .HasDatabaseName("ix_entity_externals_target_id"); - - b.ToTable("entity_externals", (string)null); - }); - - modelBuilder.Entity("Pf2eDataScrapper.Model.Base.Targets.ExternalTarget", b => - { - b.Property("Id") - .ValueGeneratedOnAdd() - .HasColumnType("integer") - .HasColumnName("id") - .HasColumnOrder(1); - - NpgsqlPropertyBuilderExtensions.UseIdentityByDefaultColumn(b.Property("Id")); - - b.Property("Icon") - .IsRequired() - .HasMaxLength(255) - .HasColumnType("character varying(255)") - .HasColumnName("icon") - .HasColumnOrder(3); - - b.Property("Name") - .IsRequired() - .HasMaxLength(255) - .HasColumnType("character varying(255)") - .HasColumnName("name") - .HasColumnOrder(2); - - b.Property("Prefix") - .IsRequired() - .HasMaxLength(255) - .HasColumnType("character varying(255)") - .HasColumnName("prefix") - .HasColumnOrder(3); - - b.HasKey("Id") - .HasName("pk_external_targets"); - - b.ToTable("external_targets", (string)null); - }); - - modelBuilder.Entity("Pf2eDataScrapper.Model.Common.Frequency", b => - { - b.Property("Id") - .ValueGeneratedOnAdd() - .HasColumnType("integer") - .HasColumnName("id") - .HasColumnOrder(1); - - NpgsqlPropertyBuilderExtensions.UseIdentityByDefaultColumn(b.Property("Id")); - - b.Property("Max") - .HasColumnType("integer") - .HasColumnName("max") - .HasColumnOrder(2); - - b.Property("Per") - .HasColumnType("integer") - .HasColumnName("per") - .HasColumnOrder(3); - - b.Property("Value") - .HasColumnType("integer") - .HasColumnName("value") - .HasColumnOrder(4); - - b.HasKey("Id") - .HasName("pk_frequencies"); - - b.ToTable("frequencies", (string)null); - }); - - modelBuilder.Entity("Pf2eDataScrapper.Model.Common.Language", b => - { - b.Property("Id") - .ValueGeneratedOnAdd() - .HasColumnType("integer") - .HasColumnName("id") - .HasColumnOrder(1); - - NpgsqlPropertyBuilderExtensions.UseIdentityByDefaultColumn(b.Property("Id")); - - b.Property("Name") - .IsRequired() - .HasMaxLength(255) - .HasColumnType("character varying(255)") - .HasColumnName("name") - .HasColumnOrder(2); - - b.Property("Rarity") - .HasColumnType("entity_rarity") - .HasColumnName("rarity") - .HasColumnOrder(4); - - b.Property("Slug") - .IsRequired() - .HasMaxLength(255) - .HasColumnType("character varying(255)") - .HasColumnName("slug") - .HasColumnOrder(3); - - b.HasKey("Id") - .HasName("pk_languages"); - - b.ToTable("languages", (string)null); - }); - - modelBuilder.Entity("Pf2eDataScrapper.Model.Common.Training", b => - { - b.Property("Id") - .ValueGeneratedOnAdd() - .HasColumnType("integer") - .HasColumnName("id") - .HasColumnOrder(1); - - NpgsqlPropertyBuilderExtensions.UseIdentityByDefaultColumn(b.Property("Id")); - - b.Property("Key") - .IsRequired() - .HasMaxLength(255) - .HasColumnType("character varying(255)") - .HasColumnName("key") - .HasColumnOrder(2); - - b.HasKey("Id") - .HasName("pk_trainings"); - - b.ToTable("trainings", (string)null); - }); - - modelBuilder.Entity("Pf2eDataScrapper.Model.Structure.Action", b => - { - b.Property("Id") - .HasColumnType("integer") - .HasColumnName("id") - .HasColumnOrder(1); - - b.Property("Actions") - .HasColumnType("integer") - .HasColumnName("actions") - .HasColumnOrder(3); - - b.Property("Extra") - .HasColumnType("text") - .HasColumnName("extra") - .HasColumnOrder(6); - - b.Property("IsFreeAction") - .HasColumnType("boolean") - .HasColumnName("is_free_action") - .HasColumnOrder(6); - - b.Property("IsPassive") - .HasColumnType("boolean") - .HasColumnName("is_passive") - .HasColumnOrder(6); - - b.Property("IsReaction") - .HasColumnType("boolean") - .HasColumnName("is_reaction") - .HasColumnOrder(5); - - b.Property("MaxActions") - .HasColumnType("integer") - .HasColumnName("max_actions") - .HasColumnOrder(4); - - b.Property("Type") - .HasColumnType("action_type") - .HasColumnName("type") - .HasColumnOrder(2); - - b.HasKey("Id") - .HasName("pk_actions"); - - b.ToTable("actions", (string)null); - }); - - modelBuilder.Entity("Pf2eDataScrapper.Model.Structure.Ancestry", b => - { - b.Property("Id") - .HasColumnType("integer") - .HasColumnName("id") - .HasColumnOrder(1); - - b.Property("Hp") - .HasColumnType("integer") - .HasColumnName("hp") - .HasColumnOrder(3); - - b.Property("Reach") - .HasColumnType("integer") - .HasColumnName("reach") - .HasColumnOrder(4); - - b.Property("Size") - .HasColumnType("size") - .HasColumnName("size") - .HasColumnOrder(2); - - b.Property("Speed") - .HasColumnType("integer") - .HasColumnName("speed") - .HasColumnOrder(5); - - b.Property("Vision") - .HasColumnType("ancestry_vision") - .HasColumnName("vision") - .HasColumnOrder(6); - - b.HasKey("Id") - .HasName("pk_ancestries"); - - b.ToTable("ancestries", (string)null); - }); - - modelBuilder.Entity("Pf2eDataScrapper.Model.Structure.AncestryRelation.AncestryBoost", b => - { - b.Property("Id") - .ValueGeneratedOnAdd() - .HasColumnType("integer") - .HasColumnName("id") - .HasColumnOrder(1); - - NpgsqlPropertyBuilderExtensions.UseIdentityByDefaultColumn(b.Property("Id")); - - b.Property("AncestryId") - .HasColumnType("integer") - .HasColumnName("ancestry_id") - .HasColumnOrder(2); - - b.Property("Boost") - .HasColumnType("boolean") - .HasColumnName("boost") - .HasColumnOrder(3); - - b.Property("Value") - .HasColumnType("attribute_values") - .HasColumnName("value") - .HasColumnOrder(4); - - b.HasKey("Id") - .HasName("pk_ancestry_boosts"); - - b.HasIndex("AncestryId") - .HasDatabaseName("ix_ancestry_boosts_ancestry_id"); - - b.ToTable("ancestry_boosts", (string)null); - }); - - modelBuilder.Entity("Pf2eDataScrapper.Model.Structure.AncestryRelation.AncestryItem", b => - { - b.Property("AncestryId") - .HasColumnType("integer") - .HasColumnName("ancestry_id") - .HasColumnOrder(1); - - b.Property("ItemId") - .HasColumnType("integer") - .HasColumnName("item_id") - .HasColumnOrder(2); - - b.Property("Level") - .HasColumnType("integer") - .HasColumnName("level") - .HasColumnOrder(3); - - b.HasKey("AncestryId", "ItemId") - .HasName("pk_ancestry_items"); - - b.HasIndex("ItemId") - .HasDatabaseName("ix_ancestry_items_item_id"); - - b.ToTable("ancestry_items", (string)null); - }); - - modelBuilder.Entity("Pf2eDataScrapper.Model.Structure.AncestryRelation.AncestryLanguage", b => - { - b.Property("AncestryId") - .HasColumnType("integer") - .HasColumnName("ancestry_id") - .HasColumnOrder(1); - - b.Property("LanguageId") - .HasColumnType("integer") - .HasColumnName("language_id") - .HasColumnOrder(2); - - b.Property("IsAdditional") - .HasColumnType("boolean") - .HasColumnName("is_additional") - .HasColumnOrder(3); - - b.HasKey("AncestryId", "LanguageId") - .HasName("pk_ancestry_languages"); - - b.HasIndex("LanguageId") - .HasDatabaseName("ix_ancestry_languages_language_id"); - - b.ToTable("ancestry_languages", (string)null); - }); - - modelBuilder.Entity("Pf2eDataScrapper.Model.Structure.Background", b => - { - b.Property("Id") - .HasColumnType("integer") - .HasColumnName("id") - .HasColumnOrder(1); - - b.HasKey("Id") - .HasName("pk_backgrounds"); - - b.ToTable("backgrounds", (string)null); - }); - - modelBuilder.Entity("Pf2eDataScrapper.Model.Structure.BackgroundRelation.BackgroundBoost", b => - { - b.Property("Id") - .HasColumnType("integer") - .HasColumnName("id") - .HasColumnOrder(1); - - b.Property("Attribute") - .HasColumnType("attribute_values") - .HasColumnName("attribute") - .HasColumnOrder(3); - - b.Property("BackgroundId") - .HasColumnType("integer") - .HasColumnName("background_id") - .HasColumnOrder(2); - - b.HasKey("Id") - .HasName("pk_background_boosts"); - - b.HasIndex("BackgroundId") - .HasDatabaseName("ix_background_boosts_background_id"); - - b.ToTable("background_boosts", (string)null); - }); - - modelBuilder.Entity("Pf2eDataScrapper.Model.Structure.BackgroundRelation.BackgroundItem", b => - { - b.Property("BackgroundId") - .HasColumnType("integer") - .HasColumnName("background_id") - .HasColumnOrder(1); - - b.Property("EntityId") - .HasColumnType("integer") - .HasColumnName("entity_id") - .HasColumnOrder(2); - - b.Property("Level") - .HasColumnType("integer") - .HasColumnName("level") - .HasColumnOrder(3); - - b.HasKey("BackgroundId", "EntityId") - .HasName("pk_background_items"); - - b.HasIndex("EntityId") - .HasDatabaseName("ix_background_items_entity_id"); - - b.ToTable("background_items", (string)null); - }); - - modelBuilder.Entity("Pf2eDataScrapper.Model.Structure.BackgroundRelation.BackgroundTraining", b => - { - b.Property("Id") - .HasColumnType("integer") - .HasColumnName("id") - .HasColumnOrder(1); - - b.Property("BackgroundId") - .HasColumnType("integer") - .HasColumnName("background_id") - .HasColumnOrder(2); - - b.Property("Level") - .HasColumnType("training_stage") - .HasColumnName("level") - .HasColumnOrder(4); - - b.Property("TrainingId") - .HasColumnType("integer") - .HasColumnName("training_id") - .HasColumnOrder(3); - - b.HasKey("Id") - .HasName("pk_background_skills"); - - b.HasIndex("BackgroundId") - .HasDatabaseName("ix_background_skills_background_id"); - - b.HasIndex("TrainingId") - .HasDatabaseName("ix_background_skills_training_id"); - - b.ToTable("background_skills", (string)null); - }); - - modelBuilder.Entity("Pf2eDataScrapper.Model.Structure.Class", b => - { - b.Property("Id") - .HasColumnType("integer") - .HasColumnName("id") - .HasColumnOrder(1); - - b.Property("AdditionalTrainedSkills") - .HasColumnType("integer") - .HasColumnName("additional_trained_skills") - .HasColumnOrder(6); - - b.Property("Hp") - .HasColumnType("integer") - .HasColumnName("hp") - .HasColumnOrder(3); - - b.Property("Perception") - .HasColumnType("integer") - .HasColumnName("perception") - .HasColumnOrder(4); - - b.Property("Spellcasting") - .HasColumnType("boolean") - .HasColumnName("spellcasting") - .HasColumnOrder(5); - - b.HasKey("Id") - .HasName("pk_classes"); - - b.ToTable("classes", (string)null); - }); - - modelBuilder.Entity("Pf2eDataScrapper.Model.Structure.ClassRelation.ClassKeyAbility", b => - { - b.Property("Id") - .ValueGeneratedOnAdd() - .HasColumnType("integer") - .HasColumnName("id") - .HasColumnOrder(1); - - NpgsqlPropertyBuilderExtensions.UseIdentityByDefaultColumn(b.Property("Id")); - - b.Property("ClassId") - .HasColumnType("integer") - .HasColumnName("class_id") - .HasColumnOrder(2); - - b.Property("Value") - .HasColumnType("attribute_values") - .HasColumnName("value") - .HasColumnOrder(3); - - b.HasKey("Id") - .HasName("pk_class_key_abilities"); - - b.HasIndex("ClassId") - .HasDatabaseName("ix_class_key_abilities_class_id"); - - b.ToTable("class_key_abilities", (string)null); - }); - - modelBuilder.Entity("Pf2eDataScrapper.Model.Structure.ClassRelation.ClassProgression", b => - { - b.Property("Id") - .ValueGeneratedOnAdd() - .HasColumnType("integer") - .HasColumnName("id") - .HasColumnOrder(1); - - NpgsqlPropertyBuilderExtensions.UseIdentityByDefaultColumn(b.Property("Id")); - - b.Property("ClassId") - .HasColumnType("integer") - .HasColumnName("class_id") - .HasColumnOrder(2); - - b.Property("EntityId") - .HasColumnType("integer") - .HasColumnName("entity_id") - .HasColumnOrder(5); - - b.Property("Level") - .HasColumnType("integer") - .HasColumnName("level") - .HasColumnOrder(31); - - b.Property("Type") - .HasColumnType("class_progression_type") - .HasColumnName("type") - .HasColumnOrder(4); - - b.HasKey("Id") - .HasName("pk_class_progressions"); - - b.HasIndex("ClassId") - .HasDatabaseName("ix_class_progressions_class_id"); - - b.HasIndex("EntityId") - .HasDatabaseName("ix_class_progressions_entity_id"); - - b.ToTable("class_progressions", (string)null); - }); - - modelBuilder.Entity("Pf2eDataScrapper.Model.Structure.ClassRelation.ClassTraining", b => - { - b.Property("Id") - .ValueGeneratedOnAdd() - .HasColumnType("integer") - .HasColumnName("id") - .HasColumnOrder(1); - - NpgsqlPropertyBuilderExtensions.UseIdentityByDefaultColumn(b.Property("Id")); - - b.Property("ClassId") - .HasColumnType("integer") - .HasColumnName("class_id") - .HasColumnOrder(2); - - b.Property("Name") - .HasMaxLength(255) - .HasColumnType("character varying(255)") - .HasColumnName("name") - .HasColumnOrder(4); - - b.Property("Stage") - .HasColumnType("integer") - .HasColumnName("stage") - .HasColumnOrder(5); - - b.Property("TrainingId") - .HasColumnType("integer") - .HasColumnName("training_id") - .HasColumnOrder(3); - - b.HasKey("Id") - .HasName("pk_class_trainings"); - - b.HasIndex("ClassId") - .HasDatabaseName("ix_class_trainings_class_id"); - - b.HasIndex("TrainingId") - .HasDatabaseName("ix_class_trainings_training_id"); - - b.ToTable("class_trainings", (string)null); - }); - - modelBuilder.Entity("Pf2eDataScrapper.Model.Structure.Condition", b => - { - b.Property("Id") - .HasColumnType("integer") - .HasColumnName("id") - .HasColumnOrder(1); - - b.Property("Extra") - .HasColumnType("text") - .HasColumnName("extra") - .HasColumnOrder(3); - - b.Property("Group") - .HasColumnType("condition_group") - .HasColumnName("group") - .HasColumnOrder(2); - - b.HasKey("Id") - .HasName("pk_conditions"); - - b.ToTable("conditions", (string)null); - }); - - modelBuilder.Entity("Pf2eDataScrapper.Model.Structure.Deity", b => - { - b.Property("Id") - .HasColumnType("integer") - .HasColumnName("id") - .HasColumnOrder(1); - - b.Property("Category") - .HasColumnType("deity_category") - .HasColumnName("category") - .HasColumnOrder(2); - - b.Property("Fonts") - .HasColumnType("deity_fonts") - .HasColumnName("fonts") - .HasColumnOrder(3); - - b.Property("Sanctification") - .HasColumnType("deity_sanctification") - .HasColumnName("sanctification") - .HasColumnOrder(4); - - b.Property("SanctificationMust") - .HasColumnType("boolean") - .HasColumnName("sanctification_must") - .HasColumnOrder(5); - - b.HasKey("Id") - .HasName("pk_deities"); - - b.ToTable("deities", (string)null); - }); - - modelBuilder.Entity("Pf2eDataScrapper.Model.Structure.DeityRelation.DeityAttribute", b => - { - b.Property("DeityId") - .HasColumnType("integer") - .HasColumnName("deity_id") - .HasColumnOrder(1); - - b.Property("Attribute") - .HasColumnType("attribute_values") - .HasColumnName("attribute") - .HasColumnOrder(2); - - b.HasKey("DeityId", "Attribute") - .HasName("pk_deity_attributes"); - - b.ToTable("deity_attributes", (string)null); - }); - - modelBuilder.Entity("Pf2eDataScrapper.Model.Structure.DeityRelation.DeityDomain", b => - { - b.Property("Id") - .ValueGeneratedOnAdd() - .HasColumnType("integer") - .HasColumnName("id") - .HasColumnOrder(1); - - NpgsqlPropertyBuilderExtensions.UseIdentityByDefaultColumn(b.Property("Id")); - - b.Property("DeityId") - .HasColumnType("integer") - .HasColumnName("deity_id") - .HasColumnOrder(2); - - b.Property("IsPrimary") - .HasColumnType("boolean") - .HasColumnName("is_primary") - .HasColumnOrder(3); - - b.Property("Value") - .IsRequired() - .HasMaxLength(255) - .HasColumnType("character varying(255)") - .HasColumnName("value") - .HasColumnOrder(4); - - b.HasKey("Id") - .HasName("pk_deity_domains"); - - b.HasIndex("DeityId") - .HasDatabaseName("ix_deity_domains_deity_id"); - - b.ToTable("deity_domains", (string)null); - }); - - modelBuilder.Entity("Pf2eDataScrapper.Model.Structure.DeityRelation.DeitySpell", b => - { - b.Property("Id") - .ValueGeneratedOnAdd() - .HasColumnType("integer") - .HasColumnName("id") - .HasColumnOrder(1); - - NpgsqlPropertyBuilderExtensions.UseIdentityByDefaultColumn(b.Property("Id")); - - b.Property("DeityId") - .HasColumnType("integer") - .HasColumnName("deity_id") - .HasColumnOrder(2); - - b.Property("Level") - .HasColumnType("integer") - .HasColumnName("level") - .HasColumnOrder(3); - - b.Property("SpellId") - .HasColumnType("integer") - .HasColumnName("spell_id") - .HasColumnOrder(4); - - b.HasKey("Id") - .HasName("pk_deity_spells"); - - b.HasIndex("DeityId") - .HasDatabaseName("ix_deity_spells_deity_id"); - - b.HasIndex("SpellId") - .HasDatabaseName("ix_deity_spells_spell_id"); - - b.ToTable("deity_spells", (string)null); - }); - - modelBuilder.Entity("Pf2eDataScrapper.Model.Structure.DeityRelation.DeityWeapon", b => - { - b.Property("Id") - .ValueGeneratedOnAdd() - .HasColumnType("integer") - .HasColumnName("id") - .HasColumnOrder(1); - - NpgsqlPropertyBuilderExtensions.UseIdentityByDefaultColumn(b.Property("Id")); - - b.Property("DeityId") - .HasColumnType("integer") - .HasColumnName("deity_id") - .HasColumnOrder(2); - - b.Property("Weapon") - .IsRequired() - .HasMaxLength(255) - .HasColumnType("character varying(255)") - .HasColumnName("weapon") - .HasColumnOrder(3); - - b.HasKey("Id") - .HasName("pk_deity_weapons"); - - b.HasIndex("DeityId") - .HasDatabaseName("ix_deity_weapons_deity_id"); - - b.ToTable("deity_weapons", (string)null); - }); - - modelBuilder.Entity("Pf2eDataScrapper.Model.Structure.Feat", b => - { - b.Property("Id") - .HasColumnType("integer") - .HasColumnName("id") - .HasColumnOrder(1); - - b.Property("Actions") - .HasColumnType("integer") - .HasColumnName("actions") - .HasColumnOrder(4); - - b.Property("Category") - .HasColumnType("action_category") - .HasColumnName("category") - .HasColumnOrder(3); - - b.Property("Extra") - .HasColumnType("text") - .HasColumnName("extra") - .HasColumnOrder(10); - - b.Property("Level") - .HasColumnType("integer") - .HasColumnName("level") - .HasColumnOrder(5); - - b.Property("LevelTaken") - .HasColumnType("integer") - .HasColumnName("level_taken") - .HasColumnOrder(6); - - b.Property("Location") - .HasMaxLength(255) - .HasColumnType("character varying(255)") - .HasColumnName("location") - .HasColumnOrder(8); - - b.Property("MaxTakable") - .HasColumnType("integer") - .HasColumnName("max_takable") - .HasColumnOrder(7); - - b.Property("OnlyLevel1") - .HasColumnType("boolean") - .HasColumnName("only_level1") - .HasColumnOrder(9); - - b.Property("Type") - .HasColumnType("action_type") - .HasColumnName("type") - .HasColumnOrder(2); - - b.HasKey("Id") - .HasName("pk_feats"); - - b.ToTable("feats", (string)null); - }); - - modelBuilder.Entity("Pf2eDataScrapper.Model.Structure.FeatRelation.FeatPrerequisite", b => - { - b.Property("Id") - .ValueGeneratedOnAdd() - .HasColumnType("integer") - .HasColumnName("id") - .HasColumnOrder(1); - - NpgsqlPropertyBuilderExtensions.UseIdentityByDefaultColumn(b.Property("Id")); - - b.Property("FeatId") - .HasColumnType("integer") - .HasColumnName("feat_id") - .HasColumnOrder(2); - - b.Property("Value") - .IsRequired() - .HasMaxLength(255) - .HasColumnType("character varying(255)") - .HasColumnName("value") - .HasColumnOrder(3); - - b.HasKey("Id") - .HasName("pk_feat_prerequisites"); - - b.HasIndex("FeatId") - .HasDatabaseName("ix_feat_prerequisites_feat_id"); - - b.ToTable("feat_prerequisites", (string)null); - }); - - modelBuilder.Entity("Pf2eDataScrapper.Model.Structure.Heritage", b => - { - b.Property("Id") - .HasColumnType("integer") - .HasColumnName("id") - .HasColumnOrder(1); - - b.Property("AncestryId") - .HasColumnType("integer") - .HasColumnName("ancestry_id") - .HasColumnOrder(2); - - b.HasKey("Id") - .HasName("pk_heritages"); - - b.HasIndex("AncestryId") - .HasDatabaseName("ix_heritages_ancestry_id"); - - b.ToTable("heritages", (string)null); - }); - - modelBuilder.Entity("Pf2eDataScrapper.Model.Structure.Spell", b => - { - b.Property("Id") - .HasColumnType("integer") - .HasColumnName("id") - .HasColumnOrder(1); - - b.Property("CanHeightening") - .HasColumnType("boolean") - .HasColumnName("can_heightening") - .HasColumnOrder(11); - - b.Property("Cost") - .HasColumnType("integer") - .HasColumnName("cost") - .HasColumnOrder(3); - - b.Property("Counteraction") - .HasColumnType("boolean") - .HasColumnName("counteraction") - .HasColumnOrder(4); - - b.Property("Duration") - .IsRequired() - .HasMaxLength(255) - .HasColumnType("character varying(255)") - .HasColumnName("duration") - .HasColumnOrder(6); - - b.Property("Level") - .HasColumnType("integer") - .HasColumnName("level") - .HasColumnOrder(2); - - b.Property("Range") - .IsRequired() - .HasMaxLength(255) - .HasColumnType("character varying(255)") - .HasColumnName("range") - .HasColumnOrder(7); - - b.Property("Requirements") - .IsRequired() - .HasMaxLength(255) - .HasColumnType("character varying(255)") - .HasColumnName("requirements") - .HasColumnOrder(8); - - b.Property("Sustained") - .HasColumnType("boolean") - .HasColumnName("sustained") - .HasColumnOrder(5); - - b.Property("Target") - .IsRequired() - .HasMaxLength(255) - .HasColumnType("character varying(255)") - .HasColumnName("target") - .HasColumnOrder(9); - - b.Property("Time") - .IsRequired() - .HasMaxLength(255) - .HasColumnType("character varying(255)") - .HasColumnName("time") - .HasColumnOrder(10); - - b.HasKey("Id") - .HasName("pk_spells"); - - b.ToTable("spells", (string)null); - }); - - modelBuilder.Entity("Pf2eDataScrapper.Model.Structure.SpellRelation.SpellArea", b => - { - b.Property("SpellId") - .HasColumnType("integer") - .HasColumnName("spell_id") - .HasColumnOrder(1); - - b.Property("Details") - .HasMaxLength(255) - .HasColumnType("character varying(255)") - .HasColumnName("details") - .HasColumnOrder(2); - - b.Property("Type") - .HasColumnType("spell_area_type") - .HasColumnName("type") - .HasColumnOrder(3); - - b.Property("Value") - .HasColumnType("integer") - .HasColumnName("value") - .HasColumnOrder(4); - - b.HasKey("SpellId") - .HasName("pk_spell_areas"); - - b.ToTable("spell_areas", (string)null); - }); - - modelBuilder.Entity("Pf2eDataScrapper.Model.Structure.SpellRelation.SpellDamage", b => - { - b.Property("Id") - .ValueGeneratedOnAdd() - .HasColumnType("integer") - .HasColumnName("id") - .HasColumnOrder(1); - - NpgsqlPropertyBuilderExtensions.UseIdentityByDefaultColumn(b.Property("Id")); - - b.Property("ApplyMod") - .HasColumnType("boolean") - .HasColumnName("apply_mod") - .HasColumnOrder(4); - - b.Property("Category") - .HasColumnType("spell_damage_category") - .HasColumnName("category") - .HasColumnOrder(5); - - b.Property("Formula") - .IsRequired() - .HasMaxLength(255) - .HasColumnType("character varying(255)") - .HasColumnName("formula") - .HasColumnOrder(6); - - b.Property("Key") - .IsRequired() - .HasMaxLength(255) - .HasColumnType("character varying(255)") - .HasColumnName("key") - .HasColumnOrder(3); - - b.Property("Kinds") - .HasColumnType("spell_damage_kinds") - .HasColumnName("kinds") - .HasColumnOrder(7); - - b.Property("Materials") - .HasMaxLength(255) - .HasColumnType("character varying(255)") - .HasColumnName("materials") - .HasColumnOrder(8); - - b.Property("SpellId") - .HasColumnType("integer") - .HasColumnName("spell_id") - .HasColumnOrder(2); - - b.Property("Type") - .IsRequired() - .HasMaxLength(255) - .HasColumnType("character varying(255)") - .HasColumnName("type") - .HasColumnOrder(9); - - b.HasKey("Id") - .HasName("pk_spell_damages"); - - b.HasIndex("SpellId") - .HasDatabaseName("ix_spell_damages_spell_id"); - - b.ToTable("spell_damages", (string)null); - }); - - modelBuilder.Entity("Pf2eDataScrapper.Model.Structure.SpellRelation.SpellDefense", b => - { - b.Property("Id") - .ValueGeneratedOnAdd() - .HasColumnType("integer") - .HasColumnName("id") - .HasColumnOrder(1); - - NpgsqlPropertyBuilderExtensions.UseIdentityByDefaultColumn(b.Property("Id")); - - b.Property("IsBasic") - .HasColumnType("boolean") - .HasColumnName("is_basic") - .HasColumnOrder(4); - - b.Property("IsPassive") - .HasColumnType("boolean") - .HasColumnName("is_passive") - .HasColumnOrder(3); - - b.Property("SpellId") - .HasColumnType("integer") - .HasColumnName("spell_id") - .HasColumnOrder(2); - - b.Property("Statistic") - .IsRequired() - .HasMaxLength(255) - .HasColumnType("character varying(255)") - .HasColumnName("statistic") - .HasColumnOrder(5); - - b.HasKey("Id") - .HasName("pk_spell_defenses"); - - b.HasIndex("SpellId") - .HasDatabaseName("ix_spell_defenses_spell_id"); - - b.ToTable("spell_defenses", (string)null); - }); - - modelBuilder.Entity("Pf2eDataScrapper.Model.Structure.SpellRelation.SpellRitual", b => - { - b.Property("SpellId") - .HasColumnType("integer") - .HasColumnName("spell_id") - .HasColumnOrder(1); - - b.Property("PrimaryCheck") - .IsRequired() - .HasMaxLength(255) - .HasColumnType("character varying(255)") - .HasColumnName("primary_check") - .HasColumnOrder(2); - - b.Property("SecondaryCasters") - .HasColumnType("integer") - .HasColumnName("secondary_casters") - .HasColumnOrder(3); - - b.Property("SecondaryChecks") - .IsRequired() - .HasMaxLength(255) - .HasColumnType("character varying(255)") - .HasColumnName("secondary_checks") - .HasColumnOrder(4); - - b.HasKey("SpellId") - .HasName("pk_spell_rituals"); - - b.ToTable("spell_rituals", (string)null); - }); - - modelBuilder.Entity("Pf2eDataScrapper.Model.Structure.Trait", b => - { - b.Property("Id") - .HasColumnType("integer") - .HasColumnName("id") - .HasColumnOrder(1); - - b.Property("Type") - .HasColumnType("trait_type") - .HasColumnName("type") - .HasColumnOrder(2); - - b.HasKey("Id") - .HasName("pk_traits"); - - b.ToTable("traits", (string)null); - }); - - modelBuilder.Entity("DeityTraining", b => - { - b.HasOne("Pf2eDataScrapper.Model.Structure.Deity", null) - .WithMany() - .HasForeignKey("DeityId") - .OnDelete(DeleteBehavior.Cascade) - .IsRequired() - .HasConstraintName("fk_deity_training_deities_deity_id"); - - b.HasOne("Pf2eDataScrapper.Model.Common.Training", null) - .WithMany() - .HasForeignKey("SkillsId") - .OnDelete(DeleteBehavior.Cascade) - .IsRequired() - .HasConstraintName("fk_deity_training_trainings_skills_id"); - }); - - modelBuilder.Entity("EntityKeyword", b => - { - b.HasOne("Pf2eDataScrapper.Model.Base.Entity", null) - .WithMany() - .HasForeignKey("EntitiesId") - .OnDelete(DeleteBehavior.Cascade) - .IsRequired() - .HasConstraintName("fk_entity_keyword_entities_entities_id"); - - b.HasOne("Pf2eDataScrapper.Model.Base.Keywords.Keyword", null) - .WithMany() - .HasForeignKey("KeywordsId") - .OnDelete(DeleteBehavior.Cascade) - .IsRequired() - .HasConstraintName("fk_entity_keyword_keywords_keywords_id"); - }); - - modelBuilder.Entity("EntityTrait", b => - { - b.HasOne("Pf2eDataScrapper.Model.Base.Entity", null) - .WithMany() - .HasForeignKey("EntitiesId") - .OnDelete(DeleteBehavior.Cascade) - .IsRequired() - .HasConstraintName("fk_entity_trait_entities_entities_id"); - - b.HasOne("Pf2eDataScrapper.Model.Structure.Trait", null) - .WithMany() - .HasForeignKey("TraitsId") - .OnDelete(DeleteBehavior.Cascade) - .IsRequired() - .HasConstraintName("fk_entity_trait_traits_traits_id"); - }); - - modelBuilder.Entity("Pf2eDataScrapper.Model.Base.EntityAlias", b => - { - b.HasOne("Pf2eDataScrapper.Model.Base.Entity", "Entity") - .WithMany("Aliases") - .HasForeignKey("EntityId") - .OnDelete(DeleteBehavior.Cascade) - .IsRequired() - .HasConstraintName("fk_entity_aliases_entities_entity_id"); - - b.Navigation("Entity"); - }); - - modelBuilder.Entity("Pf2eDataScrapper.Model.Base.Keywords.KeywordAlias", b => - { - b.HasOne("Pf2eDataScrapper.Model.Base.Keywords.Keyword", "Keyword") - .WithMany("Aliases") - .HasForeignKey("KeywordId") - .OnDelete(DeleteBehavior.Cascade) - .IsRequired() - .HasConstraintName("fk_keyword_aliases_keywords_keyword_id"); - - b.Navigation("Keyword"); - }); - - modelBuilder.Entity("Pf2eDataScrapper.Model.Base.Source.EntitySource", b => - { - b.HasOne("Pf2eDataScrapper.Model.Base.Entity", "Entity") - .WithMany("Sources") - .HasForeignKey("EntityId") - .OnDelete(DeleteBehavior.Cascade) - .IsRequired() - .HasConstraintName("fk_entity_sources_entities_entity_id"); - - b.HasOne("Pf2eDataScrapper.Model.Base.Source.Source", "Source") - .WithMany("EntitySources") - .HasForeignKey("SourceId") - .OnDelete(DeleteBehavior.Cascade) - .IsRequired() - .HasConstraintName("fk_entity_sources_sources_source_id"); - - b.Navigation("Entity"); - - b.Navigation("Source"); - }); - - modelBuilder.Entity("Pf2eDataScrapper.Model.Base.Targets.EntityExternal", b => - { - b.HasOne("Pf2eDataScrapper.Model.Base.Entity", "Entity") - .WithMany("Externals") - .HasForeignKey("EntityId") - .OnDelete(DeleteBehavior.Cascade) - .IsRequired() - .HasConstraintName("fk_entity_externals_entities_entity_id"); - - b.HasOne("Pf2eDataScrapper.Model.Base.Targets.ExternalTarget", "Target") - .WithMany("EntityExternals") - .HasForeignKey("TargetId") - .OnDelete(DeleteBehavior.Cascade) - .IsRequired() - .HasConstraintName("fk_entity_externals_external_targets_target_id"); - - b.Navigation("Entity"); - - b.Navigation("Target"); - }); - - modelBuilder.Entity("Pf2eDataScrapper.Model.Structure.Action", b => - { - b.HasOne("Pf2eDataScrapper.Model.Base.Entity", "Entity") - .WithOne() - .HasForeignKey("Pf2eDataScrapper.Model.Structure.Action", "Id") - .OnDelete(DeleteBehavior.Cascade) - .IsRequired() - .HasConstraintName("fk_actions_entities_id"); - - b.Navigation("Entity"); - }); - - modelBuilder.Entity("Pf2eDataScrapper.Model.Structure.Ancestry", b => - { - b.HasOne("Pf2eDataScrapper.Model.Base.Entity", "Entity") - .WithOne() - .HasForeignKey("Pf2eDataScrapper.Model.Structure.Ancestry", "Id") - .OnDelete(DeleteBehavior.Cascade) - .IsRequired() - .HasConstraintName("fk_ancestries_entities_id"); - - b.Navigation("Entity"); - }); - - modelBuilder.Entity("Pf2eDataScrapper.Model.Structure.AncestryRelation.AncestryBoost", b => - { - b.HasOne("Pf2eDataScrapper.Model.Structure.Ancestry", "Ancestry") - .WithMany("AncestryBoosts") - .HasForeignKey("AncestryId") - .OnDelete(DeleteBehavior.Cascade) - .IsRequired() - .HasConstraintName("fk_ancestry_boosts_ancestries_ancestry_id"); - - b.Navigation("Ancestry"); - }); - - modelBuilder.Entity("Pf2eDataScrapper.Model.Structure.AncestryRelation.AncestryItem", b => - { - b.HasOne("Pf2eDataScrapper.Model.Structure.Ancestry", "Ancestry") - .WithMany("AncestryItems") - .HasForeignKey("AncestryId") - .OnDelete(DeleteBehavior.Cascade) - .IsRequired() - .HasConstraintName("fk_ancestry_items_ancestries_ancestry_id"); - - b.HasOne("Pf2eDataScrapper.Model.Base.Entity", "Item") - .WithMany() - .HasForeignKey("ItemId") - .OnDelete(DeleteBehavior.Cascade) - .IsRequired() - .HasConstraintName("fk_ancestry_items_entities_item_id"); - - b.Navigation("Ancestry"); - - b.Navigation("Item"); - }); - - modelBuilder.Entity("Pf2eDataScrapper.Model.Structure.AncestryRelation.AncestryLanguage", b => - { - b.HasOne("Pf2eDataScrapper.Model.Structure.Ancestry", "Ancestry") - .WithMany("AncestryLanguages") - .HasForeignKey("AncestryId") - .OnDelete(DeleteBehavior.Cascade) - .IsRequired() - .HasConstraintName("fk_ancestry_languages_ancestries_ancestry_id"); - - b.HasOne("Pf2eDataScrapper.Model.Common.Language", "Language") - .WithMany() - .HasForeignKey("LanguageId") - .OnDelete(DeleteBehavior.Cascade) - .IsRequired() - .HasConstraintName("fk_ancestry_languages_languages_language_id"); - - b.Navigation("Ancestry"); - - b.Navigation("Language"); - }); - - modelBuilder.Entity("Pf2eDataScrapper.Model.Structure.Background", b => - { - b.HasOne("Pf2eDataScrapper.Model.Base.Entity", "Entity") - .WithOne() - .HasForeignKey("Pf2eDataScrapper.Model.Structure.Background", "Id") - .OnDelete(DeleteBehavior.Cascade) - .IsRequired() - .HasConstraintName("fk_backgrounds_entities_id"); - - b.Navigation("Entity"); - }); - - modelBuilder.Entity("Pf2eDataScrapper.Model.Structure.BackgroundRelation.BackgroundBoost", b => - { - b.HasOne("Pf2eDataScrapper.Model.Structure.Background", "Background") - .WithMany("BackgroundBoosts") - .HasForeignKey("BackgroundId") - .OnDelete(DeleteBehavior.Cascade) - .IsRequired() - .HasConstraintName("fk_background_boosts_backgrounds_background_id"); - - b.Navigation("Background"); - }); - - modelBuilder.Entity("Pf2eDataScrapper.Model.Structure.BackgroundRelation.BackgroundItem", b => - { - b.HasOne("Pf2eDataScrapper.Model.Structure.Background", "Background") - .WithMany("BackgroundItems") - .HasForeignKey("BackgroundId") - .OnDelete(DeleteBehavior.Cascade) - .IsRequired() - .HasConstraintName("fk_background_items_backgrounds_background_id"); - - b.HasOne("Pf2eDataScrapper.Model.Base.Entity", "Entity") - .WithMany() - .HasForeignKey("EntityId") - .OnDelete(DeleteBehavior.Cascade) - .IsRequired() - .HasConstraintName("fk_background_items_entities_entity_id"); - - b.Navigation("Background"); - - b.Navigation("Entity"); - }); - - modelBuilder.Entity("Pf2eDataScrapper.Model.Structure.BackgroundRelation.BackgroundTraining", b => - { - b.HasOne("Pf2eDataScrapper.Model.Structure.Background", "Background") - .WithMany("BackgroundSkills") - .HasForeignKey("BackgroundId") - .OnDelete(DeleteBehavior.Cascade) - .IsRequired() - .HasConstraintName("fk_background_skills_backgrounds_background_id"); - - b.HasOne("Pf2eDataScrapper.Model.Common.Training", "Training") - .WithMany() - .HasForeignKey("TrainingId") - .OnDelete(DeleteBehavior.Cascade) - .IsRequired() - .HasConstraintName("fk_background_skills_trainings_training_id"); - - b.Navigation("Background"); - - b.Navigation("Training"); - }); - - modelBuilder.Entity("Pf2eDataScrapper.Model.Structure.Class", b => - { - b.HasOne("Pf2eDataScrapper.Model.Base.Entity", "Entity") - .WithOne() - .HasForeignKey("Pf2eDataScrapper.Model.Structure.Class", "Id") - .OnDelete(DeleteBehavior.Cascade) - .IsRequired() - .HasConstraintName("fk_classes_entities_id"); - - b.Navigation("Entity"); - }); - - modelBuilder.Entity("Pf2eDataScrapper.Model.Structure.ClassRelation.ClassKeyAbility", b => - { - b.HasOne("Pf2eDataScrapper.Model.Structure.Class", "Class") - .WithMany("ClassKeyAbilities") - .HasForeignKey("ClassId") - .OnDelete(DeleteBehavior.Cascade) - .IsRequired() - .HasConstraintName("fk_class_key_abilities_classes_class_id"); - - b.Navigation("Class"); - }); - - modelBuilder.Entity("Pf2eDataScrapper.Model.Structure.ClassRelation.ClassProgression", b => - { - b.HasOne("Pf2eDataScrapper.Model.Structure.Class", "Class") - .WithMany("ClassProgressions") - .HasForeignKey("ClassId") - .OnDelete(DeleteBehavior.Cascade) - .IsRequired() - .HasConstraintName("fk_class_progressions_classes_class_id"); - - b.HasOne("Pf2eDataScrapper.Model.Base.Entity", "Entity") - .WithMany() - .HasForeignKey("EntityId") - .OnDelete(DeleteBehavior.SetNull) - .HasConstraintName("fk_class_progressions_entities_entity_id"); - - b.Navigation("Class"); - - b.Navigation("Entity"); - }); - - modelBuilder.Entity("Pf2eDataScrapper.Model.Structure.ClassRelation.ClassTraining", b => - { - b.HasOne("Pf2eDataScrapper.Model.Structure.Class", "Class") - .WithMany("ClassTrainings") - .HasForeignKey("ClassId") - .OnDelete(DeleteBehavior.Cascade) - .IsRequired() - .HasConstraintName("fk_class_trainings_classes_class_id"); - - b.HasOne("Pf2eDataScrapper.Model.Common.Training", "Training") - .WithMany() - .HasForeignKey("TrainingId") - .OnDelete(DeleteBehavior.SetNull) - .HasConstraintName("fk_class_trainings_trainings_training_id"); - - b.Navigation("Class"); - - b.Navigation("Training"); - }); - - modelBuilder.Entity("Pf2eDataScrapper.Model.Structure.Condition", b => - { - b.HasOne("Pf2eDataScrapper.Model.Base.Entity", "Entity") - .WithOne() - .HasForeignKey("Pf2eDataScrapper.Model.Structure.Condition", "Id") - .OnDelete(DeleteBehavior.Cascade) - .IsRequired() - .HasConstraintName("fk_conditions_entities_id"); - - b.Navigation("Entity"); - }); - - modelBuilder.Entity("Pf2eDataScrapper.Model.Structure.Deity", b => - { - b.HasOne("Pf2eDataScrapper.Model.Base.Entity", "Entity") - .WithOne() - .HasForeignKey("Pf2eDataScrapper.Model.Structure.Deity", "Id") - .OnDelete(DeleteBehavior.Cascade) - .IsRequired() - .HasConstraintName("fk_deities_entities_id"); - - b.Navigation("Entity"); - }); - - modelBuilder.Entity("Pf2eDataScrapper.Model.Structure.DeityRelation.DeityAttribute", b => - { - b.HasOne("Pf2eDataScrapper.Model.Structure.Deity", "Deity") - .WithMany("DeityAttributes") - .HasForeignKey("DeityId") - .OnDelete(DeleteBehavior.Cascade) - .IsRequired() - .HasConstraintName("fk_deity_attributes_deities_deity_id"); - - b.Navigation("Deity"); - }); - - modelBuilder.Entity("Pf2eDataScrapper.Model.Structure.DeityRelation.DeityDomain", b => - { - b.HasOne("Pf2eDataScrapper.Model.Structure.Deity", "Deity") - .WithMany("DeityDomains") - .HasForeignKey("DeityId") - .OnDelete(DeleteBehavior.Cascade) - .IsRequired() - .HasConstraintName("fk_deity_domains_deities_deity_id"); - - b.Navigation("Deity"); - }); - - modelBuilder.Entity("Pf2eDataScrapper.Model.Structure.DeityRelation.DeitySpell", b => - { - b.HasOne("Pf2eDataScrapper.Model.Structure.Deity", "Deity") - .WithMany("DeitySpells") - .HasForeignKey("DeityId") - .OnDelete(DeleteBehavior.Cascade) - .IsRequired() - .HasConstraintName("fk_deity_spells_deities_deity_id"); - - b.HasOne("Pf2eDataScrapper.Model.Structure.Spell", "Spell") - .WithMany() - .HasForeignKey("SpellId") - .OnDelete(DeleteBehavior.Cascade) - .IsRequired() - .HasConstraintName("fk_deity_spells_spells_spell_id"); - - b.Navigation("Deity"); - - b.Navigation("Spell"); - }); - - modelBuilder.Entity("Pf2eDataScrapper.Model.Structure.DeityRelation.DeityWeapon", b => - { - b.HasOne("Pf2eDataScrapper.Model.Structure.Deity", "Deity") - .WithMany("DeityWeapons") - .HasForeignKey("DeityId") - .OnDelete(DeleteBehavior.Cascade) - .IsRequired() - .HasConstraintName("fk_deity_weapons_deities_deity_id"); - - b.Navigation("Deity"); - }); - - modelBuilder.Entity("Pf2eDataScrapper.Model.Structure.Feat", b => - { - b.HasOne("Pf2eDataScrapper.Model.Base.Entity", "Entity") - .WithOne() - .HasForeignKey("Pf2eDataScrapper.Model.Structure.Feat", "Id") - .OnDelete(DeleteBehavior.Cascade) - .IsRequired() - .HasConstraintName("fk_feats_entities_id"); - - b.Navigation("Entity"); - }); - - modelBuilder.Entity("Pf2eDataScrapper.Model.Structure.FeatRelation.FeatPrerequisite", b => - { - b.HasOne("Pf2eDataScrapper.Model.Structure.Feat", "Feat") - .WithMany("FeatPrerequisites") - .HasForeignKey("FeatId") - .OnDelete(DeleteBehavior.Cascade) - .IsRequired() - .HasConstraintName("fk_feat_prerequisites_feats_feat_id"); - - b.Navigation("Feat"); - }); - - modelBuilder.Entity("Pf2eDataScrapper.Model.Structure.Heritage", b => - { - b.HasOne("Pf2eDataScrapper.Model.Structure.Ancestry", "Ancestry") - .WithMany("Heritages") - .HasForeignKey("AncestryId") - .OnDelete(DeleteBehavior.Cascade) - .HasConstraintName("fk_heritages_ancestries_ancestry_id"); - - b.HasOne("Pf2eDataScrapper.Model.Base.Entity", "Entity") - .WithOne() - .HasForeignKey("Pf2eDataScrapper.Model.Structure.Heritage", "Id") - .OnDelete(DeleteBehavior.Cascade) - .IsRequired() - .HasConstraintName("fk_heritages_entities_id"); - - b.Navigation("Ancestry"); - - b.Navigation("Entity"); - }); - - modelBuilder.Entity("Pf2eDataScrapper.Model.Structure.Spell", b => - { - b.HasOne("Pf2eDataScrapper.Model.Base.Entity", "Entity") - .WithOne() - .HasForeignKey("Pf2eDataScrapper.Model.Structure.Spell", "Id") - .OnDelete(DeleteBehavior.Cascade) - .IsRequired() - .HasConstraintName("fk_spells_entities_id"); - - b.Navigation("Entity"); - }); - - modelBuilder.Entity("Pf2eDataScrapper.Model.Structure.SpellRelation.SpellArea", b => - { - b.HasOne("Pf2eDataScrapper.Model.Structure.Spell", "Spell") - .WithOne("SpellArea") - .HasForeignKey("Pf2eDataScrapper.Model.Structure.SpellRelation.SpellArea", "SpellId") - .OnDelete(DeleteBehavior.Cascade) - .HasConstraintName("fk_spell_areas_spells_spell_id"); - - b.Navigation("Spell"); - }); - - modelBuilder.Entity("Pf2eDataScrapper.Model.Structure.SpellRelation.SpellDamage", b => - { - b.HasOne("Pf2eDataScrapper.Model.Structure.Spell", "Spell") - .WithMany("SpellDamages") - .HasForeignKey("SpellId") - .OnDelete(DeleteBehavior.Cascade) - .IsRequired() - .HasConstraintName("fk_spell_damages_spells_spell_id"); - - b.Navigation("Spell"); - }); - - modelBuilder.Entity("Pf2eDataScrapper.Model.Structure.SpellRelation.SpellDefense", b => - { - b.HasOne("Pf2eDataScrapper.Model.Structure.Spell", "Spell") - .WithMany("SpellDefenses") - .HasForeignKey("SpellId") - .OnDelete(DeleteBehavior.Cascade) - .IsRequired() - .HasConstraintName("fk_spell_defenses_spells_spell_id"); - - b.Navigation("Spell"); - }); - - modelBuilder.Entity("Pf2eDataScrapper.Model.Structure.SpellRelation.SpellRitual", b => - { - b.HasOne("Pf2eDataScrapper.Model.Structure.Spell", "Spell") - .WithOne("SpellRitual") - .HasForeignKey("Pf2eDataScrapper.Model.Structure.SpellRelation.SpellRitual", "SpellId") - .OnDelete(DeleteBehavior.Cascade) - .HasConstraintName("fk_spell_rituals_spells_spell_id"); - - b.Navigation("Spell"); - }); - - modelBuilder.Entity("Pf2eDataScrapper.Model.Structure.Trait", b => - { - b.HasOne("Pf2eDataScrapper.Model.Base.Entity", "Entity") - .WithOne() - .HasForeignKey("Pf2eDataScrapper.Model.Structure.Trait", "Id") - .OnDelete(DeleteBehavior.Cascade) - .IsRequired() - .HasConstraintName("fk_traits_entities_id"); - - b.Navigation("Entity"); - }); - - modelBuilder.Entity("Pf2eDataScrapper.Model.Base.Entity", b => - { - b.Navigation("Aliases"); - - b.Navigation("Externals"); - - b.Navigation("Sources"); - }); - - modelBuilder.Entity("Pf2eDataScrapper.Model.Base.Keywords.Keyword", b => - { - b.Navigation("Aliases"); - }); - - modelBuilder.Entity("Pf2eDataScrapper.Model.Base.Source.Source", b => - { - b.Navigation("EntitySources"); - }); - - modelBuilder.Entity("Pf2eDataScrapper.Model.Base.Targets.ExternalTarget", b => - { - b.Navigation("EntityExternals"); - }); - - modelBuilder.Entity("Pf2eDataScrapper.Model.Structure.Ancestry", b => - { - b.Navigation("AncestryBoosts"); - - b.Navigation("AncestryItems"); - - b.Navigation("AncestryLanguages"); - - b.Navigation("Heritages"); - }); - - modelBuilder.Entity("Pf2eDataScrapper.Model.Structure.Background", b => - { - b.Navigation("BackgroundBoosts"); - - b.Navigation("BackgroundItems"); - - b.Navigation("BackgroundSkills"); - }); - - modelBuilder.Entity("Pf2eDataScrapper.Model.Structure.Class", b => - { - b.Navigation("ClassKeyAbilities"); - - b.Navigation("ClassProgressions"); - - b.Navigation("ClassTrainings"); - }); - - modelBuilder.Entity("Pf2eDataScrapper.Model.Structure.Deity", b => - { - b.Navigation("DeityAttributes"); - - b.Navigation("DeityDomains"); - - b.Navigation("DeitySpells"); - - b.Navigation("DeityWeapons"); - }); - - modelBuilder.Entity("Pf2eDataScrapper.Model.Structure.Feat", b => - { - b.Navigation("FeatPrerequisites"); - }); - - modelBuilder.Entity("Pf2eDataScrapper.Model.Structure.Spell", b => - { - b.Navigation("SpellArea"); - - b.Navigation("SpellDamages"); - - b.Navigation("SpellDefenses"); - - b.Navigation("SpellRitual"); - }); -#pragma warning restore 612, 618 - } - } -} diff --git a/Pf2eDataScrapper/Migrations/20250418062802_1.cs b/Pf2eDataScrapper/Migrations/20250418062802_1.cs deleted file mode 100644 index e1fc9f5..0000000 --- a/Pf2eDataScrapper/Migrations/20250418062802_1.cs +++ /dev/null @@ -1,1199 +0,0 @@ -using System; -using Microsoft.EntityFrameworkCore.Migrations; -using Npgsql.EntityFrameworkCore.PostgreSQL.Metadata; -using Pf2eDataScrapper.Model.Enum; - -#nullable disable - -namespace Pf2eDataScrapper.Migrations -{ - /// - public partial class _1 : Migration - { - /// - protected override void Up(MigrationBuilder migrationBuilder) - { - migrationBuilder.AlterDatabase() - .Annotation("Npgsql:Enum:action_category", "unknown,offensive,defensive,interaction,familiar,army_tactic,army_war_action,kingdom_activity,kingdom_feat,kingdom_feature") - .Annotation("Npgsql:Enum:action_type", "none,1_action,2_actions,3_actions,1-3_actions,1-2_actions") - .Annotation("Npgsql:Enum:alias_type", "legacy,english,legacy_english,hobby,other") - .Annotation("Npgsql:Enum:ancestry_vision", "normal,low-light-vision,darkvision") - .Annotation("Npgsql:Enum:attribute_values", "any,str,dex,con,int,wis,cha") - .Annotation("Npgsql:Enum:class_progression_type", "entity,ancestry_feat,class_feat,general_feat,skill_feat,skill_increase") - .Annotation("Npgsql:Enum:condition_group", "unknown,senses,abilities,death,attitudes,detection") - .Annotation("Npgsql:Enum:deity_category", "deity,pantheon,covenant,philosophy") - .Annotation("Npgsql:Enum:deity_fonts", "none,heal,harm,any") - .Annotation("Npgsql:Enum:deity_sanctification", "holy,unholy,any") - .Annotation("Npgsql:Enum:entity_rarity", "common,uncommon,rare,unique") - .Annotation("Npgsql:Enum:entity_type", "unknown,trait,action,ancestry,background,backpack,campaign_feature,class,condition,deity,feat,heritage,spell") - .Annotation("Npgsql:Enum:feat_action_type", "passive,action,reaction,free") - .Annotation("Npgsql:Enum:feat_category", "ancestryfeature,classfeature,calling,class,skill,general,ancestry,bonus,deityboon,curse,pfsboon,campaign_feature") - .Annotation("Npgsql:Enum:size", "med,tiny") - .Annotation("Npgsql:Enum:source_category", "rulebook,adventure-path,lost-omens") - .Annotation("Npgsql:Enum:spell_area_type", "burst,emanation,cone,line,square,cube,cylinder") - .Annotation("Npgsql:Enum:spell_damage_category", "persistent,splash") - .Annotation("Npgsql:Enum:spell_damage_kinds", "damage,healing,any") - .Annotation("Npgsql:Enum:training_stage", "untrained,trained,expert,master,legendary") - .Annotation("Npgsql:Enum:trait_type", "regular,tradition"); - - migrationBuilder.CreateTable( - name: "entities", - columns: table => new - { - id = table.Column(type: "integer", nullable: false) - .Annotation("Npgsql:ValueGenerationStrategy", NpgsqlValueGenerationStrategy.IdentityByDefaultColumn), - name = table.Column(type: "character varying(255)", maxLength: 255, nullable: false, comment: "Отображаемое имя"), - type = table.Column(type: "entity_type", nullable: false, comment: "Тип объекта"), - slug = table.Column(type: "character varying(255)", maxLength: 255, nullable: false, comment: "Часть имени в URL"), - img = table.Column(type: "character varying(255)", maxLength: 255, nullable: false, comment: "Изображение объекта"), - description = table.Column(type: "text", nullable: false, comment: "Текстовое описание объекта"), - rarity = table.Column(type: "entity_rarity", nullable: false), - is_translated = table.Column(type: "boolean", nullable: true, comment: "Флаг, указывающий, что у объекта существует перевод"), - is_checked = table.Column(type: "boolean", nullable: true, comment: "Флаг, указывающий, что объект был проверен и не требует автоматической перезаписи") - }, - constraints: table => - { - table.PrimaryKey("pk_entities", x => x.id); - }); - - migrationBuilder.CreateTable( - name: "external_targets", - columns: table => new - { - id = table.Column(type: "integer", nullable: false) - .Annotation("Npgsql:ValueGenerationStrategy", NpgsqlValueGenerationStrategy.IdentityByDefaultColumn), - name = table.Column(type: "character varying(255)", maxLength: 255, nullable: false), - icon = table.Column(type: "character varying(255)", maxLength: 255, nullable: false), - prefix = table.Column(type: "character varying(255)", maxLength: 255, nullable: false) - }, - constraints: table => - { - table.PrimaryKey("pk_external_targets", x => x.id); - }); - - migrationBuilder.CreateTable( - name: "frequencies", - columns: table => new - { - id = table.Column(type: "integer", nullable: false) - .Annotation("Npgsql:ValueGenerationStrategy", NpgsqlValueGenerationStrategy.IdentityByDefaultColumn), - max = table.Column(type: "integer", nullable: false), - per = table.Column(type: "integer", nullable: false), - value = table.Column(type: "integer", nullable: true) - }, - constraints: table => - { - table.PrimaryKey("pk_frequencies", x => x.id); - }); - - migrationBuilder.CreateTable( - name: "keywords", - columns: table => new - { - id = table.Column(type: "integer", nullable: false) - .Annotation("Npgsql:ValueGenerationStrategy", NpgsqlValueGenerationStrategy.IdentityByDefaultColumn), - slug = table.Column(type: "text", nullable: false) - }, - constraints: table => - { - table.PrimaryKey("pk_keywords", x => x.id); - }); - - migrationBuilder.CreateTable( - name: "languages", - columns: table => new - { - id = table.Column(type: "integer", nullable: false) - .Annotation("Npgsql:ValueGenerationStrategy", NpgsqlValueGenerationStrategy.IdentityByDefaultColumn), - name = table.Column(type: "character varying(255)", maxLength: 255, nullable: false), - slug = table.Column(type: "character varying(255)", maxLength: 255, nullable: false), - rarity = table.Column(type: "entity_rarity", nullable: false) - }, - constraints: table => - { - table.PrimaryKey("pk_languages", x => x.id); - }); - - migrationBuilder.CreateTable( - name: "sources", - columns: table => new - { - id = table.Column(type: "integer", nullable: false) - .Annotation("Npgsql:ValueGenerationStrategy", NpgsqlValueGenerationStrategy.IdentityByDefaultColumn), - name = table.Column(type: "character varying(255)", maxLength: 255, nullable: false), - category = table.Column(type: "source_category", nullable: false), - release_date = table.Column(type: "date", nullable: true) - }, - constraints: table => - { - table.PrimaryKey("pk_sources", x => x.id); - }); - - migrationBuilder.CreateTable( - name: "trainings", - columns: table => new - { - id = table.Column(type: "integer", nullable: false) - .Annotation("Npgsql:ValueGenerationStrategy", NpgsqlValueGenerationStrategy.IdentityByDefaultColumn), - key = table.Column(type: "character varying(255)", maxLength: 255, nullable: false) - }, - constraints: table => - { - table.PrimaryKey("pk_trainings", x => x.id); - }); - - migrationBuilder.CreateTable( - name: "actions", - columns: table => new - { - id = table.Column(type: "integer", nullable: false), - type = table.Column(type: "action_type", nullable: false), - actions = table.Column(type: "integer", nullable: true), - max_actions = table.Column(type: "integer", nullable: true), - is_reaction = table.Column(type: "boolean", nullable: false), - is_free_action = table.Column(type: "boolean", nullable: false), - is_passive = table.Column(type: "boolean", nullable: false), - extra = table.Column(type: "text", nullable: true) - }, - constraints: table => - { - table.PrimaryKey("pk_actions", x => x.id); - table.ForeignKey( - name: "fk_actions_entities_id", - column: x => x.id, - principalTable: "entities", - principalColumn: "id", - onDelete: ReferentialAction.Cascade); - }); - - migrationBuilder.CreateTable( - name: "ancestries", - columns: table => new - { - id = table.Column(type: "integer", nullable: false), - size = table.Column(type: "size", nullable: false), - hp = table.Column(type: "integer", nullable: false), - reach = table.Column(type: "integer", nullable: false), - speed = table.Column(type: "integer", nullable: false), - vision = table.Column(type: "ancestry_vision", nullable: false) - }, - constraints: table => - { - table.PrimaryKey("pk_ancestries", x => x.id); - table.ForeignKey( - name: "fk_ancestries_entities_id", - column: x => x.id, - principalTable: "entities", - principalColumn: "id", - onDelete: ReferentialAction.Cascade); - }); - - migrationBuilder.CreateTable( - name: "backgrounds", - columns: table => new - { - id = table.Column(type: "integer", nullable: false) - }, - constraints: table => - { - table.PrimaryKey("pk_backgrounds", x => x.id); - table.ForeignKey( - name: "fk_backgrounds_entities_id", - column: x => x.id, - principalTable: "entities", - principalColumn: "id", - onDelete: ReferentialAction.Cascade); - }); - - migrationBuilder.CreateTable( - name: "classes", - columns: table => new - { - id = table.Column(type: "integer", nullable: false), - hp = table.Column(type: "integer", nullable: false), - perception = table.Column(type: "integer", nullable: false), - spellcasting = table.Column(type: "boolean", nullable: false), - additional_trained_skills = table.Column(type: "integer", nullable: false) - }, - constraints: table => - { - table.PrimaryKey("pk_classes", x => x.id); - table.ForeignKey( - name: "fk_classes_entities_id", - column: x => x.id, - principalTable: "entities", - principalColumn: "id", - onDelete: ReferentialAction.Cascade); - }); - - migrationBuilder.CreateTable( - name: "conditions", - columns: table => new - { - id = table.Column(type: "integer", nullable: false), - group = table.Column(type: "condition_group", nullable: true), - extra = table.Column(type: "text", nullable: true) - }, - constraints: table => - { - table.PrimaryKey("pk_conditions", x => x.id); - table.ForeignKey( - name: "fk_conditions_entities_id", - column: x => x.id, - principalTable: "entities", - principalColumn: "id", - onDelete: ReferentialAction.Cascade); - }); - - migrationBuilder.CreateTable( - name: "deities", - columns: table => new - { - id = table.Column(type: "integer", nullable: false), - category = table.Column(type: "deity_category", nullable: false), - fonts = table.Column(type: "deity_fonts", nullable: false), - sanctification = table.Column(type: "deity_sanctification", nullable: false), - sanctification_must = table.Column(type: "boolean", nullable: false) - }, - constraints: table => - { - table.PrimaryKey("pk_deities", x => x.id); - table.ForeignKey( - name: "fk_deities_entities_id", - column: x => x.id, - principalTable: "entities", - principalColumn: "id", - onDelete: ReferentialAction.Cascade); - }); - - migrationBuilder.CreateTable( - name: "entity_aliases", - columns: table => new - { - entity_id = table.Column(type: "integer", nullable: false), - type = table.Column(type: "alias_type", nullable: false), - alias = table.Column(type: "character varying(255)", maxLength: 255, nullable: false) - }, - constraints: table => - { - table.PrimaryKey("pk_entity_aliases", x => new { x.entity_id, x.type }); - table.ForeignKey( - name: "fk_entity_aliases_entities_entity_id", - column: x => x.entity_id, - principalTable: "entities", - principalColumn: "id", - onDelete: ReferentialAction.Cascade); - }); - - migrationBuilder.CreateTable( - name: "feats", - columns: table => new - { - id = table.Column(type: "integer", nullable: false), - type = table.Column(type: "action_type", nullable: false), - category = table.Column(type: "action_category", nullable: false), - actions = table.Column(type: "integer", nullable: true), - level = table.Column(type: "integer", nullable: false), - level_taken = table.Column(type: "integer", nullable: true), - max_takable = table.Column(type: "integer", nullable: true), - location = table.Column(type: "character varying(255)", maxLength: 255, nullable: true), - only_level1 = table.Column(type: "boolean", nullable: true), - extra = table.Column(type: "text", nullable: true) - }, - constraints: table => - { - table.PrimaryKey("pk_feats", x => x.id); - table.ForeignKey( - name: "fk_feats_entities_id", - column: x => x.id, - principalTable: "entities", - principalColumn: "id", - onDelete: ReferentialAction.Cascade); - }); - - migrationBuilder.CreateTable( - name: "spells", - columns: table => new - { - id = table.Column(type: "integer", nullable: false), - level = table.Column(type: "integer", nullable: false), - cost = table.Column(type: "integer", nullable: false), - counteraction = table.Column(type: "boolean", nullable: false), - sustained = table.Column(type: "boolean", nullable: false), - duration = table.Column(type: "character varying(255)", maxLength: 255, nullable: false), - range = table.Column(type: "character varying(255)", maxLength: 255, nullable: false), - requirements = table.Column(type: "character varying(255)", maxLength: 255, nullable: false), - target = table.Column(type: "character varying(255)", maxLength: 255, nullable: false), - time = table.Column(type: "character varying(255)", maxLength: 255, nullable: false), - can_heightening = table.Column(type: "boolean", nullable: false) - }, - constraints: table => - { - table.PrimaryKey("pk_spells", x => x.id); - table.ForeignKey( - name: "fk_spells_entities_id", - column: x => x.id, - principalTable: "entities", - principalColumn: "id", - onDelete: ReferentialAction.Cascade); - }); - - migrationBuilder.CreateTable( - name: "traits", - columns: table => new - { - id = table.Column(type: "integer", nullable: false), - type = table.Column(type: "trait_type", nullable: false) - }, - constraints: table => - { - table.PrimaryKey("pk_traits", x => x.id); - table.ForeignKey( - name: "fk_traits_entities_id", - column: x => x.id, - principalTable: "entities", - principalColumn: "id", - onDelete: ReferentialAction.Cascade); - }); - - migrationBuilder.CreateTable( - name: "entity_externals", - columns: table => new - { - entity_id = table.Column(type: "integer", nullable: false), - target_id = table.Column(type: "integer", nullable: false), - suffix = table.Column(type: "character varying(255)", maxLength: 255, nullable: false, comment: "Часть URL до объекта. Для источников Foundry - полный UUID объекта"), - md5 = table.Column(type: "character varying(32)", maxLength: 32, nullable: false, comment: "Контроль версии объекта") - }, - constraints: table => - { - table.PrimaryKey("pk_entity_externals", x => new { x.entity_id, x.target_id }); - table.ForeignKey( - name: "fk_entity_externals_entities_entity_id", - column: x => x.entity_id, - principalTable: "entities", - principalColumn: "id", - onDelete: ReferentialAction.Cascade); - table.ForeignKey( - name: "fk_entity_externals_external_targets_target_id", - column: x => x.target_id, - principalTable: "external_targets", - principalColumn: "id", - onDelete: ReferentialAction.Cascade); - }); - - migrationBuilder.CreateTable( - name: "entity_keyword", - columns: table => new - { - entities_id = table.Column(type: "integer", nullable: false), - keywords_id = table.Column(type: "integer", nullable: false) - }, - constraints: table => - { - table.PrimaryKey("pk_entity_keyword", x => new { x.entities_id, x.keywords_id }); - table.ForeignKey( - name: "fk_entity_keyword_entities_entities_id", - column: x => x.entities_id, - principalTable: "entities", - principalColumn: "id", - onDelete: ReferentialAction.Cascade); - table.ForeignKey( - name: "fk_entity_keyword_keywords_keywords_id", - column: x => x.keywords_id, - principalTable: "keywords", - principalColumn: "id", - onDelete: ReferentialAction.Cascade); - }); - - migrationBuilder.CreateTable( - name: "keyword_aliases", - columns: table => new - { - id = table.Column(type: "integer", nullable: false) - .Annotation("Npgsql:ValueGenerationStrategy", NpgsqlValueGenerationStrategy.IdentityByDefaultColumn), - keyword_id = table.Column(type: "integer", nullable: false), - value = table.Column(type: "character varying(255)", maxLength: 255, nullable: false) - }, - constraints: table => - { - table.PrimaryKey("pk_keyword_aliases", x => x.id); - table.ForeignKey( - name: "fk_keyword_aliases_keywords_keyword_id", - column: x => x.keyword_id, - principalTable: "keywords", - principalColumn: "id", - onDelete: ReferentialAction.Cascade); - }); - - migrationBuilder.CreateTable( - name: "entity_sources", - columns: table => new - { - entity_id = table.Column(type: "integer", nullable: false), - source_id = table.Column(type: "integer", nullable: false), - suffix = table.Column(type: "character varying(255)", maxLength: 255, nullable: false, comment: "Номер страницы, эррата и т.д."), - is_remaster = table.Column(type: "boolean", nullable: false, comment: "Флаг, указывающий, что объект является частью ремастера") - }, - constraints: table => - { - table.PrimaryKey("pk_entity_sources", x => new { x.entity_id, x.source_id }); - table.ForeignKey( - name: "fk_entity_sources_entities_entity_id", - column: x => x.entity_id, - principalTable: "entities", - principalColumn: "id", - onDelete: ReferentialAction.Cascade); - table.ForeignKey( - name: "fk_entity_sources_sources_source_id", - column: x => x.source_id, - principalTable: "sources", - principalColumn: "id", - onDelete: ReferentialAction.Cascade); - }); - - migrationBuilder.CreateTable( - name: "ancestry_boosts", - columns: table => new - { - id = table.Column(type: "integer", nullable: false) - .Annotation("Npgsql:ValueGenerationStrategy", NpgsqlValueGenerationStrategy.IdentityByDefaultColumn), - ancestry_id = table.Column(type: "integer", nullable: false), - boost = table.Column(type: "boolean", nullable: false), - value = table.Column(type: "attribute_values", nullable: false) - }, - constraints: table => - { - table.PrimaryKey("pk_ancestry_boosts", x => x.id); - table.ForeignKey( - name: "fk_ancestry_boosts_ancestries_ancestry_id", - column: x => x.ancestry_id, - principalTable: "ancestries", - principalColumn: "id", - onDelete: ReferentialAction.Cascade); - }); - - migrationBuilder.CreateTable( - name: "ancestry_items", - columns: table => new - { - ancestry_id = table.Column(type: "integer", nullable: false), - item_id = table.Column(type: "integer", nullable: false), - level = table.Column(type: "integer", nullable: false) - }, - constraints: table => - { - table.PrimaryKey("pk_ancestry_items", x => new { x.ancestry_id, x.item_id }); - table.ForeignKey( - name: "fk_ancestry_items_ancestries_ancestry_id", - column: x => x.ancestry_id, - principalTable: "ancestries", - principalColumn: "id", - onDelete: ReferentialAction.Cascade); - table.ForeignKey( - name: "fk_ancestry_items_entities_item_id", - column: x => x.item_id, - principalTable: "entities", - principalColumn: "id", - onDelete: ReferentialAction.Cascade); - }); - - migrationBuilder.CreateTable( - name: "ancestry_languages", - columns: table => new - { - ancestry_id = table.Column(type: "integer", nullable: false), - language_id = table.Column(type: "integer", nullable: false), - is_additional = table.Column(type: "boolean", nullable: false) - }, - constraints: table => - { - table.PrimaryKey("pk_ancestry_languages", x => new { x.ancestry_id, x.language_id }); - table.ForeignKey( - name: "fk_ancestry_languages_ancestries_ancestry_id", - column: x => x.ancestry_id, - principalTable: "ancestries", - principalColumn: "id", - onDelete: ReferentialAction.Cascade); - table.ForeignKey( - name: "fk_ancestry_languages_languages_language_id", - column: x => x.language_id, - principalTable: "languages", - principalColumn: "id", - onDelete: ReferentialAction.Cascade); - }); - - migrationBuilder.CreateTable( - name: "heritages", - columns: table => new - { - id = table.Column(type: "integer", nullable: false), - ancestry_id = table.Column(type: "integer", nullable: true) - }, - constraints: table => - { - table.PrimaryKey("pk_heritages", x => x.id); - table.ForeignKey( - name: "fk_heritages_ancestries_ancestry_id", - column: x => x.ancestry_id, - principalTable: "ancestries", - principalColumn: "id", - onDelete: ReferentialAction.Cascade); - table.ForeignKey( - name: "fk_heritages_entities_id", - column: x => x.id, - principalTable: "entities", - principalColumn: "id", - onDelete: ReferentialAction.Cascade); - }); - - migrationBuilder.CreateTable( - name: "background_boosts", - columns: table => new - { - id = table.Column(type: "integer", nullable: false), - background_id = table.Column(type: "integer", nullable: false), - attribute = table.Column(type: "attribute_values", nullable: false) - }, - constraints: table => - { - table.PrimaryKey("pk_background_boosts", x => x.id); - table.ForeignKey( - name: "fk_background_boosts_backgrounds_background_id", - column: x => x.background_id, - principalTable: "backgrounds", - principalColumn: "id", - onDelete: ReferentialAction.Cascade); - }); - - migrationBuilder.CreateTable( - name: "background_items", - columns: table => new - { - background_id = table.Column(type: "integer", nullable: false), - entity_id = table.Column(type: "integer", nullable: false), - level = table.Column(type: "integer", nullable: true) - }, - constraints: table => - { - table.PrimaryKey("pk_background_items", x => new { x.background_id, x.entity_id }); - table.ForeignKey( - name: "fk_background_items_backgrounds_background_id", - column: x => x.background_id, - principalTable: "backgrounds", - principalColumn: "id", - onDelete: ReferentialAction.Cascade); - table.ForeignKey( - name: "fk_background_items_entities_entity_id", - column: x => x.entity_id, - principalTable: "entities", - principalColumn: "id", - onDelete: ReferentialAction.Cascade); - }); - - migrationBuilder.CreateTable( - name: "background_skills", - columns: table => new - { - id = table.Column(type: "integer", nullable: false), - background_id = table.Column(type: "integer", nullable: false), - training_id = table.Column(type: "integer", nullable: false), - level = table.Column(type: "training_stage", nullable: false) - }, - constraints: table => - { - table.PrimaryKey("pk_background_skills", x => x.id); - table.ForeignKey( - name: "fk_background_skills_backgrounds_background_id", - column: x => x.background_id, - principalTable: "backgrounds", - principalColumn: "id", - onDelete: ReferentialAction.Cascade); - table.ForeignKey( - name: "fk_background_skills_trainings_training_id", - column: x => x.training_id, - principalTable: "trainings", - principalColumn: "id", - onDelete: ReferentialAction.Cascade); - }); - - migrationBuilder.CreateTable( - name: "class_key_abilities", - columns: table => new - { - id = table.Column(type: "integer", nullable: false) - .Annotation("Npgsql:ValueGenerationStrategy", NpgsqlValueGenerationStrategy.IdentityByDefaultColumn), - class_id = table.Column(type: "integer", nullable: false), - value = table.Column(type: "attribute_values", nullable: false) - }, - constraints: table => - { - table.PrimaryKey("pk_class_key_abilities", x => x.id); - table.ForeignKey( - name: "fk_class_key_abilities_classes_class_id", - column: x => x.class_id, - principalTable: "classes", - principalColumn: "id", - onDelete: ReferentialAction.Cascade); - }); - - migrationBuilder.CreateTable( - name: "class_progressions", - columns: table => new - { - id = table.Column(type: "integer", nullable: false) - .Annotation("Npgsql:ValueGenerationStrategy", NpgsqlValueGenerationStrategy.IdentityByDefaultColumn), - class_id = table.Column(type: "integer", nullable: false), - type = table.Column(type: "class_progression_type", nullable: false), - entity_id = table.Column(type: "integer", nullable: true), - level = table.Column(type: "integer", nullable: false) - }, - constraints: table => - { - table.PrimaryKey("pk_class_progressions", x => x.id); - table.ForeignKey( - name: "fk_class_progressions_classes_class_id", - column: x => x.class_id, - principalTable: "classes", - principalColumn: "id", - onDelete: ReferentialAction.Cascade); - table.ForeignKey( - name: "fk_class_progressions_entities_entity_id", - column: x => x.entity_id, - principalTable: "entities", - principalColumn: "id", - onDelete: ReferentialAction.SetNull); - }); - - migrationBuilder.CreateTable( - name: "class_trainings", - columns: table => new - { - id = table.Column(type: "integer", nullable: false) - .Annotation("Npgsql:ValueGenerationStrategy", NpgsqlValueGenerationStrategy.IdentityByDefaultColumn), - class_id = table.Column(type: "integer", nullable: false), - training_id = table.Column(type: "integer", nullable: true), - name = table.Column(type: "character varying(255)", maxLength: 255, nullable: true), - stage = table.Column(type: "integer", nullable: false) - }, - constraints: table => - { - table.PrimaryKey("pk_class_trainings", x => x.id); - table.ForeignKey( - name: "fk_class_trainings_classes_class_id", - column: x => x.class_id, - principalTable: "classes", - principalColumn: "id", - onDelete: ReferentialAction.Cascade); - table.ForeignKey( - name: "fk_class_trainings_trainings_training_id", - column: x => x.training_id, - principalTable: "trainings", - principalColumn: "id", - onDelete: ReferentialAction.SetNull); - }); - - migrationBuilder.CreateTable( - name: "deity_attributes", - columns: table => new - { - deity_id = table.Column(type: "integer", nullable: false), - attribute = table.Column(type: "attribute_values", nullable: false) - }, - constraints: table => - { - table.PrimaryKey("pk_deity_attributes", x => new { x.deity_id, x.attribute }); - table.ForeignKey( - name: "fk_deity_attributes_deities_deity_id", - column: x => x.deity_id, - principalTable: "deities", - principalColumn: "id", - onDelete: ReferentialAction.Cascade); - }); - - migrationBuilder.CreateTable( - name: "deity_domains", - columns: table => new - { - id = table.Column(type: "integer", nullable: false) - .Annotation("Npgsql:ValueGenerationStrategy", NpgsqlValueGenerationStrategy.IdentityByDefaultColumn), - deity_id = table.Column(type: "integer", nullable: false), - is_primary = table.Column(type: "boolean", nullable: false), - 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 - { - deity_id = table.Column(type: "integer", nullable: false), - skills_id = table.Column(type: "integer", nullable: false) - }, - constraints: table => - { - table.PrimaryKey("pk_deity_training", x => new { x.deity_id, x.skills_id }); - table.ForeignKey( - name: "fk_deity_training_deities_deity_id", - column: x => x.deity_id, - principalTable: "deities", - principalColumn: "id", - onDelete: ReferentialAction.Cascade); - table.ForeignKey( - name: "fk_deity_training_trainings_skills_id", - column: x => x.skills_id, - principalTable: "trainings", - principalColumn: "id", - onDelete: ReferentialAction.Cascade); - }); - - migrationBuilder.CreateTable( - name: "deity_weapons", - columns: table => new - { - id = table.Column(type: "integer", nullable: false) - .Annotation("Npgsql:ValueGenerationStrategy", NpgsqlValueGenerationStrategy.IdentityByDefaultColumn), - deity_id = table.Column(type: "integer", nullable: false), - weapon = table.Column(type: "character varying(255)", maxLength: 255, nullable: false) - }, - constraints: table => - { - table.PrimaryKey("pk_deity_weapons", x => x.id); - table.ForeignKey( - name: "fk_deity_weapons_deities_deity_id", - column: x => x.deity_id, - principalTable: "deities", - principalColumn: "id", - onDelete: ReferentialAction.Cascade); - }); - - migrationBuilder.CreateTable( - name: "feat_prerequisites", - columns: table => new - { - id = table.Column(type: "integer", nullable: false) - .Annotation("Npgsql:ValueGenerationStrategy", NpgsqlValueGenerationStrategy.IdentityByDefaultColumn), - feat_id = table.Column(type: "integer", nullable: false), - value = table.Column(type: "character varying(255)", maxLength: 255, nullable: false) - }, - constraints: table => - { - table.PrimaryKey("pk_feat_prerequisites", x => x.id); - table.ForeignKey( - name: "fk_feat_prerequisites_feats_feat_id", - column: x => x.feat_id, - principalTable: "feats", - principalColumn: "id", - onDelete: ReferentialAction.Cascade); - }); - - migrationBuilder.CreateTable( - name: "deity_spells", - columns: table => new - { - id = table.Column(type: "integer", nullable: false) - .Annotation("Npgsql:ValueGenerationStrategy", NpgsqlValueGenerationStrategy.IdentityByDefaultColumn), - deity_id = table.Column(type: "integer", nullable: false), - level = table.Column(type: "integer", nullable: false), - spell_id = table.Column(type: "integer", nullable: false) - }, - constraints: table => - { - table.PrimaryKey("pk_deity_spells", x => x.id); - table.ForeignKey( - name: "fk_deity_spells_deities_deity_id", - column: x => x.deity_id, - principalTable: "deities", - principalColumn: "id", - onDelete: ReferentialAction.Cascade); - table.ForeignKey( - name: "fk_deity_spells_spells_spell_id", - column: x => x.spell_id, - principalTable: "spells", - principalColumn: "id", - onDelete: ReferentialAction.Cascade); - }); - - migrationBuilder.CreateTable( - name: "spell_areas", - columns: table => new - { - spell_id = table.Column(type: "integer", nullable: false), - details = table.Column(type: "character varying(255)", maxLength: 255, nullable: true), - type = table.Column(type: "spell_area_type", nullable: false), - value = table.Column(type: "integer", nullable: false) - }, - constraints: table => - { - table.PrimaryKey("pk_spell_areas", x => x.spell_id); - table.ForeignKey( - name: "fk_spell_areas_spells_spell_id", - column: x => x.spell_id, - principalTable: "spells", - principalColumn: "id", - onDelete: ReferentialAction.Cascade); - }); - - migrationBuilder.CreateTable( - name: "spell_damages", - columns: table => new - { - id = table.Column(type: "integer", nullable: false) - .Annotation("Npgsql:ValueGenerationStrategy", NpgsqlValueGenerationStrategy.IdentityByDefaultColumn), - spell_id = table.Column(type: "integer", nullable: false), - key = table.Column(type: "character varying(255)", maxLength: 255, nullable: false), - apply_mod = table.Column(type: "boolean", nullable: true), - category = table.Column(type: "spell_damage_category", nullable: true), - formula = table.Column(type: "character varying(255)", maxLength: 255, nullable: false), - kinds = table.Column(type: "spell_damage_kinds", nullable: false), - materials = table.Column(type: "character varying(255)", maxLength: 255, nullable: true), - type = table.Column(type: "character varying(255)", maxLength: 255, nullable: false) - }, - constraints: table => - { - table.PrimaryKey("pk_spell_damages", x => x.id); - table.ForeignKey( - name: "fk_spell_damages_spells_spell_id", - column: x => x.spell_id, - principalTable: "spells", - principalColumn: "id", - onDelete: ReferentialAction.Cascade); - }); - - migrationBuilder.CreateTable( - name: "spell_defenses", - columns: table => new - { - id = table.Column(type: "integer", nullable: false) - .Annotation("Npgsql:ValueGenerationStrategy", NpgsqlValueGenerationStrategy.IdentityByDefaultColumn), - spell_id = table.Column(type: "integer", nullable: false), - is_passive = table.Column(type: "boolean", nullable: false), - is_basic = table.Column(type: "boolean", nullable: true), - statistic = table.Column(type: "character varying(255)", maxLength: 255, nullable: false) - }, - constraints: table => - { - table.PrimaryKey("pk_spell_defenses", x => x.id); - table.ForeignKey( - name: "fk_spell_defenses_spells_spell_id", - column: x => x.spell_id, - principalTable: "spells", - principalColumn: "id", - onDelete: ReferentialAction.Cascade); - }); - - migrationBuilder.CreateTable( - name: "spell_rituals", - columns: table => new - { - spell_id = table.Column(type: "integer", nullable: false), - primary_check = table.Column(type: "character varying(255)", maxLength: 255, nullable: false), - secondary_casters = table.Column(type: "integer", nullable: false), - secondary_checks = table.Column(type: "character varying(255)", maxLength: 255, nullable: false) - }, - constraints: table => - { - table.PrimaryKey("pk_spell_rituals", x => x.spell_id); - table.ForeignKey( - name: "fk_spell_rituals_spells_spell_id", - column: x => x.spell_id, - principalTable: "spells", - principalColumn: "id", - onDelete: ReferentialAction.Cascade); - }); - - migrationBuilder.CreateTable( - name: "entity_trait", - columns: table => new - { - entities_id = table.Column(type: "integer", nullable: false), - traits_id = table.Column(type: "integer", nullable: false) - }, - constraints: table => - { - table.PrimaryKey("pk_entity_trait", x => new { x.entities_id, x.traits_id }); - table.ForeignKey( - name: "fk_entity_trait_entities_entities_id", - column: x => x.entities_id, - principalTable: "entities", - principalColumn: "id", - onDelete: ReferentialAction.Cascade); - table.ForeignKey( - name: "fk_entity_trait_traits_traits_id", - column: x => x.traits_id, - principalTable: "traits", - principalColumn: "id", - onDelete: ReferentialAction.Cascade); - }); - - migrationBuilder.CreateIndex( - name: "ix_ancestry_boosts_ancestry_id", - table: "ancestry_boosts", - column: "ancestry_id"); - - migrationBuilder.CreateIndex( - name: "ix_ancestry_items_item_id", - table: "ancestry_items", - column: "item_id"); - - migrationBuilder.CreateIndex( - name: "ix_ancestry_languages_language_id", - table: "ancestry_languages", - column: "language_id"); - - migrationBuilder.CreateIndex( - name: "ix_background_boosts_background_id", - table: "background_boosts", - column: "background_id"); - - migrationBuilder.CreateIndex( - name: "ix_background_items_entity_id", - table: "background_items", - column: "entity_id"); - - migrationBuilder.CreateIndex( - name: "ix_background_skills_background_id", - table: "background_skills", - column: "background_id"); - - migrationBuilder.CreateIndex( - name: "ix_background_skills_training_id", - table: "background_skills", - column: "training_id"); - - migrationBuilder.CreateIndex( - name: "ix_class_key_abilities_class_id", - table: "class_key_abilities", - column: "class_id"); - - migrationBuilder.CreateIndex( - name: "ix_class_progressions_class_id", - table: "class_progressions", - column: "class_id"); - - migrationBuilder.CreateIndex( - name: "ix_class_progressions_entity_id", - table: "class_progressions", - column: "entity_id"); - - migrationBuilder.CreateIndex( - name: "ix_class_trainings_class_id", - table: "class_trainings", - column: "class_id"); - - migrationBuilder.CreateIndex( - name: "ix_class_trainings_training_id", - table: "class_trainings", - column: "training_id"); - - migrationBuilder.CreateIndex( - name: "ix_deity_domains_deity_id", - table: "deity_domains", - column: "deity_id"); - - migrationBuilder.CreateIndex( - name: "ix_deity_spells_deity_id", - table: "deity_spells", - column: "deity_id"); - - migrationBuilder.CreateIndex( - name: "ix_deity_spells_spell_id", - table: "deity_spells", - column: "spell_id"); - - migrationBuilder.CreateIndex( - name: "ix_deity_training_skills_id", - table: "deity_training", - column: "skills_id"); - - migrationBuilder.CreateIndex( - name: "ix_deity_weapons_deity_id", - table: "deity_weapons", - column: "deity_id"); - - migrationBuilder.CreateIndex( - name: "ix_entity_externals_target_id", - table: "entity_externals", - column: "target_id"); - - migrationBuilder.CreateIndex( - name: "ix_entity_keyword_keywords_id", - table: "entity_keyword", - column: "keywords_id"); - - migrationBuilder.CreateIndex( - name: "ix_entity_sources_source_id", - table: "entity_sources", - column: "source_id"); - - migrationBuilder.CreateIndex( - name: "ix_entity_trait_traits_id", - table: "entity_trait", - column: "traits_id"); - - migrationBuilder.CreateIndex( - name: "ix_feat_prerequisites_feat_id", - table: "feat_prerequisites", - column: "feat_id"); - - migrationBuilder.CreateIndex( - name: "ix_heritages_ancestry_id", - table: "heritages", - column: "ancestry_id"); - - migrationBuilder.CreateIndex( - name: "ix_keyword_aliases_keyword_id", - table: "keyword_aliases", - column: "keyword_id"); - - migrationBuilder.CreateIndex( - name: "ix_spell_damages_spell_id", - table: "spell_damages", - column: "spell_id"); - - migrationBuilder.CreateIndex( - name: "ix_spell_defenses_spell_id", - table: "spell_defenses", - column: "spell_id"); - } - - /// - protected override void Down(MigrationBuilder migrationBuilder) - { - migrationBuilder.DropTable( - name: "actions"); - - migrationBuilder.DropTable( - name: "ancestry_boosts"); - - migrationBuilder.DropTable( - name: "ancestry_items"); - - migrationBuilder.DropTable( - name: "ancestry_languages"); - - migrationBuilder.DropTable( - name: "background_boosts"); - - migrationBuilder.DropTable( - name: "background_items"); - - migrationBuilder.DropTable( - name: "background_skills"); - - migrationBuilder.DropTable( - name: "class_key_abilities"); - - migrationBuilder.DropTable( - name: "class_progressions"); - - migrationBuilder.DropTable( - name: "class_trainings"); - - migrationBuilder.DropTable( - name: "conditions"); - - migrationBuilder.DropTable( - name: "deity_attributes"); - - migrationBuilder.DropTable( - name: "deity_domains"); - - migrationBuilder.DropTable( - name: "deity_spells"); - - migrationBuilder.DropTable( - name: "deity_training"); - - migrationBuilder.DropTable( - name: "deity_weapons"); - - migrationBuilder.DropTable( - name: "entity_aliases"); - - migrationBuilder.DropTable( - name: "entity_externals"); - - migrationBuilder.DropTable( - name: "entity_keyword"); - - migrationBuilder.DropTable( - name: "entity_sources"); - - migrationBuilder.DropTable( - name: "entity_trait"); - - migrationBuilder.DropTable( - name: "feat_prerequisites"); - - migrationBuilder.DropTable( - name: "frequencies"); - - migrationBuilder.DropTable( - name: "heritages"); - - migrationBuilder.DropTable( - name: "keyword_aliases"); - - migrationBuilder.DropTable( - name: "spell_areas"); - - migrationBuilder.DropTable( - name: "spell_damages"); - - migrationBuilder.DropTable( - name: "spell_defenses"); - - migrationBuilder.DropTable( - name: "spell_rituals"); - - migrationBuilder.DropTable( - name: "languages"); - - migrationBuilder.DropTable( - name: "backgrounds"); - - migrationBuilder.DropTable( - name: "classes"); - - migrationBuilder.DropTable( - name: "trainings"); - - migrationBuilder.DropTable( - name: "deities"); - - migrationBuilder.DropTable( - name: "external_targets"); - - migrationBuilder.DropTable( - name: "sources"); - - migrationBuilder.DropTable( - name: "traits"); - - migrationBuilder.DropTable( - name: "feats"); - - migrationBuilder.DropTable( - name: "ancestries"); - - migrationBuilder.DropTable( - name: "keywords"); - - migrationBuilder.DropTable( - name: "spells"); - - migrationBuilder.DropTable( - name: "entities"); - } - } -} diff --git a/Pf2eDataScrapper/Migrations/20250418063636_EnumUpdate.Designer.cs b/Pf2eDataScrapper/Migrations/20250418063636_EnumUpdate.Designer.cs deleted file mode 100644 index 695e943..0000000 --- a/Pf2eDataScrapper/Migrations/20250418063636_EnumUpdate.Designer.cs +++ /dev/null @@ -1,2054 +0,0 @@ -// -using System; -using Microsoft.EntityFrameworkCore; -using Microsoft.EntityFrameworkCore.Infrastructure; -using Microsoft.EntityFrameworkCore.Migrations; -using Microsoft.EntityFrameworkCore.Storage.ValueConversion; -using Npgsql.EntityFrameworkCore.PostgreSQL.Metadata; -using Pf2eDataScrapper.Model; -using Pf2eDataScrapper.Model.Enum; - -#nullable disable - -namespace Pf2eDataScrapper.Migrations -{ - [DbContext(typeof(Pf2eDbContext))] - [Migration("20250418063636_EnumUpdate")] - partial class EnumUpdate - { - /// - protected override void BuildTargetModel(ModelBuilder modelBuilder) - { -#pragma warning disable 612, 618 - modelBuilder - .HasAnnotation("ProductVersion", "9.0.4") - .HasAnnotation("Relational:MaxIdentifierLength", 63); - - NpgsqlModelBuilderExtensions.HasPostgresEnum(modelBuilder, "action_category", new[] { "unknown", "offensive", "defensive", "interaction", "familiar", "army_tactic", "army_war_action", "kingdom_activity", "kingdom_feat", "kingdom_feature" }); - NpgsqlModelBuilderExtensions.HasPostgresEnum(modelBuilder, "action_type", new[] { "none", "1_action", "2_actions", "3_actions", "1-3_actions", "1-2_actions" }); - NpgsqlModelBuilderExtensions.HasPostgresEnum(modelBuilder, "alias_type", new[] { "legacy", "english", "legacy_english", "hobby", "other" }); - NpgsqlModelBuilderExtensions.HasPostgresEnum(modelBuilder, "ancestry_vision", new[] { "normal", "low-light-vision", "darkvision" }); - NpgsqlModelBuilderExtensions.HasPostgresEnum(modelBuilder, "attribute_values", new[] { "any", "str", "dex", "con", "int", "wis", "cha" }); - NpgsqlModelBuilderExtensions.HasPostgresEnum(modelBuilder, "class_progression_type", new[] { "entity", "ancestry_feat", "class_feat", "general_feat", "skill_feat", "skill_increase" }); - NpgsqlModelBuilderExtensions.HasPostgresEnum(modelBuilder, "condition_group", new[] { "unknown", "senses", "abilities", "death", "attitudes", "detection" }); - NpgsqlModelBuilderExtensions.HasPostgresEnum(modelBuilder, "deity_category", new[] { "deity", "pantheon", "covenant", "philosophy" }); - NpgsqlModelBuilderExtensions.HasPostgresEnum(modelBuilder, "deity_fonts", new[] { "none", "heal", "harm", "any" }); - NpgsqlModelBuilderExtensions.HasPostgresEnum(modelBuilder, "deity_sanctification", new[] { "holy", "unholy", "any" }); - NpgsqlModelBuilderExtensions.HasPostgresEnum(modelBuilder, "entity_rarity", new[] { "common", "uncommon", "rare", "unique" }); - NpgsqlModelBuilderExtensions.HasPostgresEnum(modelBuilder, "entity_type", new[] { "unknown", "trait", "action", "ancestry", "background", "backpack", "campaign_feature", "class", "condition", "deity", "feat", "heritage", "spell" }); - NpgsqlModelBuilderExtensions.HasPostgresEnum(modelBuilder, "feat_action_type", new[] { "passive", "action", "reaction", "free" }); - NpgsqlModelBuilderExtensions.HasPostgresEnum(modelBuilder, "feat_category", new[] { "ancestryfeature", "classfeature", "calling", "class", "skill", "general", "ancestry", "bonus", "deityboon", "curse", "pfsboon", "campaign_feature" }); - NpgsqlModelBuilderExtensions.HasPostgresEnum(modelBuilder, "size", new[] { "med", "tiny" }); - NpgsqlModelBuilderExtensions.HasPostgresEnum(modelBuilder, "source_category", new[] { "rulebook", "adventure-path", "lost-omens", "adventures", "comics", "blog-posts", "society" }); - NpgsqlModelBuilderExtensions.HasPostgresEnum(modelBuilder, "spell_area_type", new[] { "burst", "emanation", "cone", "line", "square", "cube", "cylinder" }); - NpgsqlModelBuilderExtensions.HasPostgresEnum(modelBuilder, "spell_damage_category", new[] { "persistent", "splash" }); - NpgsqlModelBuilderExtensions.HasPostgresEnum(modelBuilder, "spell_damage_kinds", new[] { "damage", "healing", "any" }); - NpgsqlModelBuilderExtensions.HasPostgresEnum(modelBuilder, "training_stage", new[] { "untrained", "trained", "expert", "master", "legendary" }); - NpgsqlModelBuilderExtensions.HasPostgresEnum(modelBuilder, "trait_type", new[] { "regular", "tradition" }); - NpgsqlModelBuilderExtensions.UseIdentityByDefaultColumns(modelBuilder); - - modelBuilder.Entity("DeityTraining", b => - { - b.Property("DeityId") - .HasColumnType("integer") - .HasColumnName("deity_id"); - - b.Property("SkillsId") - .HasColumnType("integer") - .HasColumnName("skills_id"); - - b.HasKey("DeityId", "SkillsId") - .HasName("pk_deity_training"); - - b.HasIndex("SkillsId") - .HasDatabaseName("ix_deity_training_skills_id"); - - b.ToTable("deity_training", (string)null); - }); - - modelBuilder.Entity("EntityKeyword", b => - { - b.Property("EntitiesId") - .HasColumnType("integer") - .HasColumnName("entities_id"); - - b.Property("KeywordsId") - .HasColumnType("integer") - .HasColumnName("keywords_id"); - - b.HasKey("EntitiesId", "KeywordsId") - .HasName("pk_entity_keyword"); - - b.HasIndex("KeywordsId") - .HasDatabaseName("ix_entity_keyword_keywords_id"); - - b.ToTable("entity_keyword", (string)null); - }); - - modelBuilder.Entity("EntityTrait", b => - { - b.Property("EntitiesId") - .HasColumnType("integer") - .HasColumnName("entities_id"); - - b.Property("TraitsId") - .HasColumnType("integer") - .HasColumnName("traits_id"); - - b.HasKey("EntitiesId", "TraitsId") - .HasName("pk_entity_trait"); - - b.HasIndex("TraitsId") - .HasDatabaseName("ix_entity_trait_traits_id"); - - b.ToTable("entity_trait", (string)null); - }); - - modelBuilder.Entity("Pf2eDataScrapper.Model.Base.Entity", b => - { - b.Property("Id") - .ValueGeneratedOnAdd() - .HasColumnType("integer") - .HasColumnName("id") - .HasColumnOrder(1); - - NpgsqlPropertyBuilderExtensions.UseIdentityByDefaultColumn(b.Property("Id")); - - b.Property("Description") - .IsRequired() - .HasColumnType("text") - .HasColumnName("description") - .HasColumnOrder(6) - .HasComment("Текстовое описание объекта"); - - b.Property("Img") - .IsRequired() - .HasMaxLength(255) - .HasColumnType("character varying(255)") - .HasColumnName("img") - .HasColumnOrder(5) - .HasComment("Изображение объекта"); - - b.Property("IsChecked") - .HasColumnType("boolean") - .HasColumnName("is_checked") - .HasColumnOrder(9) - .HasComment("Флаг, указывающий, что объект был проверен и не требует автоматической перезаписи"); - - b.Property("IsTranslated") - .HasColumnType("boolean") - .HasColumnName("is_translated") - .HasColumnOrder(8) - .HasComment("Флаг, указывающий, что у объекта существует перевод"); - - b.Property("Name") - .IsRequired() - .HasMaxLength(255) - .HasColumnType("character varying(255)") - .HasColumnName("name") - .HasColumnOrder(2) - .HasComment("Отображаемое имя"); - - b.Property("Rarity") - .HasColumnType("entity_rarity") - .HasColumnName("rarity") - .HasColumnOrder(7); - - b.Property("Slug") - .IsRequired() - .HasMaxLength(255) - .HasColumnType("character varying(255)") - .HasColumnName("slug") - .HasColumnOrder(4) - .HasComment("Часть имени в URL"); - - b.Property("Type") - .HasColumnType("entity_type") - .HasColumnName("type") - .HasColumnOrder(3) - .HasComment("Тип объекта"); - - b.HasKey("Id") - .HasName("pk_entities"); - - b.ToTable("entities", (string)null); - }); - - modelBuilder.Entity("Pf2eDataScrapper.Model.Base.EntityAlias", b => - { - b.Property("EntityId") - .HasColumnType("integer") - .HasColumnName("entity_id") - .HasColumnOrder(1); - - b.Property("Type") - .HasColumnType("alias_type") - .HasColumnName("type") - .HasColumnOrder(2); - - b.Property("Alias") - .IsRequired() - .HasMaxLength(255) - .HasColumnType("character varying(255)") - .HasColumnName("alias") - .HasColumnOrder(3); - - b.HasKey("EntityId", "Type") - .HasName("pk_entity_aliases"); - - b.ToTable("entity_aliases", (string)null); - }); - - modelBuilder.Entity("Pf2eDataScrapper.Model.Base.Keywords.Keyword", b => - { - b.Property("Id") - .ValueGeneratedOnAdd() - .HasColumnType("integer") - .HasColumnName("id") - .HasColumnOrder(1); - - NpgsqlPropertyBuilderExtensions.UseIdentityByDefaultColumn(b.Property("Id")); - - b.Property("Slug") - .IsRequired() - .HasColumnType("text") - .HasColumnName("slug") - .HasColumnOrder(2); - - b.HasKey("Id") - .HasName("pk_keywords"); - - b.ToTable("keywords", (string)null); - }); - - modelBuilder.Entity("Pf2eDataScrapper.Model.Base.Keywords.KeywordAlias", b => - { - b.Property("Id") - .ValueGeneratedOnAdd() - .HasColumnType("integer") - .HasColumnName("id") - .HasColumnOrder(1); - - NpgsqlPropertyBuilderExtensions.UseIdentityByDefaultColumn(b.Property("Id")); - - b.Property("KeywordId") - .HasColumnType("integer") - .HasColumnName("keyword_id") - .HasColumnOrder(2); - - b.Property("Value") - .IsRequired() - .HasMaxLength(255) - .HasColumnType("character varying(255)") - .HasColumnName("value") - .HasColumnOrder(3); - - b.HasKey("Id") - .HasName("pk_keyword_aliases"); - - b.HasIndex("KeywordId") - .HasDatabaseName("ix_keyword_aliases_keyword_id"); - - b.ToTable("keyword_aliases", (string)null); - }); - - modelBuilder.Entity("Pf2eDataScrapper.Model.Base.Source.EntitySource", b => - { - b.Property("EntityId") - .HasColumnType("integer") - .HasColumnName("entity_id") - .HasColumnOrder(1); - - b.Property("SourceId") - .HasColumnType("integer") - .HasColumnName("source_id") - .HasColumnOrder(2); - - b.Property("IsRemaster") - .HasColumnType("boolean") - .HasColumnName("is_remaster") - .HasColumnOrder(4) - .HasComment("Флаг, указывающий, что объект является частью ремастера"); - - b.Property("Suffix") - .IsRequired() - .HasMaxLength(255) - .HasColumnType("character varying(255)") - .HasColumnName("suffix") - .HasColumnOrder(3) - .HasComment("Номер страницы, эррата и т.д."); - - b.HasKey("EntityId", "SourceId") - .HasName("pk_entity_sources"); - - b.HasIndex("SourceId") - .HasDatabaseName("ix_entity_sources_source_id"); - - b.ToTable("entity_sources", (string)null); - }); - - modelBuilder.Entity("Pf2eDataScrapper.Model.Base.Source.Source", b => - { - b.Property("Id") - .ValueGeneratedOnAdd() - .HasColumnType("integer") - .HasColumnName("id") - .HasColumnOrder(1); - - NpgsqlPropertyBuilderExtensions.UseIdentityByDefaultColumn(b.Property("Id")); - - b.Property("Category") - .HasColumnType("source_category") - .HasColumnName("category") - .HasColumnOrder(3); - - b.Property("Name") - .IsRequired() - .HasMaxLength(255) - .HasColumnType("character varying(255)") - .HasColumnName("name") - .HasColumnOrder(2); - - b.Property("ReleaseDate") - .HasColumnType("date") - .HasColumnName("release_date") - .HasColumnOrder(4); - - b.HasKey("Id") - .HasName("pk_sources"); - - b.ToTable("sources", (string)null); - }); - - modelBuilder.Entity("Pf2eDataScrapper.Model.Base.Targets.EntityExternal", b => - { - b.Property("EntityId") - .HasColumnType("integer") - .HasColumnName("entity_id") - .HasColumnOrder(0); - - b.Property("TargetId") - .HasColumnType("integer") - .HasColumnName("target_id") - .HasColumnOrder(1); - - b.Property("Md5") - .IsRequired() - .HasMaxLength(32) - .HasColumnType("character varying(32)") - .HasColumnName("md5") - .HasColumnOrder(3) - .HasComment("Контроль версии объекта"); - - b.Property("Suffix") - .IsRequired() - .HasMaxLength(255) - .HasColumnType("character varying(255)") - .HasColumnName("suffix") - .HasColumnOrder(2) - .HasComment("Часть URL до объекта. Для источников Foundry - полный UUID объекта"); - - b.HasKey("EntityId", "TargetId") - .HasName("pk_entity_externals"); - - b.HasIndex("TargetId") - .HasDatabaseName("ix_entity_externals_target_id"); - - b.ToTable("entity_externals", (string)null); - }); - - modelBuilder.Entity("Pf2eDataScrapper.Model.Base.Targets.ExternalTarget", b => - { - b.Property("Id") - .ValueGeneratedOnAdd() - .HasColumnType("integer") - .HasColumnName("id") - .HasColumnOrder(1); - - NpgsqlPropertyBuilderExtensions.UseIdentityByDefaultColumn(b.Property("Id")); - - b.Property("Icon") - .IsRequired() - .HasMaxLength(255) - .HasColumnType("character varying(255)") - .HasColumnName("icon") - .HasColumnOrder(3); - - b.Property("Name") - .IsRequired() - .HasMaxLength(255) - .HasColumnType("character varying(255)") - .HasColumnName("name") - .HasColumnOrder(2); - - b.Property("Prefix") - .IsRequired() - .HasMaxLength(255) - .HasColumnType("character varying(255)") - .HasColumnName("prefix") - .HasColumnOrder(3); - - b.HasKey("Id") - .HasName("pk_external_targets"); - - b.ToTable("external_targets", (string)null); - }); - - modelBuilder.Entity("Pf2eDataScrapper.Model.Common.Frequency", b => - { - b.Property("Id") - .ValueGeneratedOnAdd() - .HasColumnType("integer") - .HasColumnName("id") - .HasColumnOrder(1); - - NpgsqlPropertyBuilderExtensions.UseIdentityByDefaultColumn(b.Property("Id")); - - b.Property("Max") - .HasColumnType("integer") - .HasColumnName("max") - .HasColumnOrder(2); - - b.Property("Per") - .HasColumnType("integer") - .HasColumnName("per") - .HasColumnOrder(3); - - b.Property("Value") - .HasColumnType("integer") - .HasColumnName("value") - .HasColumnOrder(4); - - b.HasKey("Id") - .HasName("pk_frequencies"); - - b.ToTable("frequencies", (string)null); - }); - - modelBuilder.Entity("Pf2eDataScrapper.Model.Common.Language", b => - { - b.Property("Id") - .ValueGeneratedOnAdd() - .HasColumnType("integer") - .HasColumnName("id") - .HasColumnOrder(1); - - NpgsqlPropertyBuilderExtensions.UseIdentityByDefaultColumn(b.Property("Id")); - - b.Property("Name") - .IsRequired() - .HasMaxLength(255) - .HasColumnType("character varying(255)") - .HasColumnName("name") - .HasColumnOrder(2); - - b.Property("Rarity") - .HasColumnType("entity_rarity") - .HasColumnName("rarity") - .HasColumnOrder(4); - - b.Property("Slug") - .IsRequired() - .HasMaxLength(255) - .HasColumnType("character varying(255)") - .HasColumnName("slug") - .HasColumnOrder(3); - - b.HasKey("Id") - .HasName("pk_languages"); - - b.ToTable("languages", (string)null); - }); - - modelBuilder.Entity("Pf2eDataScrapper.Model.Common.Training", b => - { - b.Property("Id") - .ValueGeneratedOnAdd() - .HasColumnType("integer") - .HasColumnName("id") - .HasColumnOrder(1); - - NpgsqlPropertyBuilderExtensions.UseIdentityByDefaultColumn(b.Property("Id")); - - b.Property("Key") - .IsRequired() - .HasMaxLength(255) - .HasColumnType("character varying(255)") - .HasColumnName("key") - .HasColumnOrder(2); - - b.HasKey("Id") - .HasName("pk_trainings"); - - b.ToTable("trainings", (string)null); - }); - - modelBuilder.Entity("Pf2eDataScrapper.Model.Structure.Action", b => - { - b.Property("Id") - .HasColumnType("integer") - .HasColumnName("id") - .HasColumnOrder(1); - - b.Property("Actions") - .HasColumnType("integer") - .HasColumnName("actions") - .HasColumnOrder(3); - - b.Property("Extra") - .HasColumnType("text") - .HasColumnName("extra") - .HasColumnOrder(6); - - b.Property("IsFreeAction") - .HasColumnType("boolean") - .HasColumnName("is_free_action") - .HasColumnOrder(6); - - b.Property("IsPassive") - .HasColumnType("boolean") - .HasColumnName("is_passive") - .HasColumnOrder(6); - - b.Property("IsReaction") - .HasColumnType("boolean") - .HasColumnName("is_reaction") - .HasColumnOrder(5); - - b.Property("MaxActions") - .HasColumnType("integer") - .HasColumnName("max_actions") - .HasColumnOrder(4); - - b.Property("Type") - .HasColumnType("action_type") - .HasColumnName("type") - .HasColumnOrder(2); - - b.HasKey("Id") - .HasName("pk_actions"); - - b.ToTable("actions", (string)null); - }); - - modelBuilder.Entity("Pf2eDataScrapper.Model.Structure.Ancestry", b => - { - b.Property("Id") - .HasColumnType("integer") - .HasColumnName("id") - .HasColumnOrder(1); - - b.Property("Hp") - .HasColumnType("integer") - .HasColumnName("hp") - .HasColumnOrder(3); - - b.Property("Reach") - .HasColumnType("integer") - .HasColumnName("reach") - .HasColumnOrder(4); - - b.Property("Size") - .HasColumnType("size") - .HasColumnName("size") - .HasColumnOrder(2); - - b.Property("Speed") - .HasColumnType("integer") - .HasColumnName("speed") - .HasColumnOrder(5); - - b.Property("Vision") - .HasColumnType("ancestry_vision") - .HasColumnName("vision") - .HasColumnOrder(6); - - b.HasKey("Id") - .HasName("pk_ancestries"); - - b.ToTable("ancestries", (string)null); - }); - - modelBuilder.Entity("Pf2eDataScrapper.Model.Structure.AncestryRelation.AncestryBoost", b => - { - b.Property("Id") - .ValueGeneratedOnAdd() - .HasColumnType("integer") - .HasColumnName("id") - .HasColumnOrder(1); - - NpgsqlPropertyBuilderExtensions.UseIdentityByDefaultColumn(b.Property("Id")); - - b.Property("AncestryId") - .HasColumnType("integer") - .HasColumnName("ancestry_id") - .HasColumnOrder(2); - - b.Property("Boost") - .HasColumnType("boolean") - .HasColumnName("boost") - .HasColumnOrder(3); - - b.Property("Value") - .HasColumnType("attribute_values") - .HasColumnName("value") - .HasColumnOrder(4); - - b.HasKey("Id") - .HasName("pk_ancestry_boosts"); - - b.HasIndex("AncestryId") - .HasDatabaseName("ix_ancestry_boosts_ancestry_id"); - - b.ToTable("ancestry_boosts", (string)null); - }); - - modelBuilder.Entity("Pf2eDataScrapper.Model.Structure.AncestryRelation.AncestryItem", b => - { - b.Property("AncestryId") - .HasColumnType("integer") - .HasColumnName("ancestry_id") - .HasColumnOrder(1); - - b.Property("ItemId") - .HasColumnType("integer") - .HasColumnName("item_id") - .HasColumnOrder(2); - - b.Property("Level") - .HasColumnType("integer") - .HasColumnName("level") - .HasColumnOrder(3); - - b.HasKey("AncestryId", "ItemId") - .HasName("pk_ancestry_items"); - - b.HasIndex("ItemId") - .HasDatabaseName("ix_ancestry_items_item_id"); - - b.ToTable("ancestry_items", (string)null); - }); - - modelBuilder.Entity("Pf2eDataScrapper.Model.Structure.AncestryRelation.AncestryLanguage", b => - { - b.Property("AncestryId") - .HasColumnType("integer") - .HasColumnName("ancestry_id") - .HasColumnOrder(1); - - b.Property("LanguageId") - .HasColumnType("integer") - .HasColumnName("language_id") - .HasColumnOrder(2); - - b.Property("IsAdditional") - .HasColumnType("boolean") - .HasColumnName("is_additional") - .HasColumnOrder(3); - - b.HasKey("AncestryId", "LanguageId") - .HasName("pk_ancestry_languages"); - - b.HasIndex("LanguageId") - .HasDatabaseName("ix_ancestry_languages_language_id"); - - b.ToTable("ancestry_languages", (string)null); - }); - - modelBuilder.Entity("Pf2eDataScrapper.Model.Structure.Background", b => - { - b.Property("Id") - .HasColumnType("integer") - .HasColumnName("id") - .HasColumnOrder(1); - - b.HasKey("Id") - .HasName("pk_backgrounds"); - - b.ToTable("backgrounds", (string)null); - }); - - modelBuilder.Entity("Pf2eDataScrapper.Model.Structure.BackgroundRelation.BackgroundBoost", b => - { - b.Property("Id") - .HasColumnType("integer") - .HasColumnName("id") - .HasColumnOrder(1); - - b.Property("Attribute") - .HasColumnType("attribute_values") - .HasColumnName("attribute") - .HasColumnOrder(3); - - b.Property("BackgroundId") - .HasColumnType("integer") - .HasColumnName("background_id") - .HasColumnOrder(2); - - b.HasKey("Id") - .HasName("pk_background_boosts"); - - b.HasIndex("BackgroundId") - .HasDatabaseName("ix_background_boosts_background_id"); - - b.ToTable("background_boosts", (string)null); - }); - - modelBuilder.Entity("Pf2eDataScrapper.Model.Structure.BackgroundRelation.BackgroundItem", b => - { - b.Property("BackgroundId") - .HasColumnType("integer") - .HasColumnName("background_id") - .HasColumnOrder(1); - - b.Property("EntityId") - .HasColumnType("integer") - .HasColumnName("entity_id") - .HasColumnOrder(2); - - b.Property("Level") - .HasColumnType("integer") - .HasColumnName("level") - .HasColumnOrder(3); - - b.HasKey("BackgroundId", "EntityId") - .HasName("pk_background_items"); - - b.HasIndex("EntityId") - .HasDatabaseName("ix_background_items_entity_id"); - - b.ToTable("background_items", (string)null); - }); - - modelBuilder.Entity("Pf2eDataScrapper.Model.Structure.BackgroundRelation.BackgroundTraining", b => - { - b.Property("Id") - .HasColumnType("integer") - .HasColumnName("id") - .HasColumnOrder(1); - - b.Property("BackgroundId") - .HasColumnType("integer") - .HasColumnName("background_id") - .HasColumnOrder(2); - - b.Property("Level") - .HasColumnType("training_stage") - .HasColumnName("level") - .HasColumnOrder(4); - - b.Property("TrainingId") - .HasColumnType("integer") - .HasColumnName("training_id") - .HasColumnOrder(3); - - b.HasKey("Id") - .HasName("pk_background_skills"); - - b.HasIndex("BackgroundId") - .HasDatabaseName("ix_background_skills_background_id"); - - b.HasIndex("TrainingId") - .HasDatabaseName("ix_background_skills_training_id"); - - b.ToTable("background_skills", (string)null); - }); - - modelBuilder.Entity("Pf2eDataScrapper.Model.Structure.Class", b => - { - b.Property("Id") - .HasColumnType("integer") - .HasColumnName("id") - .HasColumnOrder(1); - - b.Property("AdditionalTrainedSkills") - .HasColumnType("integer") - .HasColumnName("additional_trained_skills") - .HasColumnOrder(6); - - b.Property("Hp") - .HasColumnType("integer") - .HasColumnName("hp") - .HasColumnOrder(3); - - b.Property("Perception") - .HasColumnType("integer") - .HasColumnName("perception") - .HasColumnOrder(4); - - b.Property("Spellcasting") - .HasColumnType("boolean") - .HasColumnName("spellcasting") - .HasColumnOrder(5); - - b.HasKey("Id") - .HasName("pk_classes"); - - b.ToTable("classes", (string)null); - }); - - modelBuilder.Entity("Pf2eDataScrapper.Model.Structure.ClassRelation.ClassKeyAbility", b => - { - b.Property("Id") - .ValueGeneratedOnAdd() - .HasColumnType("integer") - .HasColumnName("id") - .HasColumnOrder(1); - - NpgsqlPropertyBuilderExtensions.UseIdentityByDefaultColumn(b.Property("Id")); - - b.Property("ClassId") - .HasColumnType("integer") - .HasColumnName("class_id") - .HasColumnOrder(2); - - b.Property("Value") - .HasColumnType("attribute_values") - .HasColumnName("value") - .HasColumnOrder(3); - - b.HasKey("Id") - .HasName("pk_class_key_abilities"); - - b.HasIndex("ClassId") - .HasDatabaseName("ix_class_key_abilities_class_id"); - - b.ToTable("class_key_abilities", (string)null); - }); - - modelBuilder.Entity("Pf2eDataScrapper.Model.Structure.ClassRelation.ClassProgression", b => - { - b.Property("Id") - .ValueGeneratedOnAdd() - .HasColumnType("integer") - .HasColumnName("id") - .HasColumnOrder(1); - - NpgsqlPropertyBuilderExtensions.UseIdentityByDefaultColumn(b.Property("Id")); - - b.Property("ClassId") - .HasColumnType("integer") - .HasColumnName("class_id") - .HasColumnOrder(2); - - b.Property("EntityId") - .HasColumnType("integer") - .HasColumnName("entity_id") - .HasColumnOrder(5); - - b.Property("Level") - .HasColumnType("integer") - .HasColumnName("level") - .HasColumnOrder(31); - - b.Property("Type") - .HasColumnType("class_progression_type") - .HasColumnName("type") - .HasColumnOrder(4); - - b.HasKey("Id") - .HasName("pk_class_progressions"); - - b.HasIndex("ClassId") - .HasDatabaseName("ix_class_progressions_class_id"); - - b.HasIndex("EntityId") - .HasDatabaseName("ix_class_progressions_entity_id"); - - b.ToTable("class_progressions", (string)null); - }); - - modelBuilder.Entity("Pf2eDataScrapper.Model.Structure.ClassRelation.ClassTraining", b => - { - b.Property("Id") - .ValueGeneratedOnAdd() - .HasColumnType("integer") - .HasColumnName("id") - .HasColumnOrder(1); - - NpgsqlPropertyBuilderExtensions.UseIdentityByDefaultColumn(b.Property("Id")); - - b.Property("ClassId") - .HasColumnType("integer") - .HasColumnName("class_id") - .HasColumnOrder(2); - - b.Property("Name") - .HasMaxLength(255) - .HasColumnType("character varying(255)") - .HasColumnName("name") - .HasColumnOrder(4); - - b.Property("Stage") - .HasColumnType("integer") - .HasColumnName("stage") - .HasColumnOrder(5); - - b.Property("TrainingId") - .HasColumnType("integer") - .HasColumnName("training_id") - .HasColumnOrder(3); - - b.HasKey("Id") - .HasName("pk_class_trainings"); - - b.HasIndex("ClassId") - .HasDatabaseName("ix_class_trainings_class_id"); - - b.HasIndex("TrainingId") - .HasDatabaseName("ix_class_trainings_training_id"); - - b.ToTable("class_trainings", (string)null); - }); - - modelBuilder.Entity("Pf2eDataScrapper.Model.Structure.Condition", b => - { - b.Property("Id") - .HasColumnType("integer") - .HasColumnName("id") - .HasColumnOrder(1); - - b.Property("Extra") - .HasColumnType("text") - .HasColumnName("extra") - .HasColumnOrder(3); - - b.Property("Group") - .HasColumnType("condition_group") - .HasColumnName("group") - .HasColumnOrder(2); - - b.HasKey("Id") - .HasName("pk_conditions"); - - b.ToTable("conditions", (string)null); - }); - - modelBuilder.Entity("Pf2eDataScrapper.Model.Structure.Deity", b => - { - b.Property("Id") - .HasColumnType("integer") - .HasColumnName("id") - .HasColumnOrder(1); - - b.Property("Category") - .HasColumnType("deity_category") - .HasColumnName("category") - .HasColumnOrder(2); - - b.Property("Fonts") - .HasColumnType("deity_fonts") - .HasColumnName("fonts") - .HasColumnOrder(3); - - b.Property("Sanctification") - .HasColumnType("deity_sanctification") - .HasColumnName("sanctification") - .HasColumnOrder(4); - - b.Property("SanctificationMust") - .HasColumnType("boolean") - .HasColumnName("sanctification_must") - .HasColumnOrder(5); - - b.HasKey("Id") - .HasName("pk_deities"); - - b.ToTable("deities", (string)null); - }); - - modelBuilder.Entity("Pf2eDataScrapper.Model.Structure.DeityRelation.DeityAttribute", b => - { - b.Property("DeityId") - .HasColumnType("integer") - .HasColumnName("deity_id") - .HasColumnOrder(1); - - b.Property("Attribute") - .HasColumnType("attribute_values") - .HasColumnName("attribute") - .HasColumnOrder(2); - - b.HasKey("DeityId", "Attribute") - .HasName("pk_deity_attributes"); - - b.ToTable("deity_attributes", (string)null); - }); - - modelBuilder.Entity("Pf2eDataScrapper.Model.Structure.DeityRelation.DeityDomain", b => - { - b.Property("Id") - .ValueGeneratedOnAdd() - .HasColumnType("integer") - .HasColumnName("id") - .HasColumnOrder(1); - - NpgsqlPropertyBuilderExtensions.UseIdentityByDefaultColumn(b.Property("Id")); - - b.Property("DeityId") - .HasColumnType("integer") - .HasColumnName("deity_id") - .HasColumnOrder(2); - - b.Property("IsPrimary") - .HasColumnType("boolean") - .HasColumnName("is_primary") - .HasColumnOrder(3); - - b.Property("Value") - .IsRequired() - .HasMaxLength(255) - .HasColumnType("character varying(255)") - .HasColumnName("value") - .HasColumnOrder(4); - - b.HasKey("Id") - .HasName("pk_deity_domains"); - - b.HasIndex("DeityId") - .HasDatabaseName("ix_deity_domains_deity_id"); - - b.ToTable("deity_domains", (string)null); - }); - - modelBuilder.Entity("Pf2eDataScrapper.Model.Structure.DeityRelation.DeitySpell", b => - { - b.Property("Id") - .ValueGeneratedOnAdd() - .HasColumnType("integer") - .HasColumnName("id") - .HasColumnOrder(1); - - NpgsqlPropertyBuilderExtensions.UseIdentityByDefaultColumn(b.Property("Id")); - - b.Property("DeityId") - .HasColumnType("integer") - .HasColumnName("deity_id") - .HasColumnOrder(2); - - b.Property("Level") - .HasColumnType("integer") - .HasColumnName("level") - .HasColumnOrder(3); - - b.Property("SpellId") - .HasColumnType("integer") - .HasColumnName("spell_id") - .HasColumnOrder(4); - - b.HasKey("Id") - .HasName("pk_deity_spells"); - - b.HasIndex("DeityId") - .HasDatabaseName("ix_deity_spells_deity_id"); - - b.HasIndex("SpellId") - .HasDatabaseName("ix_deity_spells_spell_id"); - - b.ToTable("deity_spells", (string)null); - }); - - modelBuilder.Entity("Pf2eDataScrapper.Model.Structure.DeityRelation.DeityWeapon", b => - { - b.Property("Id") - .ValueGeneratedOnAdd() - .HasColumnType("integer") - .HasColumnName("id") - .HasColumnOrder(1); - - NpgsqlPropertyBuilderExtensions.UseIdentityByDefaultColumn(b.Property("Id")); - - b.Property("DeityId") - .HasColumnType("integer") - .HasColumnName("deity_id") - .HasColumnOrder(2); - - b.Property("Weapon") - .IsRequired() - .HasMaxLength(255) - .HasColumnType("character varying(255)") - .HasColumnName("weapon") - .HasColumnOrder(3); - - b.HasKey("Id") - .HasName("pk_deity_weapons"); - - b.HasIndex("DeityId") - .HasDatabaseName("ix_deity_weapons_deity_id"); - - b.ToTable("deity_weapons", (string)null); - }); - - modelBuilder.Entity("Pf2eDataScrapper.Model.Structure.Feat", b => - { - b.Property("Id") - .HasColumnType("integer") - .HasColumnName("id") - .HasColumnOrder(1); - - b.Property("Actions") - .HasColumnType("integer") - .HasColumnName("actions") - .HasColumnOrder(4); - - b.Property("Category") - .HasColumnType("action_category") - .HasColumnName("category") - .HasColumnOrder(3); - - b.Property("Extra") - .HasColumnType("text") - .HasColumnName("extra") - .HasColumnOrder(10); - - b.Property("Level") - .HasColumnType("integer") - .HasColumnName("level") - .HasColumnOrder(5); - - b.Property("LevelTaken") - .HasColumnType("integer") - .HasColumnName("level_taken") - .HasColumnOrder(6); - - b.Property("Location") - .HasMaxLength(255) - .HasColumnType("character varying(255)") - .HasColumnName("location") - .HasColumnOrder(8); - - b.Property("MaxTakable") - .HasColumnType("integer") - .HasColumnName("max_takable") - .HasColumnOrder(7); - - b.Property("OnlyLevel1") - .HasColumnType("boolean") - .HasColumnName("only_level1") - .HasColumnOrder(9); - - b.Property("Type") - .HasColumnType("action_type") - .HasColumnName("type") - .HasColumnOrder(2); - - b.HasKey("Id") - .HasName("pk_feats"); - - b.ToTable("feats", (string)null); - }); - - modelBuilder.Entity("Pf2eDataScrapper.Model.Structure.FeatRelation.FeatPrerequisite", b => - { - b.Property("Id") - .ValueGeneratedOnAdd() - .HasColumnType("integer") - .HasColumnName("id") - .HasColumnOrder(1); - - NpgsqlPropertyBuilderExtensions.UseIdentityByDefaultColumn(b.Property("Id")); - - b.Property("FeatId") - .HasColumnType("integer") - .HasColumnName("feat_id") - .HasColumnOrder(2); - - b.Property("Value") - .IsRequired() - .HasMaxLength(255) - .HasColumnType("character varying(255)") - .HasColumnName("value") - .HasColumnOrder(3); - - b.HasKey("Id") - .HasName("pk_feat_prerequisites"); - - b.HasIndex("FeatId") - .HasDatabaseName("ix_feat_prerequisites_feat_id"); - - b.ToTable("feat_prerequisites", (string)null); - }); - - modelBuilder.Entity("Pf2eDataScrapper.Model.Structure.Heritage", b => - { - b.Property("Id") - .HasColumnType("integer") - .HasColumnName("id") - .HasColumnOrder(1); - - b.Property("AncestryId") - .HasColumnType("integer") - .HasColumnName("ancestry_id") - .HasColumnOrder(2); - - b.HasKey("Id") - .HasName("pk_heritages"); - - b.HasIndex("AncestryId") - .HasDatabaseName("ix_heritages_ancestry_id"); - - b.ToTable("heritages", (string)null); - }); - - modelBuilder.Entity("Pf2eDataScrapper.Model.Structure.Spell", b => - { - b.Property("Id") - .HasColumnType("integer") - .HasColumnName("id") - .HasColumnOrder(1); - - b.Property("CanHeightening") - .HasColumnType("boolean") - .HasColumnName("can_heightening") - .HasColumnOrder(11); - - b.Property("Cost") - .HasColumnType("integer") - .HasColumnName("cost") - .HasColumnOrder(3); - - b.Property("Counteraction") - .HasColumnType("boolean") - .HasColumnName("counteraction") - .HasColumnOrder(4); - - b.Property("Duration") - .IsRequired() - .HasMaxLength(255) - .HasColumnType("character varying(255)") - .HasColumnName("duration") - .HasColumnOrder(6); - - b.Property("Level") - .HasColumnType("integer") - .HasColumnName("level") - .HasColumnOrder(2); - - b.Property("Range") - .IsRequired() - .HasMaxLength(255) - .HasColumnType("character varying(255)") - .HasColumnName("range") - .HasColumnOrder(7); - - b.Property("Requirements") - .IsRequired() - .HasMaxLength(255) - .HasColumnType("character varying(255)") - .HasColumnName("requirements") - .HasColumnOrder(8); - - b.Property("Sustained") - .HasColumnType("boolean") - .HasColumnName("sustained") - .HasColumnOrder(5); - - b.Property("Target") - .IsRequired() - .HasMaxLength(255) - .HasColumnType("character varying(255)") - .HasColumnName("target") - .HasColumnOrder(9); - - b.Property("Time") - .IsRequired() - .HasMaxLength(255) - .HasColumnType("character varying(255)") - .HasColumnName("time") - .HasColumnOrder(10); - - b.HasKey("Id") - .HasName("pk_spells"); - - b.ToTable("spells", (string)null); - }); - - modelBuilder.Entity("Pf2eDataScrapper.Model.Structure.SpellRelation.SpellArea", b => - { - b.Property("SpellId") - .HasColumnType("integer") - .HasColumnName("spell_id") - .HasColumnOrder(1); - - b.Property("Details") - .HasMaxLength(255) - .HasColumnType("character varying(255)") - .HasColumnName("details") - .HasColumnOrder(2); - - b.Property("Type") - .HasColumnType("spell_area_type") - .HasColumnName("type") - .HasColumnOrder(3); - - b.Property("Value") - .HasColumnType("integer") - .HasColumnName("value") - .HasColumnOrder(4); - - b.HasKey("SpellId") - .HasName("pk_spell_areas"); - - b.ToTable("spell_areas", (string)null); - }); - - modelBuilder.Entity("Pf2eDataScrapper.Model.Structure.SpellRelation.SpellDamage", b => - { - b.Property("Id") - .ValueGeneratedOnAdd() - .HasColumnType("integer") - .HasColumnName("id") - .HasColumnOrder(1); - - NpgsqlPropertyBuilderExtensions.UseIdentityByDefaultColumn(b.Property("Id")); - - b.Property("ApplyMod") - .HasColumnType("boolean") - .HasColumnName("apply_mod") - .HasColumnOrder(4); - - b.Property("Category") - .HasColumnType("spell_damage_category") - .HasColumnName("category") - .HasColumnOrder(5); - - b.Property("Formula") - .IsRequired() - .HasMaxLength(255) - .HasColumnType("character varying(255)") - .HasColumnName("formula") - .HasColumnOrder(6); - - b.Property("Key") - .IsRequired() - .HasMaxLength(255) - .HasColumnType("character varying(255)") - .HasColumnName("key") - .HasColumnOrder(3); - - b.Property("Kinds") - .HasColumnType("spell_damage_kinds") - .HasColumnName("kinds") - .HasColumnOrder(7); - - b.Property("Materials") - .HasMaxLength(255) - .HasColumnType("character varying(255)") - .HasColumnName("materials") - .HasColumnOrder(8); - - b.Property("SpellId") - .HasColumnType("integer") - .HasColumnName("spell_id") - .HasColumnOrder(2); - - b.Property("Type") - .IsRequired() - .HasMaxLength(255) - .HasColumnType("character varying(255)") - .HasColumnName("type") - .HasColumnOrder(9); - - b.HasKey("Id") - .HasName("pk_spell_damages"); - - b.HasIndex("SpellId") - .HasDatabaseName("ix_spell_damages_spell_id"); - - b.ToTable("spell_damages", (string)null); - }); - - modelBuilder.Entity("Pf2eDataScrapper.Model.Structure.SpellRelation.SpellDefense", b => - { - b.Property("Id") - .ValueGeneratedOnAdd() - .HasColumnType("integer") - .HasColumnName("id") - .HasColumnOrder(1); - - NpgsqlPropertyBuilderExtensions.UseIdentityByDefaultColumn(b.Property("Id")); - - b.Property("IsBasic") - .HasColumnType("boolean") - .HasColumnName("is_basic") - .HasColumnOrder(4); - - b.Property("IsPassive") - .HasColumnType("boolean") - .HasColumnName("is_passive") - .HasColumnOrder(3); - - b.Property("SpellId") - .HasColumnType("integer") - .HasColumnName("spell_id") - .HasColumnOrder(2); - - b.Property("Statistic") - .IsRequired() - .HasMaxLength(255) - .HasColumnType("character varying(255)") - .HasColumnName("statistic") - .HasColumnOrder(5); - - b.HasKey("Id") - .HasName("pk_spell_defenses"); - - b.HasIndex("SpellId") - .HasDatabaseName("ix_spell_defenses_spell_id"); - - b.ToTable("spell_defenses", (string)null); - }); - - modelBuilder.Entity("Pf2eDataScrapper.Model.Structure.SpellRelation.SpellRitual", b => - { - b.Property("SpellId") - .HasColumnType("integer") - .HasColumnName("spell_id") - .HasColumnOrder(1); - - b.Property("PrimaryCheck") - .IsRequired() - .HasMaxLength(255) - .HasColumnType("character varying(255)") - .HasColumnName("primary_check") - .HasColumnOrder(2); - - b.Property("SecondaryCasters") - .HasColumnType("integer") - .HasColumnName("secondary_casters") - .HasColumnOrder(3); - - b.Property("SecondaryChecks") - .IsRequired() - .HasMaxLength(255) - .HasColumnType("character varying(255)") - .HasColumnName("secondary_checks") - .HasColumnOrder(4); - - b.HasKey("SpellId") - .HasName("pk_spell_rituals"); - - b.ToTable("spell_rituals", (string)null); - }); - - modelBuilder.Entity("Pf2eDataScrapper.Model.Structure.Trait", b => - { - b.Property("Id") - .HasColumnType("integer") - .HasColumnName("id") - .HasColumnOrder(1); - - b.Property("Type") - .HasColumnType("trait_type") - .HasColumnName("type") - .HasColumnOrder(2); - - b.HasKey("Id") - .HasName("pk_traits"); - - b.ToTable("traits", (string)null); - }); - - modelBuilder.Entity("DeityTraining", b => - { - b.HasOne("Pf2eDataScrapper.Model.Structure.Deity", null) - .WithMany() - .HasForeignKey("DeityId") - .OnDelete(DeleteBehavior.Cascade) - .IsRequired() - .HasConstraintName("fk_deity_training_deities_deity_id"); - - b.HasOne("Pf2eDataScrapper.Model.Common.Training", null) - .WithMany() - .HasForeignKey("SkillsId") - .OnDelete(DeleteBehavior.Cascade) - .IsRequired() - .HasConstraintName("fk_deity_training_trainings_skills_id"); - }); - - modelBuilder.Entity("EntityKeyword", b => - { - b.HasOne("Pf2eDataScrapper.Model.Base.Entity", null) - .WithMany() - .HasForeignKey("EntitiesId") - .OnDelete(DeleteBehavior.Cascade) - .IsRequired() - .HasConstraintName("fk_entity_keyword_entities_entities_id"); - - b.HasOne("Pf2eDataScrapper.Model.Base.Keywords.Keyword", null) - .WithMany() - .HasForeignKey("KeywordsId") - .OnDelete(DeleteBehavior.Cascade) - .IsRequired() - .HasConstraintName("fk_entity_keyword_keywords_keywords_id"); - }); - - modelBuilder.Entity("EntityTrait", b => - { - b.HasOne("Pf2eDataScrapper.Model.Base.Entity", null) - .WithMany() - .HasForeignKey("EntitiesId") - .OnDelete(DeleteBehavior.Cascade) - .IsRequired() - .HasConstraintName("fk_entity_trait_entities_entities_id"); - - b.HasOne("Pf2eDataScrapper.Model.Structure.Trait", null) - .WithMany() - .HasForeignKey("TraitsId") - .OnDelete(DeleteBehavior.Cascade) - .IsRequired() - .HasConstraintName("fk_entity_trait_traits_traits_id"); - }); - - modelBuilder.Entity("Pf2eDataScrapper.Model.Base.EntityAlias", b => - { - b.HasOne("Pf2eDataScrapper.Model.Base.Entity", "Entity") - .WithMany("Aliases") - .HasForeignKey("EntityId") - .OnDelete(DeleteBehavior.Cascade) - .IsRequired() - .HasConstraintName("fk_entity_aliases_entities_entity_id"); - - b.Navigation("Entity"); - }); - - modelBuilder.Entity("Pf2eDataScrapper.Model.Base.Keywords.KeywordAlias", b => - { - b.HasOne("Pf2eDataScrapper.Model.Base.Keywords.Keyword", "Keyword") - .WithMany("Aliases") - .HasForeignKey("KeywordId") - .OnDelete(DeleteBehavior.Cascade) - .IsRequired() - .HasConstraintName("fk_keyword_aliases_keywords_keyword_id"); - - b.Navigation("Keyword"); - }); - - modelBuilder.Entity("Pf2eDataScrapper.Model.Base.Source.EntitySource", b => - { - b.HasOne("Pf2eDataScrapper.Model.Base.Entity", "Entity") - .WithMany("Sources") - .HasForeignKey("EntityId") - .OnDelete(DeleteBehavior.Cascade) - .IsRequired() - .HasConstraintName("fk_entity_sources_entities_entity_id"); - - b.HasOne("Pf2eDataScrapper.Model.Base.Source.Source", "Source") - .WithMany("EntitySources") - .HasForeignKey("SourceId") - .OnDelete(DeleteBehavior.Cascade) - .IsRequired() - .HasConstraintName("fk_entity_sources_sources_source_id"); - - b.Navigation("Entity"); - - b.Navigation("Source"); - }); - - modelBuilder.Entity("Pf2eDataScrapper.Model.Base.Targets.EntityExternal", b => - { - b.HasOne("Pf2eDataScrapper.Model.Base.Entity", "Entity") - .WithMany("Externals") - .HasForeignKey("EntityId") - .OnDelete(DeleteBehavior.Cascade) - .IsRequired() - .HasConstraintName("fk_entity_externals_entities_entity_id"); - - b.HasOne("Pf2eDataScrapper.Model.Base.Targets.ExternalTarget", "Target") - .WithMany("EntityExternals") - .HasForeignKey("TargetId") - .OnDelete(DeleteBehavior.Cascade) - .IsRequired() - .HasConstraintName("fk_entity_externals_external_targets_target_id"); - - b.Navigation("Entity"); - - b.Navigation("Target"); - }); - - modelBuilder.Entity("Pf2eDataScrapper.Model.Structure.Action", b => - { - b.HasOne("Pf2eDataScrapper.Model.Base.Entity", "Entity") - .WithOne() - .HasForeignKey("Pf2eDataScrapper.Model.Structure.Action", "Id") - .OnDelete(DeleteBehavior.Cascade) - .IsRequired() - .HasConstraintName("fk_actions_entities_id"); - - b.Navigation("Entity"); - }); - - modelBuilder.Entity("Pf2eDataScrapper.Model.Structure.Ancestry", b => - { - b.HasOne("Pf2eDataScrapper.Model.Base.Entity", "Entity") - .WithOne() - .HasForeignKey("Pf2eDataScrapper.Model.Structure.Ancestry", "Id") - .OnDelete(DeleteBehavior.Cascade) - .IsRequired() - .HasConstraintName("fk_ancestries_entities_id"); - - b.Navigation("Entity"); - }); - - modelBuilder.Entity("Pf2eDataScrapper.Model.Structure.AncestryRelation.AncestryBoost", b => - { - b.HasOne("Pf2eDataScrapper.Model.Structure.Ancestry", "Ancestry") - .WithMany("AncestryBoosts") - .HasForeignKey("AncestryId") - .OnDelete(DeleteBehavior.Cascade) - .IsRequired() - .HasConstraintName("fk_ancestry_boosts_ancestries_ancestry_id"); - - b.Navigation("Ancestry"); - }); - - modelBuilder.Entity("Pf2eDataScrapper.Model.Structure.AncestryRelation.AncestryItem", b => - { - b.HasOne("Pf2eDataScrapper.Model.Structure.Ancestry", "Ancestry") - .WithMany("AncestryItems") - .HasForeignKey("AncestryId") - .OnDelete(DeleteBehavior.Cascade) - .IsRequired() - .HasConstraintName("fk_ancestry_items_ancestries_ancestry_id"); - - b.HasOne("Pf2eDataScrapper.Model.Base.Entity", "Item") - .WithMany() - .HasForeignKey("ItemId") - .OnDelete(DeleteBehavior.Cascade) - .IsRequired() - .HasConstraintName("fk_ancestry_items_entities_item_id"); - - b.Navigation("Ancestry"); - - b.Navigation("Item"); - }); - - modelBuilder.Entity("Pf2eDataScrapper.Model.Structure.AncestryRelation.AncestryLanguage", b => - { - b.HasOne("Pf2eDataScrapper.Model.Structure.Ancestry", "Ancestry") - .WithMany("AncestryLanguages") - .HasForeignKey("AncestryId") - .OnDelete(DeleteBehavior.Cascade) - .IsRequired() - .HasConstraintName("fk_ancestry_languages_ancestries_ancestry_id"); - - b.HasOne("Pf2eDataScrapper.Model.Common.Language", "Language") - .WithMany() - .HasForeignKey("LanguageId") - .OnDelete(DeleteBehavior.Cascade) - .IsRequired() - .HasConstraintName("fk_ancestry_languages_languages_language_id"); - - b.Navigation("Ancestry"); - - b.Navigation("Language"); - }); - - modelBuilder.Entity("Pf2eDataScrapper.Model.Structure.Background", b => - { - b.HasOne("Pf2eDataScrapper.Model.Base.Entity", "Entity") - .WithOne() - .HasForeignKey("Pf2eDataScrapper.Model.Structure.Background", "Id") - .OnDelete(DeleteBehavior.Cascade) - .IsRequired() - .HasConstraintName("fk_backgrounds_entities_id"); - - b.Navigation("Entity"); - }); - - modelBuilder.Entity("Pf2eDataScrapper.Model.Structure.BackgroundRelation.BackgroundBoost", b => - { - b.HasOne("Pf2eDataScrapper.Model.Structure.Background", "Background") - .WithMany("BackgroundBoosts") - .HasForeignKey("BackgroundId") - .OnDelete(DeleteBehavior.Cascade) - .IsRequired() - .HasConstraintName("fk_background_boosts_backgrounds_background_id"); - - b.Navigation("Background"); - }); - - modelBuilder.Entity("Pf2eDataScrapper.Model.Structure.BackgroundRelation.BackgroundItem", b => - { - b.HasOne("Pf2eDataScrapper.Model.Structure.Background", "Background") - .WithMany("BackgroundItems") - .HasForeignKey("BackgroundId") - .OnDelete(DeleteBehavior.Cascade) - .IsRequired() - .HasConstraintName("fk_background_items_backgrounds_background_id"); - - b.HasOne("Pf2eDataScrapper.Model.Base.Entity", "Entity") - .WithMany() - .HasForeignKey("EntityId") - .OnDelete(DeleteBehavior.Cascade) - .IsRequired() - .HasConstraintName("fk_background_items_entities_entity_id"); - - b.Navigation("Background"); - - b.Navigation("Entity"); - }); - - modelBuilder.Entity("Pf2eDataScrapper.Model.Structure.BackgroundRelation.BackgroundTraining", b => - { - b.HasOne("Pf2eDataScrapper.Model.Structure.Background", "Background") - .WithMany("BackgroundSkills") - .HasForeignKey("BackgroundId") - .OnDelete(DeleteBehavior.Cascade) - .IsRequired() - .HasConstraintName("fk_background_skills_backgrounds_background_id"); - - b.HasOne("Pf2eDataScrapper.Model.Common.Training", "Training") - .WithMany() - .HasForeignKey("TrainingId") - .OnDelete(DeleteBehavior.Cascade) - .IsRequired() - .HasConstraintName("fk_background_skills_trainings_training_id"); - - b.Navigation("Background"); - - b.Navigation("Training"); - }); - - modelBuilder.Entity("Pf2eDataScrapper.Model.Structure.Class", b => - { - b.HasOne("Pf2eDataScrapper.Model.Base.Entity", "Entity") - .WithOne() - .HasForeignKey("Pf2eDataScrapper.Model.Structure.Class", "Id") - .OnDelete(DeleteBehavior.Cascade) - .IsRequired() - .HasConstraintName("fk_classes_entities_id"); - - b.Navigation("Entity"); - }); - - modelBuilder.Entity("Pf2eDataScrapper.Model.Structure.ClassRelation.ClassKeyAbility", b => - { - b.HasOne("Pf2eDataScrapper.Model.Structure.Class", "Class") - .WithMany("ClassKeyAbilities") - .HasForeignKey("ClassId") - .OnDelete(DeleteBehavior.Cascade) - .IsRequired() - .HasConstraintName("fk_class_key_abilities_classes_class_id"); - - b.Navigation("Class"); - }); - - modelBuilder.Entity("Pf2eDataScrapper.Model.Structure.ClassRelation.ClassProgression", b => - { - b.HasOne("Pf2eDataScrapper.Model.Structure.Class", "Class") - .WithMany("ClassProgressions") - .HasForeignKey("ClassId") - .OnDelete(DeleteBehavior.Cascade) - .IsRequired() - .HasConstraintName("fk_class_progressions_classes_class_id"); - - b.HasOne("Pf2eDataScrapper.Model.Base.Entity", "Entity") - .WithMany() - .HasForeignKey("EntityId") - .OnDelete(DeleteBehavior.SetNull) - .HasConstraintName("fk_class_progressions_entities_entity_id"); - - b.Navigation("Class"); - - b.Navigation("Entity"); - }); - - modelBuilder.Entity("Pf2eDataScrapper.Model.Structure.ClassRelation.ClassTraining", b => - { - b.HasOne("Pf2eDataScrapper.Model.Structure.Class", "Class") - .WithMany("ClassTrainings") - .HasForeignKey("ClassId") - .OnDelete(DeleteBehavior.Cascade) - .IsRequired() - .HasConstraintName("fk_class_trainings_classes_class_id"); - - b.HasOne("Pf2eDataScrapper.Model.Common.Training", "Training") - .WithMany() - .HasForeignKey("TrainingId") - .OnDelete(DeleteBehavior.SetNull) - .HasConstraintName("fk_class_trainings_trainings_training_id"); - - b.Navigation("Class"); - - b.Navigation("Training"); - }); - - modelBuilder.Entity("Pf2eDataScrapper.Model.Structure.Condition", b => - { - b.HasOne("Pf2eDataScrapper.Model.Base.Entity", "Entity") - .WithOne() - .HasForeignKey("Pf2eDataScrapper.Model.Structure.Condition", "Id") - .OnDelete(DeleteBehavior.Cascade) - .IsRequired() - .HasConstraintName("fk_conditions_entities_id"); - - b.Navigation("Entity"); - }); - - modelBuilder.Entity("Pf2eDataScrapper.Model.Structure.Deity", b => - { - b.HasOne("Pf2eDataScrapper.Model.Base.Entity", "Entity") - .WithOne() - .HasForeignKey("Pf2eDataScrapper.Model.Structure.Deity", "Id") - .OnDelete(DeleteBehavior.Cascade) - .IsRequired() - .HasConstraintName("fk_deities_entities_id"); - - b.Navigation("Entity"); - }); - - modelBuilder.Entity("Pf2eDataScrapper.Model.Structure.DeityRelation.DeityAttribute", b => - { - b.HasOne("Pf2eDataScrapper.Model.Structure.Deity", "Deity") - .WithMany("DeityAttributes") - .HasForeignKey("DeityId") - .OnDelete(DeleteBehavior.Cascade) - .IsRequired() - .HasConstraintName("fk_deity_attributes_deities_deity_id"); - - b.Navigation("Deity"); - }); - - modelBuilder.Entity("Pf2eDataScrapper.Model.Structure.DeityRelation.DeityDomain", b => - { - b.HasOne("Pf2eDataScrapper.Model.Structure.Deity", "Deity") - .WithMany("DeityDomains") - .HasForeignKey("DeityId") - .OnDelete(DeleteBehavior.Cascade) - .IsRequired() - .HasConstraintName("fk_deity_domains_deities_deity_id"); - - b.Navigation("Deity"); - }); - - modelBuilder.Entity("Pf2eDataScrapper.Model.Structure.DeityRelation.DeitySpell", b => - { - b.HasOne("Pf2eDataScrapper.Model.Structure.Deity", "Deity") - .WithMany("DeitySpells") - .HasForeignKey("DeityId") - .OnDelete(DeleteBehavior.Cascade) - .IsRequired() - .HasConstraintName("fk_deity_spells_deities_deity_id"); - - b.HasOne("Pf2eDataScrapper.Model.Structure.Spell", "Spell") - .WithMany() - .HasForeignKey("SpellId") - .OnDelete(DeleteBehavior.Cascade) - .IsRequired() - .HasConstraintName("fk_deity_spells_spells_spell_id"); - - b.Navigation("Deity"); - - b.Navigation("Spell"); - }); - - modelBuilder.Entity("Pf2eDataScrapper.Model.Structure.DeityRelation.DeityWeapon", b => - { - b.HasOne("Pf2eDataScrapper.Model.Structure.Deity", "Deity") - .WithMany("DeityWeapons") - .HasForeignKey("DeityId") - .OnDelete(DeleteBehavior.Cascade) - .IsRequired() - .HasConstraintName("fk_deity_weapons_deities_deity_id"); - - b.Navigation("Deity"); - }); - - modelBuilder.Entity("Pf2eDataScrapper.Model.Structure.Feat", b => - { - b.HasOne("Pf2eDataScrapper.Model.Base.Entity", "Entity") - .WithOne() - .HasForeignKey("Pf2eDataScrapper.Model.Structure.Feat", "Id") - .OnDelete(DeleteBehavior.Cascade) - .IsRequired() - .HasConstraintName("fk_feats_entities_id"); - - b.Navigation("Entity"); - }); - - modelBuilder.Entity("Pf2eDataScrapper.Model.Structure.FeatRelation.FeatPrerequisite", b => - { - b.HasOne("Pf2eDataScrapper.Model.Structure.Feat", "Feat") - .WithMany("FeatPrerequisites") - .HasForeignKey("FeatId") - .OnDelete(DeleteBehavior.Cascade) - .IsRequired() - .HasConstraintName("fk_feat_prerequisites_feats_feat_id"); - - b.Navigation("Feat"); - }); - - modelBuilder.Entity("Pf2eDataScrapper.Model.Structure.Heritage", b => - { - b.HasOne("Pf2eDataScrapper.Model.Structure.Ancestry", "Ancestry") - .WithMany("Heritages") - .HasForeignKey("AncestryId") - .OnDelete(DeleteBehavior.Cascade) - .HasConstraintName("fk_heritages_ancestries_ancestry_id"); - - b.HasOne("Pf2eDataScrapper.Model.Base.Entity", "Entity") - .WithOne() - .HasForeignKey("Pf2eDataScrapper.Model.Structure.Heritage", "Id") - .OnDelete(DeleteBehavior.Cascade) - .IsRequired() - .HasConstraintName("fk_heritages_entities_id"); - - b.Navigation("Ancestry"); - - b.Navigation("Entity"); - }); - - modelBuilder.Entity("Pf2eDataScrapper.Model.Structure.Spell", b => - { - b.HasOne("Pf2eDataScrapper.Model.Base.Entity", "Entity") - .WithOne() - .HasForeignKey("Pf2eDataScrapper.Model.Structure.Spell", "Id") - .OnDelete(DeleteBehavior.Cascade) - .IsRequired() - .HasConstraintName("fk_spells_entities_id"); - - b.Navigation("Entity"); - }); - - modelBuilder.Entity("Pf2eDataScrapper.Model.Structure.SpellRelation.SpellArea", b => - { - b.HasOne("Pf2eDataScrapper.Model.Structure.Spell", "Spell") - .WithOne("SpellArea") - .HasForeignKey("Pf2eDataScrapper.Model.Structure.SpellRelation.SpellArea", "SpellId") - .OnDelete(DeleteBehavior.Cascade) - .HasConstraintName("fk_spell_areas_spells_spell_id"); - - b.Navigation("Spell"); - }); - - modelBuilder.Entity("Pf2eDataScrapper.Model.Structure.SpellRelation.SpellDamage", b => - { - b.HasOne("Pf2eDataScrapper.Model.Structure.Spell", "Spell") - .WithMany("SpellDamages") - .HasForeignKey("SpellId") - .OnDelete(DeleteBehavior.Cascade) - .IsRequired() - .HasConstraintName("fk_spell_damages_spells_spell_id"); - - b.Navigation("Spell"); - }); - - modelBuilder.Entity("Pf2eDataScrapper.Model.Structure.SpellRelation.SpellDefense", b => - { - b.HasOne("Pf2eDataScrapper.Model.Structure.Spell", "Spell") - .WithMany("SpellDefenses") - .HasForeignKey("SpellId") - .OnDelete(DeleteBehavior.Cascade) - .IsRequired() - .HasConstraintName("fk_spell_defenses_spells_spell_id"); - - b.Navigation("Spell"); - }); - - modelBuilder.Entity("Pf2eDataScrapper.Model.Structure.SpellRelation.SpellRitual", b => - { - b.HasOne("Pf2eDataScrapper.Model.Structure.Spell", "Spell") - .WithOne("SpellRitual") - .HasForeignKey("Pf2eDataScrapper.Model.Structure.SpellRelation.SpellRitual", "SpellId") - .OnDelete(DeleteBehavior.Cascade) - .HasConstraintName("fk_spell_rituals_spells_spell_id"); - - b.Navigation("Spell"); - }); - - modelBuilder.Entity("Pf2eDataScrapper.Model.Structure.Trait", b => - { - b.HasOne("Pf2eDataScrapper.Model.Base.Entity", "Entity") - .WithOne() - .HasForeignKey("Pf2eDataScrapper.Model.Structure.Trait", "Id") - .OnDelete(DeleteBehavior.Cascade) - .IsRequired() - .HasConstraintName("fk_traits_entities_id"); - - b.Navigation("Entity"); - }); - - modelBuilder.Entity("Pf2eDataScrapper.Model.Base.Entity", b => - { - b.Navigation("Aliases"); - - b.Navigation("Externals"); - - b.Navigation("Sources"); - }); - - modelBuilder.Entity("Pf2eDataScrapper.Model.Base.Keywords.Keyword", b => - { - b.Navigation("Aliases"); - }); - - modelBuilder.Entity("Pf2eDataScrapper.Model.Base.Source.Source", b => - { - b.Navigation("EntitySources"); - }); - - modelBuilder.Entity("Pf2eDataScrapper.Model.Base.Targets.ExternalTarget", b => - { - b.Navigation("EntityExternals"); - }); - - modelBuilder.Entity("Pf2eDataScrapper.Model.Structure.Ancestry", b => - { - b.Navigation("AncestryBoosts"); - - b.Navigation("AncestryItems"); - - b.Navigation("AncestryLanguages"); - - b.Navigation("Heritages"); - }); - - modelBuilder.Entity("Pf2eDataScrapper.Model.Structure.Background", b => - { - b.Navigation("BackgroundBoosts"); - - b.Navigation("BackgroundItems"); - - b.Navigation("BackgroundSkills"); - }); - - modelBuilder.Entity("Pf2eDataScrapper.Model.Structure.Class", b => - { - b.Navigation("ClassKeyAbilities"); - - b.Navigation("ClassProgressions"); - - b.Navigation("ClassTrainings"); - }); - - modelBuilder.Entity("Pf2eDataScrapper.Model.Structure.Deity", b => - { - b.Navigation("DeityAttributes"); - - b.Navigation("DeityDomains"); - - b.Navigation("DeitySpells"); - - b.Navigation("DeityWeapons"); - }); - - modelBuilder.Entity("Pf2eDataScrapper.Model.Structure.Feat", b => - { - b.Navigation("FeatPrerequisites"); - }); - - modelBuilder.Entity("Pf2eDataScrapper.Model.Structure.Spell", b => - { - b.Navigation("SpellArea"); - - b.Navigation("SpellDamages"); - - b.Navigation("SpellDefenses"); - - b.Navigation("SpellRitual"); - }); -#pragma warning restore 612, 618 - } - } -} diff --git a/Pf2eDataScrapper/Migrations/20250418063636_EnumUpdate.cs b/Pf2eDataScrapper/Migrations/20250418063636_EnumUpdate.cs deleted file mode 100644 index f0fd670..0000000 --- a/Pf2eDataScrapper/Migrations/20250418063636_EnumUpdate.cs +++ /dev/null @@ -1,106 +0,0 @@ -using Microsoft.EntityFrameworkCore.Migrations; - -#nullable disable - -namespace Pf2eDataScrapper.Migrations -{ - /// - public partial class EnumUpdate : Migration - { - /// - protected override void Up(MigrationBuilder migrationBuilder) - { - migrationBuilder.AlterDatabase() - .Annotation("Npgsql:Enum:action_category", "unknown,offensive,defensive,interaction,familiar,army_tactic,army_war_action,kingdom_activity,kingdom_feat,kingdom_feature") - .Annotation("Npgsql:Enum:action_type", "none,1_action,2_actions,3_actions,1-3_actions,1-2_actions") - .Annotation("Npgsql:Enum:alias_type", "legacy,english,legacy_english,hobby,other") - .Annotation("Npgsql:Enum:ancestry_vision", "normal,low-light-vision,darkvision") - .Annotation("Npgsql:Enum:attribute_values", "any,str,dex,con,int,wis,cha") - .Annotation("Npgsql:Enum:class_progression_type", "entity,ancestry_feat,class_feat,general_feat,skill_feat,skill_increase") - .Annotation("Npgsql:Enum:condition_group", "unknown,senses,abilities,death,attitudes,detection") - .Annotation("Npgsql:Enum:deity_category", "deity,pantheon,covenant,philosophy") - .Annotation("Npgsql:Enum:deity_fonts", "none,heal,harm,any") - .Annotation("Npgsql:Enum:deity_sanctification", "holy,unholy,any") - .Annotation("Npgsql:Enum:entity_rarity", "common,uncommon,rare,unique") - .Annotation("Npgsql:Enum:entity_type", "unknown,trait,action,ancestry,background,backpack,campaign_feature,class,condition,deity,feat,heritage,spell") - .Annotation("Npgsql:Enum:feat_action_type", "passive,action,reaction,free") - .Annotation("Npgsql:Enum:feat_category", "ancestryfeature,classfeature,calling,class,skill,general,ancestry,bonus,deityboon,curse,pfsboon,campaign_feature") - .Annotation("Npgsql:Enum:size", "med,tiny") - .Annotation("Npgsql:Enum:source_category", "rulebook,adventure-path,lost-omens,adventures,comics,blog-posts,society") - .Annotation("Npgsql:Enum:spell_area_type", "burst,emanation,cone,line,square,cube,cylinder") - .Annotation("Npgsql:Enum:spell_damage_category", "persistent,splash") - .Annotation("Npgsql:Enum:spell_damage_kinds", "damage,healing,any") - .Annotation("Npgsql:Enum:training_stage", "untrained,trained,expert,master,legendary") - .Annotation("Npgsql:Enum:trait_type", "regular,tradition") - .OldAnnotation("Npgsql:Enum:action_category", "unknown,offensive,defensive,interaction,familiar,army_tactic,army_war_action,kingdom_activity,kingdom_feat,kingdom_feature") - .OldAnnotation("Npgsql:Enum:action_type", "none,1_action,2_actions,3_actions,1-3_actions,1-2_actions") - .OldAnnotation("Npgsql:Enum:alias_type", "legacy,english,legacy_english,hobby,other") - .OldAnnotation("Npgsql:Enum:ancestry_vision", "normal,low-light-vision,darkvision") - .OldAnnotation("Npgsql:Enum:attribute_values", "any,str,dex,con,int,wis,cha") - .OldAnnotation("Npgsql:Enum:class_progression_type", "entity,ancestry_feat,class_feat,general_feat,skill_feat,skill_increase") - .OldAnnotation("Npgsql:Enum:condition_group", "unknown,senses,abilities,death,attitudes,detection") - .OldAnnotation("Npgsql:Enum:deity_category", "deity,pantheon,covenant,philosophy") - .OldAnnotation("Npgsql:Enum:deity_fonts", "none,heal,harm,any") - .OldAnnotation("Npgsql:Enum:deity_sanctification", "holy,unholy,any") - .OldAnnotation("Npgsql:Enum:entity_rarity", "common,uncommon,rare,unique") - .OldAnnotation("Npgsql:Enum:entity_type", "unknown,trait,action,ancestry,background,backpack,campaign_feature,class,condition,deity,feat,heritage,spell") - .OldAnnotation("Npgsql:Enum:feat_action_type", "passive,action,reaction,free") - .OldAnnotation("Npgsql:Enum:feat_category", "ancestryfeature,classfeature,calling,class,skill,general,ancestry,bonus,deityboon,curse,pfsboon,campaign_feature") - .OldAnnotation("Npgsql:Enum:size", "med,tiny") - .OldAnnotation("Npgsql:Enum:source_category", "rulebook,adventure-path,lost-omens") - .OldAnnotation("Npgsql:Enum:spell_area_type", "burst,emanation,cone,line,square,cube,cylinder") - .OldAnnotation("Npgsql:Enum:spell_damage_category", "persistent,splash") - .OldAnnotation("Npgsql:Enum:spell_damage_kinds", "damage,healing,any") - .OldAnnotation("Npgsql:Enum:training_stage", "untrained,trained,expert,master,legendary") - .OldAnnotation("Npgsql:Enum:trait_type", "regular,tradition"); - } - - /// - protected override void Down(MigrationBuilder migrationBuilder) - { - migrationBuilder.AlterDatabase() - .Annotation("Npgsql:Enum:action_category", "unknown,offensive,defensive,interaction,familiar,army_tactic,army_war_action,kingdom_activity,kingdom_feat,kingdom_feature") - .Annotation("Npgsql:Enum:action_type", "none,1_action,2_actions,3_actions,1-3_actions,1-2_actions") - .Annotation("Npgsql:Enum:alias_type", "legacy,english,legacy_english,hobby,other") - .Annotation("Npgsql:Enum:ancestry_vision", "normal,low-light-vision,darkvision") - .Annotation("Npgsql:Enum:attribute_values", "any,str,dex,con,int,wis,cha") - .Annotation("Npgsql:Enum:class_progression_type", "entity,ancestry_feat,class_feat,general_feat,skill_feat,skill_increase") - .Annotation("Npgsql:Enum:condition_group", "unknown,senses,abilities,death,attitudes,detection") - .Annotation("Npgsql:Enum:deity_category", "deity,pantheon,covenant,philosophy") - .Annotation("Npgsql:Enum:deity_fonts", "none,heal,harm,any") - .Annotation("Npgsql:Enum:deity_sanctification", "holy,unholy,any") - .Annotation("Npgsql:Enum:entity_rarity", "common,uncommon,rare,unique") - .Annotation("Npgsql:Enum:entity_type", "unknown,trait,action,ancestry,background,backpack,campaign_feature,class,condition,deity,feat,heritage,spell") - .Annotation("Npgsql:Enum:feat_action_type", "passive,action,reaction,free") - .Annotation("Npgsql:Enum:feat_category", "ancestryfeature,classfeature,calling,class,skill,general,ancestry,bonus,deityboon,curse,pfsboon,campaign_feature") - .Annotation("Npgsql:Enum:size", "med,tiny") - .Annotation("Npgsql:Enum:source_category", "rulebook,adventure-path,lost-omens") - .Annotation("Npgsql:Enum:spell_area_type", "burst,emanation,cone,line,square,cube,cylinder") - .Annotation("Npgsql:Enum:spell_damage_category", "persistent,splash") - .Annotation("Npgsql:Enum:spell_damage_kinds", "damage,healing,any") - .Annotation("Npgsql:Enum:training_stage", "untrained,trained,expert,master,legendary") - .Annotation("Npgsql:Enum:trait_type", "regular,tradition") - .OldAnnotation("Npgsql:Enum:action_category", "unknown,offensive,defensive,interaction,familiar,army_tactic,army_war_action,kingdom_activity,kingdom_feat,kingdom_feature") - .OldAnnotation("Npgsql:Enum:action_type", "none,1_action,2_actions,3_actions,1-3_actions,1-2_actions") - .OldAnnotation("Npgsql:Enum:alias_type", "legacy,english,legacy_english,hobby,other") - .OldAnnotation("Npgsql:Enum:ancestry_vision", "normal,low-light-vision,darkvision") - .OldAnnotation("Npgsql:Enum:attribute_values", "any,str,dex,con,int,wis,cha") - .OldAnnotation("Npgsql:Enum:class_progression_type", "entity,ancestry_feat,class_feat,general_feat,skill_feat,skill_increase") - .OldAnnotation("Npgsql:Enum:condition_group", "unknown,senses,abilities,death,attitudes,detection") - .OldAnnotation("Npgsql:Enum:deity_category", "deity,pantheon,covenant,philosophy") - .OldAnnotation("Npgsql:Enum:deity_fonts", "none,heal,harm,any") - .OldAnnotation("Npgsql:Enum:deity_sanctification", "holy,unholy,any") - .OldAnnotation("Npgsql:Enum:entity_rarity", "common,uncommon,rare,unique") - .OldAnnotation("Npgsql:Enum:entity_type", "unknown,trait,action,ancestry,background,backpack,campaign_feature,class,condition,deity,feat,heritage,spell") - .OldAnnotation("Npgsql:Enum:feat_action_type", "passive,action,reaction,free") - .OldAnnotation("Npgsql:Enum:feat_category", "ancestryfeature,classfeature,calling,class,skill,general,ancestry,bonus,deityboon,curse,pfsboon,campaign_feature") - .OldAnnotation("Npgsql:Enum:size", "med,tiny") - .OldAnnotation("Npgsql:Enum:source_category", "rulebook,adventure-path,lost-omens,adventures,comics,blog-posts,society") - .OldAnnotation("Npgsql:Enum:spell_area_type", "burst,emanation,cone,line,square,cube,cylinder") - .OldAnnotation("Npgsql:Enum:spell_damage_category", "persistent,splash") - .OldAnnotation("Npgsql:Enum:spell_damage_kinds", "damage,healing,any") - .OldAnnotation("Npgsql:Enum:training_stage", "untrained,trained,expert,master,legendary") - .OldAnnotation("Npgsql:Enum:trait_type", "regular,tradition"); - } - } -} diff --git a/Pf2eDataScrapper/Migrations/Pf2eDbContextModelSnapshot.cs b/Pf2eDataScrapper/Migrations/Pf2eDbContextModelSnapshot.cs deleted file mode 100644 index 8dc0855..0000000 --- a/Pf2eDataScrapper/Migrations/Pf2eDbContextModelSnapshot.cs +++ /dev/null @@ -1,2051 +0,0 @@ -// -using System; -using Microsoft.EntityFrameworkCore; -using Microsoft.EntityFrameworkCore.Infrastructure; -using Microsoft.EntityFrameworkCore.Storage.ValueConversion; -using Npgsql.EntityFrameworkCore.PostgreSQL.Metadata; -using Pf2eDataScrapper.Model; -using Pf2eDataScrapper.Model.Enum; - -#nullable disable - -namespace Pf2eDataScrapper.Migrations -{ - [DbContext(typeof(Pf2eDbContext))] - partial class Pf2eDbContextModelSnapshot : ModelSnapshot - { - protected override void BuildModel(ModelBuilder modelBuilder) - { -#pragma warning disable 612, 618 - modelBuilder - .HasAnnotation("ProductVersion", "9.0.4") - .HasAnnotation("Relational:MaxIdentifierLength", 63); - - NpgsqlModelBuilderExtensions.HasPostgresEnum(modelBuilder, "action_category", new[] { "unknown", "offensive", "defensive", "interaction", "familiar", "army_tactic", "army_war_action", "kingdom_activity", "kingdom_feat", "kingdom_feature" }); - NpgsqlModelBuilderExtensions.HasPostgresEnum(modelBuilder, "action_type", new[] { "none", "1_action", "2_actions", "3_actions", "1-3_actions", "1-2_actions" }); - NpgsqlModelBuilderExtensions.HasPostgresEnum(modelBuilder, "alias_type", new[] { "legacy", "english", "legacy_english", "hobby", "other" }); - NpgsqlModelBuilderExtensions.HasPostgresEnum(modelBuilder, "ancestry_vision", new[] { "normal", "low-light-vision", "darkvision" }); - NpgsqlModelBuilderExtensions.HasPostgresEnum(modelBuilder, "attribute_values", new[] { "any", "str", "dex", "con", "int", "wis", "cha" }); - NpgsqlModelBuilderExtensions.HasPostgresEnum(modelBuilder, "class_progression_type", new[] { "entity", "ancestry_feat", "class_feat", "general_feat", "skill_feat", "skill_increase" }); - NpgsqlModelBuilderExtensions.HasPostgresEnum(modelBuilder, "condition_group", new[] { "unknown", "senses", "abilities", "death", "attitudes", "detection" }); - NpgsqlModelBuilderExtensions.HasPostgresEnum(modelBuilder, "deity_category", new[] { "deity", "pantheon", "covenant", "philosophy" }); - NpgsqlModelBuilderExtensions.HasPostgresEnum(modelBuilder, "deity_fonts", new[] { "none", "heal", "harm", "any" }); - NpgsqlModelBuilderExtensions.HasPostgresEnum(modelBuilder, "deity_sanctification", new[] { "holy", "unholy", "any" }); - NpgsqlModelBuilderExtensions.HasPostgresEnum(modelBuilder, "entity_rarity", new[] { "common", "uncommon", "rare", "unique" }); - NpgsqlModelBuilderExtensions.HasPostgresEnum(modelBuilder, "entity_type", new[] { "unknown", "trait", "action", "ancestry", "background", "backpack", "campaign_feature", "class", "condition", "deity", "feat", "heritage", "spell" }); - NpgsqlModelBuilderExtensions.HasPostgresEnum(modelBuilder, "feat_action_type", new[] { "passive", "action", "reaction", "free" }); - NpgsqlModelBuilderExtensions.HasPostgresEnum(modelBuilder, "feat_category", new[] { "ancestryfeature", "classfeature", "calling", "class", "skill", "general", "ancestry", "bonus", "deityboon", "curse", "pfsboon", "campaign_feature" }); - NpgsqlModelBuilderExtensions.HasPostgresEnum(modelBuilder, "size", new[] { "med", "tiny" }); - NpgsqlModelBuilderExtensions.HasPostgresEnum(modelBuilder, "source_category", new[] { "rulebook", "adventure-path", "lost-omens", "adventures", "comics", "blog-posts", "society" }); - NpgsqlModelBuilderExtensions.HasPostgresEnum(modelBuilder, "spell_area_type", new[] { "burst", "emanation", "cone", "line", "square", "cube", "cylinder" }); - NpgsqlModelBuilderExtensions.HasPostgresEnum(modelBuilder, "spell_damage_category", new[] { "persistent", "splash" }); - NpgsqlModelBuilderExtensions.HasPostgresEnum(modelBuilder, "spell_damage_kinds", new[] { "damage", "healing", "any" }); - NpgsqlModelBuilderExtensions.HasPostgresEnum(modelBuilder, "training_stage", new[] { "untrained", "trained", "expert", "master", "legendary" }); - NpgsqlModelBuilderExtensions.HasPostgresEnum(modelBuilder, "trait_type", new[] { "regular", "tradition" }); - NpgsqlModelBuilderExtensions.UseIdentityByDefaultColumns(modelBuilder); - - modelBuilder.Entity("DeityTraining", b => - { - b.Property("DeityId") - .HasColumnType("integer") - .HasColumnName("deity_id"); - - b.Property("SkillsId") - .HasColumnType("integer") - .HasColumnName("skills_id"); - - b.HasKey("DeityId", "SkillsId") - .HasName("pk_deity_training"); - - b.HasIndex("SkillsId") - .HasDatabaseName("ix_deity_training_skills_id"); - - b.ToTable("deity_training", (string)null); - }); - - modelBuilder.Entity("EntityKeyword", b => - { - b.Property("EntitiesId") - .HasColumnType("integer") - .HasColumnName("entities_id"); - - b.Property("KeywordsId") - .HasColumnType("integer") - .HasColumnName("keywords_id"); - - b.HasKey("EntitiesId", "KeywordsId") - .HasName("pk_entity_keyword"); - - b.HasIndex("KeywordsId") - .HasDatabaseName("ix_entity_keyword_keywords_id"); - - b.ToTable("entity_keyword", (string)null); - }); - - modelBuilder.Entity("EntityTrait", b => - { - b.Property("EntitiesId") - .HasColumnType("integer") - .HasColumnName("entities_id"); - - b.Property("TraitsId") - .HasColumnType("integer") - .HasColumnName("traits_id"); - - b.HasKey("EntitiesId", "TraitsId") - .HasName("pk_entity_trait"); - - b.HasIndex("TraitsId") - .HasDatabaseName("ix_entity_trait_traits_id"); - - b.ToTable("entity_trait", (string)null); - }); - - modelBuilder.Entity("Pf2eDataScrapper.Model.Base.Entity", b => - { - b.Property("Id") - .ValueGeneratedOnAdd() - .HasColumnType("integer") - .HasColumnName("id") - .HasColumnOrder(1); - - NpgsqlPropertyBuilderExtensions.UseIdentityByDefaultColumn(b.Property("Id")); - - b.Property("Description") - .IsRequired() - .HasColumnType("text") - .HasColumnName("description") - .HasColumnOrder(6) - .HasComment("Текстовое описание объекта"); - - b.Property("Img") - .IsRequired() - .HasMaxLength(255) - .HasColumnType("character varying(255)") - .HasColumnName("img") - .HasColumnOrder(5) - .HasComment("Изображение объекта"); - - b.Property("IsChecked") - .HasColumnType("boolean") - .HasColumnName("is_checked") - .HasColumnOrder(9) - .HasComment("Флаг, указывающий, что объект был проверен и не требует автоматической перезаписи"); - - b.Property("IsTranslated") - .HasColumnType("boolean") - .HasColumnName("is_translated") - .HasColumnOrder(8) - .HasComment("Флаг, указывающий, что у объекта существует перевод"); - - b.Property("Name") - .IsRequired() - .HasMaxLength(255) - .HasColumnType("character varying(255)") - .HasColumnName("name") - .HasColumnOrder(2) - .HasComment("Отображаемое имя"); - - b.Property("Rarity") - .HasColumnType("entity_rarity") - .HasColumnName("rarity") - .HasColumnOrder(7); - - b.Property("Slug") - .IsRequired() - .HasMaxLength(255) - .HasColumnType("character varying(255)") - .HasColumnName("slug") - .HasColumnOrder(4) - .HasComment("Часть имени в URL"); - - b.Property("Type") - .HasColumnType("entity_type") - .HasColumnName("type") - .HasColumnOrder(3) - .HasComment("Тип объекта"); - - b.HasKey("Id") - .HasName("pk_entities"); - - b.ToTable("entities", (string)null); - }); - - modelBuilder.Entity("Pf2eDataScrapper.Model.Base.EntityAlias", b => - { - b.Property("EntityId") - .HasColumnType("integer") - .HasColumnName("entity_id") - .HasColumnOrder(1); - - b.Property("Type") - .HasColumnType("alias_type") - .HasColumnName("type") - .HasColumnOrder(2); - - b.Property("Alias") - .IsRequired() - .HasMaxLength(255) - .HasColumnType("character varying(255)") - .HasColumnName("alias") - .HasColumnOrder(3); - - b.HasKey("EntityId", "Type") - .HasName("pk_entity_aliases"); - - b.ToTable("entity_aliases", (string)null); - }); - - modelBuilder.Entity("Pf2eDataScrapper.Model.Base.Keywords.Keyword", b => - { - b.Property("Id") - .ValueGeneratedOnAdd() - .HasColumnType("integer") - .HasColumnName("id") - .HasColumnOrder(1); - - NpgsqlPropertyBuilderExtensions.UseIdentityByDefaultColumn(b.Property("Id")); - - b.Property("Slug") - .IsRequired() - .HasColumnType("text") - .HasColumnName("slug") - .HasColumnOrder(2); - - b.HasKey("Id") - .HasName("pk_keywords"); - - b.ToTable("keywords", (string)null); - }); - - modelBuilder.Entity("Pf2eDataScrapper.Model.Base.Keywords.KeywordAlias", b => - { - b.Property("Id") - .ValueGeneratedOnAdd() - .HasColumnType("integer") - .HasColumnName("id") - .HasColumnOrder(1); - - NpgsqlPropertyBuilderExtensions.UseIdentityByDefaultColumn(b.Property("Id")); - - b.Property("KeywordId") - .HasColumnType("integer") - .HasColumnName("keyword_id") - .HasColumnOrder(2); - - b.Property("Value") - .IsRequired() - .HasMaxLength(255) - .HasColumnType("character varying(255)") - .HasColumnName("value") - .HasColumnOrder(3); - - b.HasKey("Id") - .HasName("pk_keyword_aliases"); - - b.HasIndex("KeywordId") - .HasDatabaseName("ix_keyword_aliases_keyword_id"); - - b.ToTable("keyword_aliases", (string)null); - }); - - modelBuilder.Entity("Pf2eDataScrapper.Model.Base.Source.EntitySource", b => - { - b.Property("EntityId") - .HasColumnType("integer") - .HasColumnName("entity_id") - .HasColumnOrder(1); - - b.Property("SourceId") - .HasColumnType("integer") - .HasColumnName("source_id") - .HasColumnOrder(2); - - b.Property("IsRemaster") - .HasColumnType("boolean") - .HasColumnName("is_remaster") - .HasColumnOrder(4) - .HasComment("Флаг, указывающий, что объект является частью ремастера"); - - b.Property("Suffix") - .IsRequired() - .HasMaxLength(255) - .HasColumnType("character varying(255)") - .HasColumnName("suffix") - .HasColumnOrder(3) - .HasComment("Номер страницы, эррата и т.д."); - - b.HasKey("EntityId", "SourceId") - .HasName("pk_entity_sources"); - - b.HasIndex("SourceId") - .HasDatabaseName("ix_entity_sources_source_id"); - - b.ToTable("entity_sources", (string)null); - }); - - modelBuilder.Entity("Pf2eDataScrapper.Model.Base.Source.Source", b => - { - b.Property("Id") - .ValueGeneratedOnAdd() - .HasColumnType("integer") - .HasColumnName("id") - .HasColumnOrder(1); - - NpgsqlPropertyBuilderExtensions.UseIdentityByDefaultColumn(b.Property("Id")); - - b.Property("Category") - .HasColumnType("source_category") - .HasColumnName("category") - .HasColumnOrder(3); - - b.Property("Name") - .IsRequired() - .HasMaxLength(255) - .HasColumnType("character varying(255)") - .HasColumnName("name") - .HasColumnOrder(2); - - b.Property("ReleaseDate") - .HasColumnType("date") - .HasColumnName("release_date") - .HasColumnOrder(4); - - b.HasKey("Id") - .HasName("pk_sources"); - - b.ToTable("sources", (string)null); - }); - - modelBuilder.Entity("Pf2eDataScrapper.Model.Base.Targets.EntityExternal", b => - { - b.Property("EntityId") - .HasColumnType("integer") - .HasColumnName("entity_id") - .HasColumnOrder(0); - - b.Property("TargetId") - .HasColumnType("integer") - .HasColumnName("target_id") - .HasColumnOrder(1); - - b.Property("Md5") - .IsRequired() - .HasMaxLength(32) - .HasColumnType("character varying(32)") - .HasColumnName("md5") - .HasColumnOrder(3) - .HasComment("Контроль версии объекта"); - - b.Property("Suffix") - .IsRequired() - .HasMaxLength(255) - .HasColumnType("character varying(255)") - .HasColumnName("suffix") - .HasColumnOrder(2) - .HasComment("Часть URL до объекта. Для источников Foundry - полный UUID объекта"); - - b.HasKey("EntityId", "TargetId") - .HasName("pk_entity_externals"); - - b.HasIndex("TargetId") - .HasDatabaseName("ix_entity_externals_target_id"); - - b.ToTable("entity_externals", (string)null); - }); - - modelBuilder.Entity("Pf2eDataScrapper.Model.Base.Targets.ExternalTarget", b => - { - b.Property("Id") - .ValueGeneratedOnAdd() - .HasColumnType("integer") - .HasColumnName("id") - .HasColumnOrder(1); - - NpgsqlPropertyBuilderExtensions.UseIdentityByDefaultColumn(b.Property("Id")); - - b.Property("Icon") - .IsRequired() - .HasMaxLength(255) - .HasColumnType("character varying(255)") - .HasColumnName("icon") - .HasColumnOrder(3); - - b.Property("Name") - .IsRequired() - .HasMaxLength(255) - .HasColumnType("character varying(255)") - .HasColumnName("name") - .HasColumnOrder(2); - - b.Property("Prefix") - .IsRequired() - .HasMaxLength(255) - .HasColumnType("character varying(255)") - .HasColumnName("prefix") - .HasColumnOrder(3); - - b.HasKey("Id") - .HasName("pk_external_targets"); - - b.ToTable("external_targets", (string)null); - }); - - modelBuilder.Entity("Pf2eDataScrapper.Model.Common.Frequency", b => - { - b.Property("Id") - .ValueGeneratedOnAdd() - .HasColumnType("integer") - .HasColumnName("id") - .HasColumnOrder(1); - - NpgsqlPropertyBuilderExtensions.UseIdentityByDefaultColumn(b.Property("Id")); - - b.Property("Max") - .HasColumnType("integer") - .HasColumnName("max") - .HasColumnOrder(2); - - b.Property("Per") - .HasColumnType("integer") - .HasColumnName("per") - .HasColumnOrder(3); - - b.Property("Value") - .HasColumnType("integer") - .HasColumnName("value") - .HasColumnOrder(4); - - b.HasKey("Id") - .HasName("pk_frequencies"); - - b.ToTable("frequencies", (string)null); - }); - - modelBuilder.Entity("Pf2eDataScrapper.Model.Common.Language", b => - { - b.Property("Id") - .ValueGeneratedOnAdd() - .HasColumnType("integer") - .HasColumnName("id") - .HasColumnOrder(1); - - NpgsqlPropertyBuilderExtensions.UseIdentityByDefaultColumn(b.Property("Id")); - - b.Property("Name") - .IsRequired() - .HasMaxLength(255) - .HasColumnType("character varying(255)") - .HasColumnName("name") - .HasColumnOrder(2); - - b.Property("Rarity") - .HasColumnType("entity_rarity") - .HasColumnName("rarity") - .HasColumnOrder(4); - - b.Property("Slug") - .IsRequired() - .HasMaxLength(255) - .HasColumnType("character varying(255)") - .HasColumnName("slug") - .HasColumnOrder(3); - - b.HasKey("Id") - .HasName("pk_languages"); - - b.ToTable("languages", (string)null); - }); - - modelBuilder.Entity("Pf2eDataScrapper.Model.Common.Training", b => - { - b.Property("Id") - .ValueGeneratedOnAdd() - .HasColumnType("integer") - .HasColumnName("id") - .HasColumnOrder(1); - - NpgsqlPropertyBuilderExtensions.UseIdentityByDefaultColumn(b.Property("Id")); - - b.Property("Key") - .IsRequired() - .HasMaxLength(255) - .HasColumnType("character varying(255)") - .HasColumnName("key") - .HasColumnOrder(2); - - b.HasKey("Id") - .HasName("pk_trainings"); - - b.ToTable("trainings", (string)null); - }); - - modelBuilder.Entity("Pf2eDataScrapper.Model.Structure.Action", b => - { - b.Property("Id") - .HasColumnType("integer") - .HasColumnName("id") - .HasColumnOrder(1); - - b.Property("Actions") - .HasColumnType("integer") - .HasColumnName("actions") - .HasColumnOrder(3); - - b.Property("Extra") - .HasColumnType("text") - .HasColumnName("extra") - .HasColumnOrder(6); - - b.Property("IsFreeAction") - .HasColumnType("boolean") - .HasColumnName("is_free_action") - .HasColumnOrder(6); - - b.Property("IsPassive") - .HasColumnType("boolean") - .HasColumnName("is_passive") - .HasColumnOrder(6); - - b.Property("IsReaction") - .HasColumnType("boolean") - .HasColumnName("is_reaction") - .HasColumnOrder(5); - - b.Property("MaxActions") - .HasColumnType("integer") - .HasColumnName("max_actions") - .HasColumnOrder(4); - - b.Property("Type") - .HasColumnType("action_type") - .HasColumnName("type") - .HasColumnOrder(2); - - b.HasKey("Id") - .HasName("pk_actions"); - - b.ToTable("actions", (string)null); - }); - - modelBuilder.Entity("Pf2eDataScrapper.Model.Structure.Ancestry", b => - { - b.Property("Id") - .HasColumnType("integer") - .HasColumnName("id") - .HasColumnOrder(1); - - b.Property("Hp") - .HasColumnType("integer") - .HasColumnName("hp") - .HasColumnOrder(3); - - b.Property("Reach") - .HasColumnType("integer") - .HasColumnName("reach") - .HasColumnOrder(4); - - b.Property("Size") - .HasColumnType("size") - .HasColumnName("size") - .HasColumnOrder(2); - - b.Property("Speed") - .HasColumnType("integer") - .HasColumnName("speed") - .HasColumnOrder(5); - - b.Property("Vision") - .HasColumnType("ancestry_vision") - .HasColumnName("vision") - .HasColumnOrder(6); - - b.HasKey("Id") - .HasName("pk_ancestries"); - - b.ToTable("ancestries", (string)null); - }); - - modelBuilder.Entity("Pf2eDataScrapper.Model.Structure.AncestryRelation.AncestryBoost", b => - { - b.Property("Id") - .ValueGeneratedOnAdd() - .HasColumnType("integer") - .HasColumnName("id") - .HasColumnOrder(1); - - NpgsqlPropertyBuilderExtensions.UseIdentityByDefaultColumn(b.Property("Id")); - - b.Property("AncestryId") - .HasColumnType("integer") - .HasColumnName("ancestry_id") - .HasColumnOrder(2); - - b.Property("Boost") - .HasColumnType("boolean") - .HasColumnName("boost") - .HasColumnOrder(3); - - b.Property("Value") - .HasColumnType("attribute_values") - .HasColumnName("value") - .HasColumnOrder(4); - - b.HasKey("Id") - .HasName("pk_ancestry_boosts"); - - b.HasIndex("AncestryId") - .HasDatabaseName("ix_ancestry_boosts_ancestry_id"); - - b.ToTable("ancestry_boosts", (string)null); - }); - - modelBuilder.Entity("Pf2eDataScrapper.Model.Structure.AncestryRelation.AncestryItem", b => - { - b.Property("AncestryId") - .HasColumnType("integer") - .HasColumnName("ancestry_id") - .HasColumnOrder(1); - - b.Property("ItemId") - .HasColumnType("integer") - .HasColumnName("item_id") - .HasColumnOrder(2); - - b.Property("Level") - .HasColumnType("integer") - .HasColumnName("level") - .HasColumnOrder(3); - - b.HasKey("AncestryId", "ItemId") - .HasName("pk_ancestry_items"); - - b.HasIndex("ItemId") - .HasDatabaseName("ix_ancestry_items_item_id"); - - b.ToTable("ancestry_items", (string)null); - }); - - modelBuilder.Entity("Pf2eDataScrapper.Model.Structure.AncestryRelation.AncestryLanguage", b => - { - b.Property("AncestryId") - .HasColumnType("integer") - .HasColumnName("ancestry_id") - .HasColumnOrder(1); - - b.Property("LanguageId") - .HasColumnType("integer") - .HasColumnName("language_id") - .HasColumnOrder(2); - - b.Property("IsAdditional") - .HasColumnType("boolean") - .HasColumnName("is_additional") - .HasColumnOrder(3); - - b.HasKey("AncestryId", "LanguageId") - .HasName("pk_ancestry_languages"); - - b.HasIndex("LanguageId") - .HasDatabaseName("ix_ancestry_languages_language_id"); - - b.ToTable("ancestry_languages", (string)null); - }); - - modelBuilder.Entity("Pf2eDataScrapper.Model.Structure.Background", b => - { - b.Property("Id") - .HasColumnType("integer") - .HasColumnName("id") - .HasColumnOrder(1); - - b.HasKey("Id") - .HasName("pk_backgrounds"); - - b.ToTable("backgrounds", (string)null); - }); - - modelBuilder.Entity("Pf2eDataScrapper.Model.Structure.BackgroundRelation.BackgroundBoost", b => - { - b.Property("Id") - .HasColumnType("integer") - .HasColumnName("id") - .HasColumnOrder(1); - - b.Property("Attribute") - .HasColumnType("attribute_values") - .HasColumnName("attribute") - .HasColumnOrder(3); - - b.Property("BackgroundId") - .HasColumnType("integer") - .HasColumnName("background_id") - .HasColumnOrder(2); - - b.HasKey("Id") - .HasName("pk_background_boosts"); - - b.HasIndex("BackgroundId") - .HasDatabaseName("ix_background_boosts_background_id"); - - b.ToTable("background_boosts", (string)null); - }); - - modelBuilder.Entity("Pf2eDataScrapper.Model.Structure.BackgroundRelation.BackgroundItem", b => - { - b.Property("BackgroundId") - .HasColumnType("integer") - .HasColumnName("background_id") - .HasColumnOrder(1); - - b.Property("EntityId") - .HasColumnType("integer") - .HasColumnName("entity_id") - .HasColumnOrder(2); - - b.Property("Level") - .HasColumnType("integer") - .HasColumnName("level") - .HasColumnOrder(3); - - b.HasKey("BackgroundId", "EntityId") - .HasName("pk_background_items"); - - b.HasIndex("EntityId") - .HasDatabaseName("ix_background_items_entity_id"); - - b.ToTable("background_items", (string)null); - }); - - modelBuilder.Entity("Pf2eDataScrapper.Model.Structure.BackgroundRelation.BackgroundTraining", b => - { - b.Property("Id") - .HasColumnType("integer") - .HasColumnName("id") - .HasColumnOrder(1); - - b.Property("BackgroundId") - .HasColumnType("integer") - .HasColumnName("background_id") - .HasColumnOrder(2); - - b.Property("Level") - .HasColumnType("training_stage") - .HasColumnName("level") - .HasColumnOrder(4); - - b.Property("TrainingId") - .HasColumnType("integer") - .HasColumnName("training_id") - .HasColumnOrder(3); - - b.HasKey("Id") - .HasName("pk_background_skills"); - - b.HasIndex("BackgroundId") - .HasDatabaseName("ix_background_skills_background_id"); - - b.HasIndex("TrainingId") - .HasDatabaseName("ix_background_skills_training_id"); - - b.ToTable("background_skills", (string)null); - }); - - modelBuilder.Entity("Pf2eDataScrapper.Model.Structure.Class", b => - { - b.Property("Id") - .HasColumnType("integer") - .HasColumnName("id") - .HasColumnOrder(1); - - b.Property("AdditionalTrainedSkills") - .HasColumnType("integer") - .HasColumnName("additional_trained_skills") - .HasColumnOrder(6); - - b.Property("Hp") - .HasColumnType("integer") - .HasColumnName("hp") - .HasColumnOrder(3); - - b.Property("Perception") - .HasColumnType("integer") - .HasColumnName("perception") - .HasColumnOrder(4); - - b.Property("Spellcasting") - .HasColumnType("boolean") - .HasColumnName("spellcasting") - .HasColumnOrder(5); - - b.HasKey("Id") - .HasName("pk_classes"); - - b.ToTable("classes", (string)null); - }); - - modelBuilder.Entity("Pf2eDataScrapper.Model.Structure.ClassRelation.ClassKeyAbility", b => - { - b.Property("Id") - .ValueGeneratedOnAdd() - .HasColumnType("integer") - .HasColumnName("id") - .HasColumnOrder(1); - - NpgsqlPropertyBuilderExtensions.UseIdentityByDefaultColumn(b.Property("Id")); - - b.Property("ClassId") - .HasColumnType("integer") - .HasColumnName("class_id") - .HasColumnOrder(2); - - b.Property("Value") - .HasColumnType("attribute_values") - .HasColumnName("value") - .HasColumnOrder(3); - - b.HasKey("Id") - .HasName("pk_class_key_abilities"); - - b.HasIndex("ClassId") - .HasDatabaseName("ix_class_key_abilities_class_id"); - - b.ToTable("class_key_abilities", (string)null); - }); - - modelBuilder.Entity("Pf2eDataScrapper.Model.Structure.ClassRelation.ClassProgression", b => - { - b.Property("Id") - .ValueGeneratedOnAdd() - .HasColumnType("integer") - .HasColumnName("id") - .HasColumnOrder(1); - - NpgsqlPropertyBuilderExtensions.UseIdentityByDefaultColumn(b.Property("Id")); - - b.Property("ClassId") - .HasColumnType("integer") - .HasColumnName("class_id") - .HasColumnOrder(2); - - b.Property("EntityId") - .HasColumnType("integer") - .HasColumnName("entity_id") - .HasColumnOrder(5); - - b.Property("Level") - .HasColumnType("integer") - .HasColumnName("level") - .HasColumnOrder(31); - - b.Property("Type") - .HasColumnType("class_progression_type") - .HasColumnName("type") - .HasColumnOrder(4); - - b.HasKey("Id") - .HasName("pk_class_progressions"); - - b.HasIndex("ClassId") - .HasDatabaseName("ix_class_progressions_class_id"); - - b.HasIndex("EntityId") - .HasDatabaseName("ix_class_progressions_entity_id"); - - b.ToTable("class_progressions", (string)null); - }); - - modelBuilder.Entity("Pf2eDataScrapper.Model.Structure.ClassRelation.ClassTraining", b => - { - b.Property("Id") - .ValueGeneratedOnAdd() - .HasColumnType("integer") - .HasColumnName("id") - .HasColumnOrder(1); - - NpgsqlPropertyBuilderExtensions.UseIdentityByDefaultColumn(b.Property("Id")); - - b.Property("ClassId") - .HasColumnType("integer") - .HasColumnName("class_id") - .HasColumnOrder(2); - - b.Property("Name") - .HasMaxLength(255) - .HasColumnType("character varying(255)") - .HasColumnName("name") - .HasColumnOrder(4); - - b.Property("Stage") - .HasColumnType("integer") - .HasColumnName("stage") - .HasColumnOrder(5); - - b.Property("TrainingId") - .HasColumnType("integer") - .HasColumnName("training_id") - .HasColumnOrder(3); - - b.HasKey("Id") - .HasName("pk_class_trainings"); - - b.HasIndex("ClassId") - .HasDatabaseName("ix_class_trainings_class_id"); - - b.HasIndex("TrainingId") - .HasDatabaseName("ix_class_trainings_training_id"); - - b.ToTable("class_trainings", (string)null); - }); - - modelBuilder.Entity("Pf2eDataScrapper.Model.Structure.Condition", b => - { - b.Property("Id") - .HasColumnType("integer") - .HasColumnName("id") - .HasColumnOrder(1); - - b.Property("Extra") - .HasColumnType("text") - .HasColumnName("extra") - .HasColumnOrder(3); - - b.Property("Group") - .HasColumnType("condition_group") - .HasColumnName("group") - .HasColumnOrder(2); - - b.HasKey("Id") - .HasName("pk_conditions"); - - b.ToTable("conditions", (string)null); - }); - - modelBuilder.Entity("Pf2eDataScrapper.Model.Structure.Deity", b => - { - b.Property("Id") - .HasColumnType("integer") - .HasColumnName("id") - .HasColumnOrder(1); - - b.Property("Category") - .HasColumnType("deity_category") - .HasColumnName("category") - .HasColumnOrder(2); - - b.Property("Fonts") - .HasColumnType("deity_fonts") - .HasColumnName("fonts") - .HasColumnOrder(3); - - b.Property("Sanctification") - .HasColumnType("deity_sanctification") - .HasColumnName("sanctification") - .HasColumnOrder(4); - - b.Property("SanctificationMust") - .HasColumnType("boolean") - .HasColumnName("sanctification_must") - .HasColumnOrder(5); - - b.HasKey("Id") - .HasName("pk_deities"); - - b.ToTable("deities", (string)null); - }); - - modelBuilder.Entity("Pf2eDataScrapper.Model.Structure.DeityRelation.DeityAttribute", b => - { - b.Property("DeityId") - .HasColumnType("integer") - .HasColumnName("deity_id") - .HasColumnOrder(1); - - b.Property("Attribute") - .HasColumnType("attribute_values") - .HasColumnName("attribute") - .HasColumnOrder(2); - - b.HasKey("DeityId", "Attribute") - .HasName("pk_deity_attributes"); - - b.ToTable("deity_attributes", (string)null); - }); - - modelBuilder.Entity("Pf2eDataScrapper.Model.Structure.DeityRelation.DeityDomain", b => - { - b.Property("Id") - .ValueGeneratedOnAdd() - .HasColumnType("integer") - .HasColumnName("id") - .HasColumnOrder(1); - - NpgsqlPropertyBuilderExtensions.UseIdentityByDefaultColumn(b.Property("Id")); - - b.Property("DeityId") - .HasColumnType("integer") - .HasColumnName("deity_id") - .HasColumnOrder(2); - - b.Property("IsPrimary") - .HasColumnType("boolean") - .HasColumnName("is_primary") - .HasColumnOrder(3); - - b.Property("Value") - .IsRequired() - .HasMaxLength(255) - .HasColumnType("character varying(255)") - .HasColumnName("value") - .HasColumnOrder(4); - - b.HasKey("Id") - .HasName("pk_deity_domains"); - - b.HasIndex("DeityId") - .HasDatabaseName("ix_deity_domains_deity_id"); - - b.ToTable("deity_domains", (string)null); - }); - - modelBuilder.Entity("Pf2eDataScrapper.Model.Structure.DeityRelation.DeitySpell", b => - { - b.Property("Id") - .ValueGeneratedOnAdd() - .HasColumnType("integer") - .HasColumnName("id") - .HasColumnOrder(1); - - NpgsqlPropertyBuilderExtensions.UseIdentityByDefaultColumn(b.Property("Id")); - - b.Property("DeityId") - .HasColumnType("integer") - .HasColumnName("deity_id") - .HasColumnOrder(2); - - b.Property("Level") - .HasColumnType("integer") - .HasColumnName("level") - .HasColumnOrder(3); - - b.Property("SpellId") - .HasColumnType("integer") - .HasColumnName("spell_id") - .HasColumnOrder(4); - - b.HasKey("Id") - .HasName("pk_deity_spells"); - - b.HasIndex("DeityId") - .HasDatabaseName("ix_deity_spells_deity_id"); - - b.HasIndex("SpellId") - .HasDatabaseName("ix_deity_spells_spell_id"); - - b.ToTable("deity_spells", (string)null); - }); - - modelBuilder.Entity("Pf2eDataScrapper.Model.Structure.DeityRelation.DeityWeapon", b => - { - b.Property("Id") - .ValueGeneratedOnAdd() - .HasColumnType("integer") - .HasColumnName("id") - .HasColumnOrder(1); - - NpgsqlPropertyBuilderExtensions.UseIdentityByDefaultColumn(b.Property("Id")); - - b.Property("DeityId") - .HasColumnType("integer") - .HasColumnName("deity_id") - .HasColumnOrder(2); - - b.Property("Weapon") - .IsRequired() - .HasMaxLength(255) - .HasColumnType("character varying(255)") - .HasColumnName("weapon") - .HasColumnOrder(3); - - b.HasKey("Id") - .HasName("pk_deity_weapons"); - - b.HasIndex("DeityId") - .HasDatabaseName("ix_deity_weapons_deity_id"); - - b.ToTable("deity_weapons", (string)null); - }); - - modelBuilder.Entity("Pf2eDataScrapper.Model.Structure.Feat", b => - { - b.Property("Id") - .HasColumnType("integer") - .HasColumnName("id") - .HasColumnOrder(1); - - b.Property("Actions") - .HasColumnType("integer") - .HasColumnName("actions") - .HasColumnOrder(4); - - b.Property("Category") - .HasColumnType("action_category") - .HasColumnName("category") - .HasColumnOrder(3); - - b.Property("Extra") - .HasColumnType("text") - .HasColumnName("extra") - .HasColumnOrder(10); - - b.Property("Level") - .HasColumnType("integer") - .HasColumnName("level") - .HasColumnOrder(5); - - b.Property("LevelTaken") - .HasColumnType("integer") - .HasColumnName("level_taken") - .HasColumnOrder(6); - - b.Property("Location") - .HasMaxLength(255) - .HasColumnType("character varying(255)") - .HasColumnName("location") - .HasColumnOrder(8); - - b.Property("MaxTakable") - .HasColumnType("integer") - .HasColumnName("max_takable") - .HasColumnOrder(7); - - b.Property("OnlyLevel1") - .HasColumnType("boolean") - .HasColumnName("only_level1") - .HasColumnOrder(9); - - b.Property("Type") - .HasColumnType("action_type") - .HasColumnName("type") - .HasColumnOrder(2); - - b.HasKey("Id") - .HasName("pk_feats"); - - b.ToTable("feats", (string)null); - }); - - modelBuilder.Entity("Pf2eDataScrapper.Model.Structure.FeatRelation.FeatPrerequisite", b => - { - b.Property("Id") - .ValueGeneratedOnAdd() - .HasColumnType("integer") - .HasColumnName("id") - .HasColumnOrder(1); - - NpgsqlPropertyBuilderExtensions.UseIdentityByDefaultColumn(b.Property("Id")); - - b.Property("FeatId") - .HasColumnType("integer") - .HasColumnName("feat_id") - .HasColumnOrder(2); - - b.Property("Value") - .IsRequired() - .HasMaxLength(255) - .HasColumnType("character varying(255)") - .HasColumnName("value") - .HasColumnOrder(3); - - b.HasKey("Id") - .HasName("pk_feat_prerequisites"); - - b.HasIndex("FeatId") - .HasDatabaseName("ix_feat_prerequisites_feat_id"); - - b.ToTable("feat_prerequisites", (string)null); - }); - - modelBuilder.Entity("Pf2eDataScrapper.Model.Structure.Heritage", b => - { - b.Property("Id") - .HasColumnType("integer") - .HasColumnName("id") - .HasColumnOrder(1); - - b.Property("AncestryId") - .HasColumnType("integer") - .HasColumnName("ancestry_id") - .HasColumnOrder(2); - - b.HasKey("Id") - .HasName("pk_heritages"); - - b.HasIndex("AncestryId") - .HasDatabaseName("ix_heritages_ancestry_id"); - - b.ToTable("heritages", (string)null); - }); - - modelBuilder.Entity("Pf2eDataScrapper.Model.Structure.Spell", b => - { - b.Property("Id") - .HasColumnType("integer") - .HasColumnName("id") - .HasColumnOrder(1); - - b.Property("CanHeightening") - .HasColumnType("boolean") - .HasColumnName("can_heightening") - .HasColumnOrder(11); - - b.Property("Cost") - .HasColumnType("integer") - .HasColumnName("cost") - .HasColumnOrder(3); - - b.Property("Counteraction") - .HasColumnType("boolean") - .HasColumnName("counteraction") - .HasColumnOrder(4); - - b.Property("Duration") - .IsRequired() - .HasMaxLength(255) - .HasColumnType("character varying(255)") - .HasColumnName("duration") - .HasColumnOrder(6); - - b.Property("Level") - .HasColumnType("integer") - .HasColumnName("level") - .HasColumnOrder(2); - - b.Property("Range") - .IsRequired() - .HasMaxLength(255) - .HasColumnType("character varying(255)") - .HasColumnName("range") - .HasColumnOrder(7); - - b.Property("Requirements") - .IsRequired() - .HasMaxLength(255) - .HasColumnType("character varying(255)") - .HasColumnName("requirements") - .HasColumnOrder(8); - - b.Property("Sustained") - .HasColumnType("boolean") - .HasColumnName("sustained") - .HasColumnOrder(5); - - b.Property("Target") - .IsRequired() - .HasMaxLength(255) - .HasColumnType("character varying(255)") - .HasColumnName("target") - .HasColumnOrder(9); - - b.Property("Time") - .IsRequired() - .HasMaxLength(255) - .HasColumnType("character varying(255)") - .HasColumnName("time") - .HasColumnOrder(10); - - b.HasKey("Id") - .HasName("pk_spells"); - - b.ToTable("spells", (string)null); - }); - - modelBuilder.Entity("Pf2eDataScrapper.Model.Structure.SpellRelation.SpellArea", b => - { - b.Property("SpellId") - .HasColumnType("integer") - .HasColumnName("spell_id") - .HasColumnOrder(1); - - b.Property("Details") - .HasMaxLength(255) - .HasColumnType("character varying(255)") - .HasColumnName("details") - .HasColumnOrder(2); - - b.Property("Type") - .HasColumnType("spell_area_type") - .HasColumnName("type") - .HasColumnOrder(3); - - b.Property("Value") - .HasColumnType("integer") - .HasColumnName("value") - .HasColumnOrder(4); - - b.HasKey("SpellId") - .HasName("pk_spell_areas"); - - b.ToTable("spell_areas", (string)null); - }); - - modelBuilder.Entity("Pf2eDataScrapper.Model.Structure.SpellRelation.SpellDamage", b => - { - b.Property("Id") - .ValueGeneratedOnAdd() - .HasColumnType("integer") - .HasColumnName("id") - .HasColumnOrder(1); - - NpgsqlPropertyBuilderExtensions.UseIdentityByDefaultColumn(b.Property("Id")); - - b.Property("ApplyMod") - .HasColumnType("boolean") - .HasColumnName("apply_mod") - .HasColumnOrder(4); - - b.Property("Category") - .HasColumnType("spell_damage_category") - .HasColumnName("category") - .HasColumnOrder(5); - - b.Property("Formula") - .IsRequired() - .HasMaxLength(255) - .HasColumnType("character varying(255)") - .HasColumnName("formula") - .HasColumnOrder(6); - - b.Property("Key") - .IsRequired() - .HasMaxLength(255) - .HasColumnType("character varying(255)") - .HasColumnName("key") - .HasColumnOrder(3); - - b.Property("Kinds") - .HasColumnType("spell_damage_kinds") - .HasColumnName("kinds") - .HasColumnOrder(7); - - b.Property("Materials") - .HasMaxLength(255) - .HasColumnType("character varying(255)") - .HasColumnName("materials") - .HasColumnOrder(8); - - b.Property("SpellId") - .HasColumnType("integer") - .HasColumnName("spell_id") - .HasColumnOrder(2); - - b.Property("Type") - .IsRequired() - .HasMaxLength(255) - .HasColumnType("character varying(255)") - .HasColumnName("type") - .HasColumnOrder(9); - - b.HasKey("Id") - .HasName("pk_spell_damages"); - - b.HasIndex("SpellId") - .HasDatabaseName("ix_spell_damages_spell_id"); - - b.ToTable("spell_damages", (string)null); - }); - - modelBuilder.Entity("Pf2eDataScrapper.Model.Structure.SpellRelation.SpellDefense", b => - { - b.Property("Id") - .ValueGeneratedOnAdd() - .HasColumnType("integer") - .HasColumnName("id") - .HasColumnOrder(1); - - NpgsqlPropertyBuilderExtensions.UseIdentityByDefaultColumn(b.Property("Id")); - - b.Property("IsBasic") - .HasColumnType("boolean") - .HasColumnName("is_basic") - .HasColumnOrder(4); - - b.Property("IsPassive") - .HasColumnType("boolean") - .HasColumnName("is_passive") - .HasColumnOrder(3); - - b.Property("SpellId") - .HasColumnType("integer") - .HasColumnName("spell_id") - .HasColumnOrder(2); - - b.Property("Statistic") - .IsRequired() - .HasMaxLength(255) - .HasColumnType("character varying(255)") - .HasColumnName("statistic") - .HasColumnOrder(5); - - b.HasKey("Id") - .HasName("pk_spell_defenses"); - - b.HasIndex("SpellId") - .HasDatabaseName("ix_spell_defenses_spell_id"); - - b.ToTable("spell_defenses", (string)null); - }); - - modelBuilder.Entity("Pf2eDataScrapper.Model.Structure.SpellRelation.SpellRitual", b => - { - b.Property("SpellId") - .HasColumnType("integer") - .HasColumnName("spell_id") - .HasColumnOrder(1); - - b.Property("PrimaryCheck") - .IsRequired() - .HasMaxLength(255) - .HasColumnType("character varying(255)") - .HasColumnName("primary_check") - .HasColumnOrder(2); - - b.Property("SecondaryCasters") - .HasColumnType("integer") - .HasColumnName("secondary_casters") - .HasColumnOrder(3); - - b.Property("SecondaryChecks") - .IsRequired() - .HasMaxLength(255) - .HasColumnType("character varying(255)") - .HasColumnName("secondary_checks") - .HasColumnOrder(4); - - b.HasKey("SpellId") - .HasName("pk_spell_rituals"); - - b.ToTable("spell_rituals", (string)null); - }); - - modelBuilder.Entity("Pf2eDataScrapper.Model.Structure.Trait", b => - { - b.Property("Id") - .HasColumnType("integer") - .HasColumnName("id") - .HasColumnOrder(1); - - b.Property("Type") - .HasColumnType("trait_type") - .HasColumnName("type") - .HasColumnOrder(2); - - b.HasKey("Id") - .HasName("pk_traits"); - - b.ToTable("traits", (string)null); - }); - - modelBuilder.Entity("DeityTraining", b => - { - b.HasOne("Pf2eDataScrapper.Model.Structure.Deity", null) - .WithMany() - .HasForeignKey("DeityId") - .OnDelete(DeleteBehavior.Cascade) - .IsRequired() - .HasConstraintName("fk_deity_training_deities_deity_id"); - - b.HasOne("Pf2eDataScrapper.Model.Common.Training", null) - .WithMany() - .HasForeignKey("SkillsId") - .OnDelete(DeleteBehavior.Cascade) - .IsRequired() - .HasConstraintName("fk_deity_training_trainings_skills_id"); - }); - - modelBuilder.Entity("EntityKeyword", b => - { - b.HasOne("Pf2eDataScrapper.Model.Base.Entity", null) - .WithMany() - .HasForeignKey("EntitiesId") - .OnDelete(DeleteBehavior.Cascade) - .IsRequired() - .HasConstraintName("fk_entity_keyword_entities_entities_id"); - - b.HasOne("Pf2eDataScrapper.Model.Base.Keywords.Keyword", null) - .WithMany() - .HasForeignKey("KeywordsId") - .OnDelete(DeleteBehavior.Cascade) - .IsRequired() - .HasConstraintName("fk_entity_keyword_keywords_keywords_id"); - }); - - modelBuilder.Entity("EntityTrait", b => - { - b.HasOne("Pf2eDataScrapper.Model.Base.Entity", null) - .WithMany() - .HasForeignKey("EntitiesId") - .OnDelete(DeleteBehavior.Cascade) - .IsRequired() - .HasConstraintName("fk_entity_trait_entities_entities_id"); - - b.HasOne("Pf2eDataScrapper.Model.Structure.Trait", null) - .WithMany() - .HasForeignKey("TraitsId") - .OnDelete(DeleteBehavior.Cascade) - .IsRequired() - .HasConstraintName("fk_entity_trait_traits_traits_id"); - }); - - modelBuilder.Entity("Pf2eDataScrapper.Model.Base.EntityAlias", b => - { - b.HasOne("Pf2eDataScrapper.Model.Base.Entity", "Entity") - .WithMany("Aliases") - .HasForeignKey("EntityId") - .OnDelete(DeleteBehavior.Cascade) - .IsRequired() - .HasConstraintName("fk_entity_aliases_entities_entity_id"); - - b.Navigation("Entity"); - }); - - modelBuilder.Entity("Pf2eDataScrapper.Model.Base.Keywords.KeywordAlias", b => - { - b.HasOne("Pf2eDataScrapper.Model.Base.Keywords.Keyword", "Keyword") - .WithMany("Aliases") - .HasForeignKey("KeywordId") - .OnDelete(DeleteBehavior.Cascade) - .IsRequired() - .HasConstraintName("fk_keyword_aliases_keywords_keyword_id"); - - b.Navigation("Keyword"); - }); - - modelBuilder.Entity("Pf2eDataScrapper.Model.Base.Source.EntitySource", b => - { - b.HasOne("Pf2eDataScrapper.Model.Base.Entity", "Entity") - .WithMany("Sources") - .HasForeignKey("EntityId") - .OnDelete(DeleteBehavior.Cascade) - .IsRequired() - .HasConstraintName("fk_entity_sources_entities_entity_id"); - - b.HasOne("Pf2eDataScrapper.Model.Base.Source.Source", "Source") - .WithMany("EntitySources") - .HasForeignKey("SourceId") - .OnDelete(DeleteBehavior.Cascade) - .IsRequired() - .HasConstraintName("fk_entity_sources_sources_source_id"); - - b.Navigation("Entity"); - - b.Navigation("Source"); - }); - - modelBuilder.Entity("Pf2eDataScrapper.Model.Base.Targets.EntityExternal", b => - { - b.HasOne("Pf2eDataScrapper.Model.Base.Entity", "Entity") - .WithMany("Externals") - .HasForeignKey("EntityId") - .OnDelete(DeleteBehavior.Cascade) - .IsRequired() - .HasConstraintName("fk_entity_externals_entities_entity_id"); - - b.HasOne("Pf2eDataScrapper.Model.Base.Targets.ExternalTarget", "Target") - .WithMany("EntityExternals") - .HasForeignKey("TargetId") - .OnDelete(DeleteBehavior.Cascade) - .IsRequired() - .HasConstraintName("fk_entity_externals_external_targets_target_id"); - - b.Navigation("Entity"); - - b.Navigation("Target"); - }); - - modelBuilder.Entity("Pf2eDataScrapper.Model.Structure.Action", b => - { - b.HasOne("Pf2eDataScrapper.Model.Base.Entity", "Entity") - .WithOne() - .HasForeignKey("Pf2eDataScrapper.Model.Structure.Action", "Id") - .OnDelete(DeleteBehavior.Cascade) - .IsRequired() - .HasConstraintName("fk_actions_entities_id"); - - b.Navigation("Entity"); - }); - - modelBuilder.Entity("Pf2eDataScrapper.Model.Structure.Ancestry", b => - { - b.HasOne("Pf2eDataScrapper.Model.Base.Entity", "Entity") - .WithOne() - .HasForeignKey("Pf2eDataScrapper.Model.Structure.Ancestry", "Id") - .OnDelete(DeleteBehavior.Cascade) - .IsRequired() - .HasConstraintName("fk_ancestries_entities_id"); - - b.Navigation("Entity"); - }); - - modelBuilder.Entity("Pf2eDataScrapper.Model.Structure.AncestryRelation.AncestryBoost", b => - { - b.HasOne("Pf2eDataScrapper.Model.Structure.Ancestry", "Ancestry") - .WithMany("AncestryBoosts") - .HasForeignKey("AncestryId") - .OnDelete(DeleteBehavior.Cascade) - .IsRequired() - .HasConstraintName("fk_ancestry_boosts_ancestries_ancestry_id"); - - b.Navigation("Ancestry"); - }); - - modelBuilder.Entity("Pf2eDataScrapper.Model.Structure.AncestryRelation.AncestryItem", b => - { - b.HasOne("Pf2eDataScrapper.Model.Structure.Ancestry", "Ancestry") - .WithMany("AncestryItems") - .HasForeignKey("AncestryId") - .OnDelete(DeleteBehavior.Cascade) - .IsRequired() - .HasConstraintName("fk_ancestry_items_ancestries_ancestry_id"); - - b.HasOne("Pf2eDataScrapper.Model.Base.Entity", "Item") - .WithMany() - .HasForeignKey("ItemId") - .OnDelete(DeleteBehavior.Cascade) - .IsRequired() - .HasConstraintName("fk_ancestry_items_entities_item_id"); - - b.Navigation("Ancestry"); - - b.Navigation("Item"); - }); - - modelBuilder.Entity("Pf2eDataScrapper.Model.Structure.AncestryRelation.AncestryLanguage", b => - { - b.HasOne("Pf2eDataScrapper.Model.Structure.Ancestry", "Ancestry") - .WithMany("AncestryLanguages") - .HasForeignKey("AncestryId") - .OnDelete(DeleteBehavior.Cascade) - .IsRequired() - .HasConstraintName("fk_ancestry_languages_ancestries_ancestry_id"); - - b.HasOne("Pf2eDataScrapper.Model.Common.Language", "Language") - .WithMany() - .HasForeignKey("LanguageId") - .OnDelete(DeleteBehavior.Cascade) - .IsRequired() - .HasConstraintName("fk_ancestry_languages_languages_language_id"); - - b.Navigation("Ancestry"); - - b.Navigation("Language"); - }); - - modelBuilder.Entity("Pf2eDataScrapper.Model.Structure.Background", b => - { - b.HasOne("Pf2eDataScrapper.Model.Base.Entity", "Entity") - .WithOne() - .HasForeignKey("Pf2eDataScrapper.Model.Structure.Background", "Id") - .OnDelete(DeleteBehavior.Cascade) - .IsRequired() - .HasConstraintName("fk_backgrounds_entities_id"); - - b.Navigation("Entity"); - }); - - modelBuilder.Entity("Pf2eDataScrapper.Model.Structure.BackgroundRelation.BackgroundBoost", b => - { - b.HasOne("Pf2eDataScrapper.Model.Structure.Background", "Background") - .WithMany("BackgroundBoosts") - .HasForeignKey("BackgroundId") - .OnDelete(DeleteBehavior.Cascade) - .IsRequired() - .HasConstraintName("fk_background_boosts_backgrounds_background_id"); - - b.Navigation("Background"); - }); - - modelBuilder.Entity("Pf2eDataScrapper.Model.Structure.BackgroundRelation.BackgroundItem", b => - { - b.HasOne("Pf2eDataScrapper.Model.Structure.Background", "Background") - .WithMany("BackgroundItems") - .HasForeignKey("BackgroundId") - .OnDelete(DeleteBehavior.Cascade) - .IsRequired() - .HasConstraintName("fk_background_items_backgrounds_background_id"); - - b.HasOne("Pf2eDataScrapper.Model.Base.Entity", "Entity") - .WithMany() - .HasForeignKey("EntityId") - .OnDelete(DeleteBehavior.Cascade) - .IsRequired() - .HasConstraintName("fk_background_items_entities_entity_id"); - - b.Navigation("Background"); - - b.Navigation("Entity"); - }); - - modelBuilder.Entity("Pf2eDataScrapper.Model.Structure.BackgroundRelation.BackgroundTraining", b => - { - b.HasOne("Pf2eDataScrapper.Model.Structure.Background", "Background") - .WithMany("BackgroundSkills") - .HasForeignKey("BackgroundId") - .OnDelete(DeleteBehavior.Cascade) - .IsRequired() - .HasConstraintName("fk_background_skills_backgrounds_background_id"); - - b.HasOne("Pf2eDataScrapper.Model.Common.Training", "Training") - .WithMany() - .HasForeignKey("TrainingId") - .OnDelete(DeleteBehavior.Cascade) - .IsRequired() - .HasConstraintName("fk_background_skills_trainings_training_id"); - - b.Navigation("Background"); - - b.Navigation("Training"); - }); - - modelBuilder.Entity("Pf2eDataScrapper.Model.Structure.Class", b => - { - b.HasOne("Pf2eDataScrapper.Model.Base.Entity", "Entity") - .WithOne() - .HasForeignKey("Pf2eDataScrapper.Model.Structure.Class", "Id") - .OnDelete(DeleteBehavior.Cascade) - .IsRequired() - .HasConstraintName("fk_classes_entities_id"); - - b.Navigation("Entity"); - }); - - modelBuilder.Entity("Pf2eDataScrapper.Model.Structure.ClassRelation.ClassKeyAbility", b => - { - b.HasOne("Pf2eDataScrapper.Model.Structure.Class", "Class") - .WithMany("ClassKeyAbilities") - .HasForeignKey("ClassId") - .OnDelete(DeleteBehavior.Cascade) - .IsRequired() - .HasConstraintName("fk_class_key_abilities_classes_class_id"); - - b.Navigation("Class"); - }); - - modelBuilder.Entity("Pf2eDataScrapper.Model.Structure.ClassRelation.ClassProgression", b => - { - b.HasOne("Pf2eDataScrapper.Model.Structure.Class", "Class") - .WithMany("ClassProgressions") - .HasForeignKey("ClassId") - .OnDelete(DeleteBehavior.Cascade) - .IsRequired() - .HasConstraintName("fk_class_progressions_classes_class_id"); - - b.HasOne("Pf2eDataScrapper.Model.Base.Entity", "Entity") - .WithMany() - .HasForeignKey("EntityId") - .OnDelete(DeleteBehavior.SetNull) - .HasConstraintName("fk_class_progressions_entities_entity_id"); - - b.Navigation("Class"); - - b.Navigation("Entity"); - }); - - modelBuilder.Entity("Pf2eDataScrapper.Model.Structure.ClassRelation.ClassTraining", b => - { - b.HasOne("Pf2eDataScrapper.Model.Structure.Class", "Class") - .WithMany("ClassTrainings") - .HasForeignKey("ClassId") - .OnDelete(DeleteBehavior.Cascade) - .IsRequired() - .HasConstraintName("fk_class_trainings_classes_class_id"); - - b.HasOne("Pf2eDataScrapper.Model.Common.Training", "Training") - .WithMany() - .HasForeignKey("TrainingId") - .OnDelete(DeleteBehavior.SetNull) - .HasConstraintName("fk_class_trainings_trainings_training_id"); - - b.Navigation("Class"); - - b.Navigation("Training"); - }); - - modelBuilder.Entity("Pf2eDataScrapper.Model.Structure.Condition", b => - { - b.HasOne("Pf2eDataScrapper.Model.Base.Entity", "Entity") - .WithOne() - .HasForeignKey("Pf2eDataScrapper.Model.Structure.Condition", "Id") - .OnDelete(DeleteBehavior.Cascade) - .IsRequired() - .HasConstraintName("fk_conditions_entities_id"); - - b.Navigation("Entity"); - }); - - modelBuilder.Entity("Pf2eDataScrapper.Model.Structure.Deity", b => - { - b.HasOne("Pf2eDataScrapper.Model.Base.Entity", "Entity") - .WithOne() - .HasForeignKey("Pf2eDataScrapper.Model.Structure.Deity", "Id") - .OnDelete(DeleteBehavior.Cascade) - .IsRequired() - .HasConstraintName("fk_deities_entities_id"); - - b.Navigation("Entity"); - }); - - modelBuilder.Entity("Pf2eDataScrapper.Model.Structure.DeityRelation.DeityAttribute", b => - { - b.HasOne("Pf2eDataScrapper.Model.Structure.Deity", "Deity") - .WithMany("DeityAttributes") - .HasForeignKey("DeityId") - .OnDelete(DeleteBehavior.Cascade) - .IsRequired() - .HasConstraintName("fk_deity_attributes_deities_deity_id"); - - b.Navigation("Deity"); - }); - - modelBuilder.Entity("Pf2eDataScrapper.Model.Structure.DeityRelation.DeityDomain", b => - { - b.HasOne("Pf2eDataScrapper.Model.Structure.Deity", "Deity") - .WithMany("DeityDomains") - .HasForeignKey("DeityId") - .OnDelete(DeleteBehavior.Cascade) - .IsRequired() - .HasConstraintName("fk_deity_domains_deities_deity_id"); - - b.Navigation("Deity"); - }); - - modelBuilder.Entity("Pf2eDataScrapper.Model.Structure.DeityRelation.DeitySpell", b => - { - b.HasOne("Pf2eDataScrapper.Model.Structure.Deity", "Deity") - .WithMany("DeitySpells") - .HasForeignKey("DeityId") - .OnDelete(DeleteBehavior.Cascade) - .IsRequired() - .HasConstraintName("fk_deity_spells_deities_deity_id"); - - b.HasOne("Pf2eDataScrapper.Model.Structure.Spell", "Spell") - .WithMany() - .HasForeignKey("SpellId") - .OnDelete(DeleteBehavior.Cascade) - .IsRequired() - .HasConstraintName("fk_deity_spells_spells_spell_id"); - - b.Navigation("Deity"); - - b.Navigation("Spell"); - }); - - modelBuilder.Entity("Pf2eDataScrapper.Model.Structure.DeityRelation.DeityWeapon", b => - { - b.HasOne("Pf2eDataScrapper.Model.Structure.Deity", "Deity") - .WithMany("DeityWeapons") - .HasForeignKey("DeityId") - .OnDelete(DeleteBehavior.Cascade) - .IsRequired() - .HasConstraintName("fk_deity_weapons_deities_deity_id"); - - b.Navigation("Deity"); - }); - - modelBuilder.Entity("Pf2eDataScrapper.Model.Structure.Feat", b => - { - b.HasOne("Pf2eDataScrapper.Model.Base.Entity", "Entity") - .WithOne() - .HasForeignKey("Pf2eDataScrapper.Model.Structure.Feat", "Id") - .OnDelete(DeleteBehavior.Cascade) - .IsRequired() - .HasConstraintName("fk_feats_entities_id"); - - b.Navigation("Entity"); - }); - - modelBuilder.Entity("Pf2eDataScrapper.Model.Structure.FeatRelation.FeatPrerequisite", b => - { - b.HasOne("Pf2eDataScrapper.Model.Structure.Feat", "Feat") - .WithMany("FeatPrerequisites") - .HasForeignKey("FeatId") - .OnDelete(DeleteBehavior.Cascade) - .IsRequired() - .HasConstraintName("fk_feat_prerequisites_feats_feat_id"); - - b.Navigation("Feat"); - }); - - modelBuilder.Entity("Pf2eDataScrapper.Model.Structure.Heritage", b => - { - b.HasOne("Pf2eDataScrapper.Model.Structure.Ancestry", "Ancestry") - .WithMany("Heritages") - .HasForeignKey("AncestryId") - .OnDelete(DeleteBehavior.Cascade) - .HasConstraintName("fk_heritages_ancestries_ancestry_id"); - - b.HasOne("Pf2eDataScrapper.Model.Base.Entity", "Entity") - .WithOne() - .HasForeignKey("Pf2eDataScrapper.Model.Structure.Heritage", "Id") - .OnDelete(DeleteBehavior.Cascade) - .IsRequired() - .HasConstraintName("fk_heritages_entities_id"); - - b.Navigation("Ancestry"); - - b.Navigation("Entity"); - }); - - modelBuilder.Entity("Pf2eDataScrapper.Model.Structure.Spell", b => - { - b.HasOne("Pf2eDataScrapper.Model.Base.Entity", "Entity") - .WithOne() - .HasForeignKey("Pf2eDataScrapper.Model.Structure.Spell", "Id") - .OnDelete(DeleteBehavior.Cascade) - .IsRequired() - .HasConstraintName("fk_spells_entities_id"); - - b.Navigation("Entity"); - }); - - modelBuilder.Entity("Pf2eDataScrapper.Model.Structure.SpellRelation.SpellArea", b => - { - b.HasOne("Pf2eDataScrapper.Model.Structure.Spell", "Spell") - .WithOne("SpellArea") - .HasForeignKey("Pf2eDataScrapper.Model.Structure.SpellRelation.SpellArea", "SpellId") - .OnDelete(DeleteBehavior.Cascade) - .HasConstraintName("fk_spell_areas_spells_spell_id"); - - b.Navigation("Spell"); - }); - - modelBuilder.Entity("Pf2eDataScrapper.Model.Structure.SpellRelation.SpellDamage", b => - { - b.HasOne("Pf2eDataScrapper.Model.Structure.Spell", "Spell") - .WithMany("SpellDamages") - .HasForeignKey("SpellId") - .OnDelete(DeleteBehavior.Cascade) - .IsRequired() - .HasConstraintName("fk_spell_damages_spells_spell_id"); - - b.Navigation("Spell"); - }); - - modelBuilder.Entity("Pf2eDataScrapper.Model.Structure.SpellRelation.SpellDefense", b => - { - b.HasOne("Pf2eDataScrapper.Model.Structure.Spell", "Spell") - .WithMany("SpellDefenses") - .HasForeignKey("SpellId") - .OnDelete(DeleteBehavior.Cascade) - .IsRequired() - .HasConstraintName("fk_spell_defenses_spells_spell_id"); - - b.Navigation("Spell"); - }); - - modelBuilder.Entity("Pf2eDataScrapper.Model.Structure.SpellRelation.SpellRitual", b => - { - b.HasOne("Pf2eDataScrapper.Model.Structure.Spell", "Spell") - .WithOne("SpellRitual") - .HasForeignKey("Pf2eDataScrapper.Model.Structure.SpellRelation.SpellRitual", "SpellId") - .OnDelete(DeleteBehavior.Cascade) - .HasConstraintName("fk_spell_rituals_spells_spell_id"); - - b.Navigation("Spell"); - }); - - modelBuilder.Entity("Pf2eDataScrapper.Model.Structure.Trait", b => - { - b.HasOne("Pf2eDataScrapper.Model.Base.Entity", "Entity") - .WithOne() - .HasForeignKey("Pf2eDataScrapper.Model.Structure.Trait", "Id") - .OnDelete(DeleteBehavior.Cascade) - .IsRequired() - .HasConstraintName("fk_traits_entities_id"); - - b.Navigation("Entity"); - }); - - modelBuilder.Entity("Pf2eDataScrapper.Model.Base.Entity", b => - { - b.Navigation("Aliases"); - - b.Navigation("Externals"); - - b.Navigation("Sources"); - }); - - modelBuilder.Entity("Pf2eDataScrapper.Model.Base.Keywords.Keyword", b => - { - b.Navigation("Aliases"); - }); - - modelBuilder.Entity("Pf2eDataScrapper.Model.Base.Source.Source", b => - { - b.Navigation("EntitySources"); - }); - - modelBuilder.Entity("Pf2eDataScrapper.Model.Base.Targets.ExternalTarget", b => - { - b.Navigation("EntityExternals"); - }); - - modelBuilder.Entity("Pf2eDataScrapper.Model.Structure.Ancestry", b => - { - b.Navigation("AncestryBoosts"); - - b.Navigation("AncestryItems"); - - b.Navigation("AncestryLanguages"); - - b.Navigation("Heritages"); - }); - - modelBuilder.Entity("Pf2eDataScrapper.Model.Structure.Background", b => - { - b.Navigation("BackgroundBoosts"); - - b.Navigation("BackgroundItems"); - - b.Navigation("BackgroundSkills"); - }); - - modelBuilder.Entity("Pf2eDataScrapper.Model.Structure.Class", b => - { - b.Navigation("ClassKeyAbilities"); - - b.Navigation("ClassProgressions"); - - b.Navigation("ClassTrainings"); - }); - - modelBuilder.Entity("Pf2eDataScrapper.Model.Structure.Deity", b => - { - b.Navigation("DeityAttributes"); - - b.Navigation("DeityDomains"); - - b.Navigation("DeitySpells"); - - b.Navigation("DeityWeapons"); - }); - - modelBuilder.Entity("Pf2eDataScrapper.Model.Structure.Feat", b => - { - b.Navigation("FeatPrerequisites"); - }); - - modelBuilder.Entity("Pf2eDataScrapper.Model.Structure.Spell", b => - { - b.Navigation("SpellArea"); - - b.Navigation("SpellDamages"); - - b.Navigation("SpellDefenses"); - - b.Navigation("SpellRitual"); - }); -#pragma warning restore 612, 618 - } - } -} diff --git a/Pf2eDataScrapper/Model/Enum/ActionType.cs b/Pf2eDataScrapper/Model/Enum/ActionType.cs deleted file mode 100644 index 9ca33b1..0000000 --- a/Pf2eDataScrapper/Model/Enum/ActionType.cs +++ /dev/null @@ -1,30 +0,0 @@ -using NpgsqlTypes; -using Pf2eDataScrapper.Importers.Implementations.Aonprd.DataBuilder; - -namespace Pf2eDataScrapper.Model.Enum; - -public enum ActionType -{ - [PgName("none")] - None, - - [AonprdEnum(["Single Action", "Reaction or One Action", "Free Action or One Action"])] - [PgName("1_action")] - SingleAction, - - [AonprdEnum("Two Actions")] - [PgName("2_actions")] - TwoActions, - - [AonprdEnum("Three Actions")] - [PgName("3_actions")] - ThreeActions, - - [AonprdEnum(["Single Action to Three Actions", "Single Action or more Actions"])] - [PgName("1-3_actions")] - SingleToThreeActions, - - [AonprdEnum(["Single Action or Two Actions", "Single Action to Two Actions"])] - [PgName("1-2_actions")] - SingleToTwoActions, -} \ No newline at end of file diff --git a/Pf2eDataScrapper/Model/IEntity.cs b/Pf2eDataScrapper/Model/IEntity.cs deleted file mode 100644 index 745c75c..0000000 --- a/Pf2eDataScrapper/Model/IEntity.cs +++ /dev/null @@ -1,11 +0,0 @@ -using Pf2eDataScrapper.Model.Base; - -namespace Pf2eDataScrapper.Model; - -internal interface IEntity -{ - public int Id { get; set; } - - public Entity Entity { get; set; } - -} diff --git a/Pf2eDataScrapper/Pf2eDataScrapper.csproj b/Pf2eDataScrapper/Pf2eDataScrapper.csproj index 60caee2..5393688 100644 --- a/Pf2eDataScrapper/Pf2eDataScrapper.csproj +++ b/Pf2eDataScrapper/Pf2eDataScrapper.csproj @@ -24,6 +24,10 @@ + + + + Always @@ -33,8 +37,4 @@ - - - - diff --git a/Pf2eDataScrapper/Program.cs b/Pf2eDataScrapper/Program.cs index f6b6559..e61b2d5 100644 --- a/Pf2eDataScrapper/Program.cs +++ b/Pf2eDataScrapper/Program.cs @@ -1,6 +1,8 @@ using Pf2eDataScrapper; using Pf2eDataScrapper.Importers.Implementations.Aonprd; +Console.SetWindowSize(Console.LargestWindowWidth - 20, Console.LargestWindowHeight - 10); + EnvSettings.Load(); /* diff --git a/Pf2eDataScrapper/Migrations/20250418062358_Function.Designer.cs b/Pf2eModel/Migrations/20250418062358_Function.Designer.cs similarity index 84% rename from Pf2eDataScrapper/Migrations/20250418062358_Function.Designer.cs rename to Pf2eModel/Migrations/20250418062358_Function.Designer.cs index f1a91e8..a45cc09 100644 --- a/Pf2eDataScrapper/Migrations/20250418062358_Function.Designer.cs +++ b/Pf2eModel/Migrations/20250418062358_Function.Designer.cs @@ -5,12 +5,12 @@ using Microsoft.EntityFrameworkCore.Infrastructure; using Microsoft.EntityFrameworkCore.Migrations; using Microsoft.EntityFrameworkCore.Storage.ValueConversion; using Npgsql.EntityFrameworkCore.PostgreSQL.Metadata; -using Pf2eDataScrapper.Model; -using Pf2eDataScrapper.Model.Enum; +using Pf2eModel.Model; +using Pf2eModel.Model.Enum; #nullable disable -namespace Pf2eDataScrapper.Migrations +namespace Pf2eModel.Migrations { [DbContext(typeof(Pf2eDbContext))] [Migration("20250418062358_Function")] diff --git a/Pf2eDataScrapper/Migrations/20250418062358_Function.cs b/Pf2eModel/Migrations/20250418062358_Function.cs similarity index 97% rename from Pf2eDataScrapper/Migrations/20250418062358_Function.cs rename to Pf2eModel/Migrations/20250418062358_Function.cs index ea37ca1..871b905 100644 --- a/Pf2eDataScrapper/Migrations/20250418062358_Function.cs +++ b/Pf2eModel/Migrations/20250418062358_Function.cs @@ -2,7 +2,7 @@ #nullable disable -namespace Pf2eDataScrapper.Migrations +namespace Pf2eModel.Migrations { /// public partial class Function : Migration diff --git a/Pf2eDataScrapper/Model/Base/Entity.cs b/Pf2eModel/Model/Base/Entity.cs similarity index 88% rename from Pf2eDataScrapper/Model/Base/Entity.cs rename to Pf2eModel/Model/Base/Entity.cs index 1fd8c56..96980b0 100644 --- a/Pf2eDataScrapper/Model/Base/Entity.cs +++ b/Pf2eModel/Model/Base/Entity.cs @@ -1,13 +1,13 @@ using Microsoft.EntityFrameworkCore; -using Pf2eDataScrapper.Model.Base.Keywords; -using Pf2eDataScrapper.Model.Base.Source; -using Pf2eDataScrapper.Model.Base.Targets; -using Pf2eDataScrapper.Model.Enum; -using Pf2eDataScrapper.Model.Structure; +using Pf2eModel.Model.Base.Keywords; +using Pf2eModel.Model.Base.Source; +using Pf2eModel.Model.Base.Targets; +using Pf2eModel.Model.Enum; +using Pf2eModel.Model.Structure; using System.ComponentModel.DataAnnotations; using System.ComponentModel.DataAnnotations.Schema; -namespace Pf2eDataScrapper.Model.Base; +namespace Pf2eModel.Model.Base; public class Entity { diff --git a/Pf2eDataScrapper/Model/Base/EntityAlias.cs b/Pf2eModel/Model/Base/EntityAlias.cs similarity index 87% rename from Pf2eDataScrapper/Model/Base/EntityAlias.cs rename to Pf2eModel/Model/Base/EntityAlias.cs index 329fa7d..a2b06c1 100644 --- a/Pf2eDataScrapper/Model/Base/EntityAlias.cs +++ b/Pf2eModel/Model/Base/EntityAlias.cs @@ -1,9 +1,9 @@ using Microsoft.EntityFrameworkCore; -using Pf2eDataScrapper.Model.Enum; +using Pf2eModel.Model.Enum; using System.ComponentModel.DataAnnotations; using System.ComponentModel.DataAnnotations.Schema; -namespace Pf2eDataScrapper.Model.Base; +namespace Pf2eModel.Model.Base; [PrimaryKey(nameof(EntityId), nameof(Type))] public partial class EntityAlias diff --git a/Pf2eDataScrapper/Model/Base/Keywords/Keyword.cs b/Pf2eModel/Model/Base/Keywords/Keyword.cs similarity index 90% rename from Pf2eDataScrapper/Model/Base/Keywords/Keyword.cs rename to Pf2eModel/Model/Base/Keywords/Keyword.cs index 091f123..cdc9cc2 100644 --- a/Pf2eDataScrapper/Model/Base/Keywords/Keyword.cs +++ b/Pf2eModel/Model/Base/Keywords/Keyword.cs @@ -1,7 +1,7 @@ using System.ComponentModel.DataAnnotations; using System.ComponentModel.DataAnnotations.Schema; -namespace Pf2eDataScrapper.Model.Base.Keywords; +namespace Pf2eModel.Model.Base.Keywords; public partial class Keyword { diff --git a/Pf2eDataScrapper/Model/Base/Keywords/KeywordAlias.cs b/Pf2eModel/Model/Base/Keywords/KeywordAlias.cs similarity index 91% rename from Pf2eDataScrapper/Model/Base/Keywords/KeywordAlias.cs rename to Pf2eModel/Model/Base/Keywords/KeywordAlias.cs index 1f93afd..920f31f 100644 --- a/Pf2eDataScrapper/Model/Base/Keywords/KeywordAlias.cs +++ b/Pf2eModel/Model/Base/Keywords/KeywordAlias.cs @@ -1,7 +1,7 @@ using System.ComponentModel.DataAnnotations; using System.ComponentModel.DataAnnotations.Schema; -namespace Pf2eDataScrapper.Model.Base.Keywords; +namespace Pf2eModel.Model.Base.Keywords; public partial class KeywordAlias { diff --git a/Pf2eDataScrapper/Model/Base/Source/EntitySource.cs b/Pf2eModel/Model/Base/Source/EntitySource.cs similarity index 94% rename from Pf2eDataScrapper/Model/Base/Source/EntitySource.cs rename to Pf2eModel/Model/Base/Source/EntitySource.cs index c1e3322..26eb0ec 100644 --- a/Pf2eDataScrapper/Model/Base/Source/EntitySource.cs +++ b/Pf2eModel/Model/Base/Source/EntitySource.cs @@ -2,7 +2,7 @@ using System.ComponentModel.DataAnnotations; using System.ComponentModel.DataAnnotations.Schema; -namespace Pf2eDataScrapper.Model.Base.Source; +namespace Pf2eModel.Model.Base.Source; [PrimaryKey(nameof(EntityId), nameof(SourceId))] public partial class EntitySource diff --git a/Pf2eDataScrapper/Model/Base/Source/Source.cs b/Pf2eModel/Model/Base/Source/Source.cs similarity index 87% rename from Pf2eDataScrapper/Model/Base/Source/Source.cs rename to Pf2eModel/Model/Base/Source/Source.cs index 11ac3e5..a5c66cd 100644 --- a/Pf2eDataScrapper/Model/Base/Source/Source.cs +++ b/Pf2eModel/Model/Base/Source/Source.cs @@ -1,8 +1,8 @@ -using Pf2eDataScrapper.Model.Enum; +using Pf2eModel.Model.Enum; using System.ComponentModel.DataAnnotations; using System.ComponentModel.DataAnnotations.Schema; -namespace Pf2eDataScrapper.Model.Base.Source; +namespace Pf2eModel.Model.Base.Source; public partial class Source { diff --git a/Pf2eDataScrapper/Model/Base/Targets/EntityExternal.cs b/Pf2eModel/Model/Base/Targets/EntityExternal.cs similarity index 94% rename from Pf2eDataScrapper/Model/Base/Targets/EntityExternal.cs rename to Pf2eModel/Model/Base/Targets/EntityExternal.cs index 564ce36..58ffbbd 100644 --- a/Pf2eDataScrapper/Model/Base/Targets/EntityExternal.cs +++ b/Pf2eModel/Model/Base/Targets/EntityExternal.cs @@ -2,7 +2,7 @@ using System.ComponentModel.DataAnnotations; using System.ComponentModel.DataAnnotations.Schema; -namespace Pf2eDataScrapper.Model.Base.Targets; +namespace Pf2eModel.Model.Base.Targets; [PrimaryKey(nameof(EntityId), nameof(TargetId))] public partial class EntityExternal diff --git a/Pf2eDataScrapper/Model/Base/Targets/ExternalTarget.cs b/Pf2eModel/Model/Base/Targets/ExternalTarget.cs similarity index 93% rename from Pf2eDataScrapper/Model/Base/Targets/ExternalTarget.cs rename to Pf2eModel/Model/Base/Targets/ExternalTarget.cs index af24e30..17ec6cd 100644 --- a/Pf2eDataScrapper/Model/Base/Targets/ExternalTarget.cs +++ b/Pf2eModel/Model/Base/Targets/ExternalTarget.cs @@ -1,7 +1,7 @@ using System.ComponentModel.DataAnnotations; using System.ComponentModel.DataAnnotations.Schema; -namespace Pf2eDataScrapper.Model.Base.Targets; +namespace Pf2eModel.Model.Base.Targets; public partial class ExternalTarget { diff --git a/Pf2eDataScrapper/Model/Common/Frequency.cs b/Pf2eModel/Model/Common/Frequency.cs similarity index 91% rename from Pf2eDataScrapper/Model/Common/Frequency.cs rename to Pf2eModel/Model/Common/Frequency.cs index 439f7f1..876f7e9 100644 --- a/Pf2eDataScrapper/Model/Common/Frequency.cs +++ b/Pf2eModel/Model/Common/Frequency.cs @@ -1,7 +1,7 @@ using System.ComponentModel.DataAnnotations; using System.ComponentModel.DataAnnotations.Schema; -namespace Pf2eDataScrapper.Model.Common; +namespace Pf2eModel.Model.Common; public partial class Frequency { diff --git a/Pf2eDataScrapper/Model/Common/Language.cs b/Pf2eModel/Model/Common/Language.cs similarity index 88% rename from Pf2eDataScrapper/Model/Common/Language.cs rename to Pf2eModel/Model/Common/Language.cs index 3406711..198d246 100644 --- a/Pf2eDataScrapper/Model/Common/Language.cs +++ b/Pf2eModel/Model/Common/Language.cs @@ -1,8 +1,8 @@ -using Pf2eDataScrapper.Model.Enum; +using Pf2eModel.Model.Enum; using System.ComponentModel.DataAnnotations; using System.ComponentModel.DataAnnotations.Schema; -namespace Pf2eDataScrapper.Model.Common; +namespace Pf2eModel.Model.Common; public partial class Language { diff --git a/Pf2eDataScrapper/Model/Common/Training.cs b/Pf2eModel/Model/Common/Training.cs similarity index 90% rename from Pf2eDataScrapper/Model/Common/Training.cs rename to Pf2eModel/Model/Common/Training.cs index 773927d..9cc629e 100644 --- a/Pf2eDataScrapper/Model/Common/Training.cs +++ b/Pf2eModel/Model/Common/Training.cs @@ -1,7 +1,7 @@ using System.ComponentModel.DataAnnotations; using System.ComponentModel.DataAnnotations.Schema; -namespace Pf2eDataScrapper.Model.Common; +namespace Pf2eModel.Model.Common; public partial class Training { diff --git a/Pf2eDataScrapper/Model/Enum/ActionCategory.cs b/Pf2eModel/Model/Enum/ActionCategory.cs similarity index 92% rename from Pf2eDataScrapper/Model/Enum/ActionCategory.cs rename to Pf2eModel/Model/Enum/ActionCategory.cs index b4e8951..60a5bf3 100644 --- a/Pf2eDataScrapper/Model/Enum/ActionCategory.cs +++ b/Pf2eModel/Model/Enum/ActionCategory.cs @@ -1,6 +1,6 @@ using NpgsqlTypes; -namespace Pf2eDataScrapper.Model.Enum; +namespace Pf2eModel.Model.Enum; public enum ActionCategory { diff --git a/Pf2eModel/Model/Enum/ActionType.cs b/Pf2eModel/Model/Enum/ActionType.cs new file mode 100644 index 0000000..0f5e845 --- /dev/null +++ b/Pf2eModel/Model/Enum/ActionType.cs @@ -0,0 +1,24 @@ +using NpgsqlTypes; + +namespace Pf2eModel.Model.Enum; + +public enum ActionType +{ + [PgName("none")] + None, + + [PgName("1_action")] + SingleAction, + + [PgName("2_actions")] + TwoActions, + + [PgName("3_actions")] + ThreeActions, + + [PgName("1-3_actions")] + SingleToThreeActions, + + [PgName("1-2_actions")] + SingleToTwoActions, +} \ No newline at end of file diff --git a/Pf2eDataScrapper/Model/Enum/AliasType.cs b/Pf2eModel/Model/Enum/AliasType.cs similarity index 86% rename from Pf2eDataScrapper/Model/Enum/AliasType.cs rename to Pf2eModel/Model/Enum/AliasType.cs index 260d2df..b947c77 100644 --- a/Pf2eDataScrapper/Model/Enum/AliasType.cs +++ b/Pf2eModel/Model/Enum/AliasType.cs @@ -1,6 +1,6 @@ using NpgsqlTypes; -namespace Pf2eDataScrapper.Model.Enum; +namespace Pf2eModel.Model.Enum; public enum AliasType { diff --git a/Pf2eDataScrapper/Model/Enum/AncestryVision.cs b/Pf2eModel/Model/Enum/AncestryVision.cs similarity index 82% rename from Pf2eDataScrapper/Model/Enum/AncestryVision.cs rename to Pf2eModel/Model/Enum/AncestryVision.cs index d6b844d..414ddd1 100644 --- a/Pf2eDataScrapper/Model/Enum/AncestryVision.cs +++ b/Pf2eModel/Model/Enum/AncestryVision.cs @@ -1,6 +1,6 @@ using NpgsqlTypes; -namespace Pf2eDataScrapper.Model.Enum; +namespace Pf2eModel.Model.Enum; public enum AncestryVision { diff --git a/Pf2eDataScrapper/Model/Enum/AttributeValues.cs b/Pf2eModel/Model/Enum/AttributeValues.cs similarity index 88% rename from Pf2eDataScrapper/Model/Enum/AttributeValues.cs rename to Pf2eModel/Model/Enum/AttributeValues.cs index bde92ac..eade520 100644 --- a/Pf2eDataScrapper/Model/Enum/AttributeValues.cs +++ b/Pf2eModel/Model/Enum/AttributeValues.cs @@ -1,6 +1,6 @@ using NpgsqlTypes; -namespace Pf2eDataScrapper.Model.Enum; +namespace Pf2eModel.Model.Enum; public enum AttributeValues { diff --git a/Pf2eDataScrapper/Model/Enum/ClassProgressionType.cs b/Pf2eModel/Model/Enum/ClassProgressionType.cs similarity index 89% rename from Pf2eDataScrapper/Model/Enum/ClassProgressionType.cs rename to Pf2eModel/Model/Enum/ClassProgressionType.cs index 433e9a7..23b6a5b 100644 --- a/Pf2eDataScrapper/Model/Enum/ClassProgressionType.cs +++ b/Pf2eModel/Model/Enum/ClassProgressionType.cs @@ -1,6 +1,6 @@ using NpgsqlTypes; -namespace Pf2eDataScrapper.Model.Enum; +namespace Pf2eModel.Model.Enum; public enum ClassProgressionType { diff --git a/Pf2eDataScrapper/Model/Enum/ConditionGroup.cs b/Pf2eModel/Model/Enum/ConditionGroup.cs similarity index 87% rename from Pf2eDataScrapper/Model/Enum/ConditionGroup.cs rename to Pf2eModel/Model/Enum/ConditionGroup.cs index d0935a3..7311fed 100644 --- a/Pf2eDataScrapper/Model/Enum/ConditionGroup.cs +++ b/Pf2eModel/Model/Enum/ConditionGroup.cs @@ -1,6 +1,6 @@ using NpgsqlTypes; -namespace Pf2eDataScrapper.Model.Enum; +namespace Pf2eModel.Model.Enum; public enum ConditionGroup diff --git a/Pf2eDataScrapper/Model/Enum/DeityCategory.cs b/Pf2eModel/Model/Enum/DeityCategory.cs similarity index 84% rename from Pf2eDataScrapper/Model/Enum/DeityCategory.cs rename to Pf2eModel/Model/Enum/DeityCategory.cs index e8c762e..a94887a 100644 --- a/Pf2eDataScrapper/Model/Enum/DeityCategory.cs +++ b/Pf2eModel/Model/Enum/DeityCategory.cs @@ -1,6 +1,6 @@ using NpgsqlTypes; -namespace Pf2eDataScrapper.Model.Enum; +namespace Pf2eModel.Model.Enum; public enum DeityCategory { diff --git a/Pf2eDataScrapper/Model/Enum/DeityFonts.cs b/Pf2eModel/Model/Enum/DeityFonts.cs similarity index 81% rename from Pf2eDataScrapper/Model/Enum/DeityFonts.cs rename to Pf2eModel/Model/Enum/DeityFonts.cs index fe9ecbf..09cf5d8 100644 --- a/Pf2eDataScrapper/Model/Enum/DeityFonts.cs +++ b/Pf2eModel/Model/Enum/DeityFonts.cs @@ -1,6 +1,6 @@ using NpgsqlTypes; -namespace Pf2eDataScrapper.Model.Enum; +namespace Pf2eModel.Model.Enum; public enum DeityFonts { diff --git a/Pf2eDataScrapper/Model/Enum/DeitySanctification.cs b/Pf2eModel/Model/Enum/DeitySanctification.cs similarity index 79% rename from Pf2eDataScrapper/Model/Enum/DeitySanctification.cs rename to Pf2eModel/Model/Enum/DeitySanctification.cs index 7689838..bf105bd 100644 --- a/Pf2eDataScrapper/Model/Enum/DeitySanctification.cs +++ b/Pf2eModel/Model/Enum/DeitySanctification.cs @@ -1,6 +1,6 @@ using NpgsqlTypes; -namespace Pf2eDataScrapper.Model.Enum; +namespace Pf2eModel.Model.Enum; public enum DeitySanctification { diff --git a/Pf2eDataScrapper/Model/Enum/EntityRarity.cs b/Pf2eModel/Model/Enum/EntityRarity.cs similarity index 83% rename from Pf2eDataScrapper/Model/Enum/EntityRarity.cs rename to Pf2eModel/Model/Enum/EntityRarity.cs index 49209e4..91384ca 100644 --- a/Pf2eDataScrapper/Model/Enum/EntityRarity.cs +++ b/Pf2eModel/Model/Enum/EntityRarity.cs @@ -1,6 +1,6 @@ using NpgsqlTypes; -namespace Pf2eDataScrapper.Model.Enum; +namespace Pf2eModel.Model.Enum; public enum EntityRarity { diff --git a/Pf2eDataScrapper/Model/Enum/EntityType.cs b/Pf2eModel/Model/Enum/EntityType.cs similarity index 93% rename from Pf2eDataScrapper/Model/Enum/EntityType.cs rename to Pf2eModel/Model/Enum/EntityType.cs index 3219a3e..59a37e7 100644 --- a/Pf2eDataScrapper/Model/Enum/EntityType.cs +++ b/Pf2eModel/Model/Enum/EntityType.cs @@ -1,6 +1,6 @@ using NpgsqlTypes; -namespace Pf2eDataScrapper.Model.Enum; +namespace Pf2eModel.Model.Enum; public enum EntityType { diff --git a/Pf2eDataScrapper/Model/Enum/FeatActionType.cs b/Pf2eModel/Model/Enum/FeatActionType.cs similarity index 83% rename from Pf2eDataScrapper/Model/Enum/FeatActionType.cs rename to Pf2eModel/Model/Enum/FeatActionType.cs index 0a37277..e5b84b0 100644 --- a/Pf2eDataScrapper/Model/Enum/FeatActionType.cs +++ b/Pf2eModel/Model/Enum/FeatActionType.cs @@ -1,6 +1,6 @@ using NpgsqlTypes; -namespace Pf2eDataScrapper.Model.Enum; +namespace Pf2eModel.Model.Enum; public enum FeatActionType { diff --git a/Pf2eDataScrapper/Model/Enum/FeatCategory.cs b/Pf2eModel/Model/Enum/FeatCategory.cs similarity index 93% rename from Pf2eDataScrapper/Model/Enum/FeatCategory.cs rename to Pf2eModel/Model/Enum/FeatCategory.cs index 73b7689..3923e82 100644 --- a/Pf2eDataScrapper/Model/Enum/FeatCategory.cs +++ b/Pf2eModel/Model/Enum/FeatCategory.cs @@ -1,6 +1,6 @@ using NpgsqlTypes; -namespace Pf2eDataScrapper.Model.Enum; +namespace Pf2eModel.Model.Enum; public enum FeatCategory { diff --git a/Pf2eDataScrapper/Model/Enum/Size.cs b/Pf2eModel/Model/Enum/Size.cs similarity index 72% rename from Pf2eDataScrapper/Model/Enum/Size.cs rename to Pf2eModel/Model/Enum/Size.cs index 1aa4952..dfda57e 100644 --- a/Pf2eDataScrapper/Model/Enum/Size.cs +++ b/Pf2eModel/Model/Enum/Size.cs @@ -1,6 +1,6 @@ using NpgsqlTypes; -namespace Pf2eDataScrapper.Model.Enum; +namespace Pf2eModel.Model.Enum; public enum Size { diff --git a/Pf2eDataScrapper/Model/Enum/SourceCategory.cs b/Pf2eModel/Model/Enum/SourceCategory.cs similarity index 52% rename from Pf2eDataScrapper/Model/Enum/SourceCategory.cs rename to Pf2eModel/Model/Enum/SourceCategory.cs index 1d5ca5b..ac858ff 100644 --- a/Pf2eDataScrapper/Model/Enum/SourceCategory.cs +++ b/Pf2eModel/Model/Enum/SourceCategory.cs @@ -1,34 +1,26 @@ using NpgsqlTypes; -using Pf2eDataScrapper.Importers.Implementations.Aonprd.DataBuilder; -namespace Pf2eDataScrapper.Model.Enum; +namespace Pf2eModel.Model.Enum; public enum SourceCategory { [PgName("rulebook")] - [AonprdEnum("Rulebooks")] Rulebooks, [PgName("adventure-path")] - [AonprdEnum("Adventure Paths")] AdventurePaths, [PgName("lost-omens")] - [AonprdEnum("Lost Omens")] LostOmens, [PgName("adventures")] - [AonprdEnum("Adventures")] Adventures, [PgName("comics")] - [AonprdEnum("Comics")] Comics, [PgName("blog-posts")] - [AonprdEnum("Blog Posts")] BlogPosts, [PgName("society")] - [AonprdEnum("Society")] Society, } diff --git a/Pf2eDataScrapper/Model/Enum/SpellAreaType.cs b/Pf2eModel/Model/Enum/SpellAreaType.cs similarity index 88% rename from Pf2eDataScrapper/Model/Enum/SpellAreaType.cs rename to Pf2eModel/Model/Enum/SpellAreaType.cs index e057d35..e6d9150 100644 --- a/Pf2eDataScrapper/Model/Enum/SpellAreaType.cs +++ b/Pf2eModel/Model/Enum/SpellAreaType.cs @@ -1,6 +1,6 @@ using NpgsqlTypes; -namespace Pf2eDataScrapper.Model.Enum; +namespace Pf2eModel.Model.Enum; public enum SpellAreaType { diff --git a/Pf2eDataScrapper/Model/Enum/SpellDamageCategory.cs b/Pf2eModel/Model/Enum/SpellDamageCategory.cs similarity index 77% rename from Pf2eDataScrapper/Model/Enum/SpellDamageCategory.cs rename to Pf2eModel/Model/Enum/SpellDamageCategory.cs index b7e14b3..45b02b9 100644 --- a/Pf2eDataScrapper/Model/Enum/SpellDamageCategory.cs +++ b/Pf2eModel/Model/Enum/SpellDamageCategory.cs @@ -1,6 +1,6 @@ using NpgsqlTypes; -namespace Pf2eDataScrapper.Model.Enum; +namespace Pf2eModel.Model.Enum; public enum SpellDamageCategory { diff --git a/Pf2eDataScrapper/Model/Enum/SpellDamageKinds.cs b/Pf2eModel/Model/Enum/SpellDamageKinds.cs similarity index 79% rename from Pf2eDataScrapper/Model/Enum/SpellDamageKinds.cs rename to Pf2eModel/Model/Enum/SpellDamageKinds.cs index 1de47cb..237bc23 100644 --- a/Pf2eDataScrapper/Model/Enum/SpellDamageKinds.cs +++ b/Pf2eModel/Model/Enum/SpellDamageKinds.cs @@ -1,6 +1,6 @@ using NpgsqlTypes; -namespace Pf2eDataScrapper.Model.Enum; +namespace Pf2eModel.Model.Enum; public enum SpellDamageKinds { diff --git a/Pf2eDataScrapper/Model/Enum/TrainingStage.cs b/Pf2eModel/Model/Enum/TrainingStage.cs similarity index 74% rename from Pf2eDataScrapper/Model/Enum/TrainingStage.cs rename to Pf2eModel/Model/Enum/TrainingStage.cs index 407e035..dc40271 100644 --- a/Pf2eDataScrapper/Model/Enum/TrainingStage.cs +++ b/Pf2eModel/Model/Enum/TrainingStage.cs @@ -1,4 +1,4 @@ -namespace Pf2eDataScrapper.Model.Enum; +namespace Pf2eModel.Model.Enum; public enum TrainingStage { Untrained = 0, diff --git a/Pf2eDataScrapper/Model/Enum/TraitType.cs b/Pf2eModel/Model/Enum/TraitType.cs similarity index 76% rename from Pf2eDataScrapper/Model/Enum/TraitType.cs rename to Pf2eModel/Model/Enum/TraitType.cs index 2368b79..0d71477 100644 --- a/Pf2eDataScrapper/Model/Enum/TraitType.cs +++ b/Pf2eModel/Model/Enum/TraitType.cs @@ -1,6 +1,6 @@ using NpgsqlTypes; -namespace Pf2eDataScrapper.Model.Enum; +namespace Pf2eModel.Model.Enum; public enum TraitType { diff --git a/Pf2eModel/Model/IEntity.cs b/Pf2eModel/Model/IEntity.cs new file mode 100644 index 0000000..863bbf7 --- /dev/null +++ b/Pf2eModel/Model/IEntity.cs @@ -0,0 +1,11 @@ +using Pf2eModel.Model.Base; + +namespace Pf2eModel.Model; + +public interface IEntity +{ + public int Id { get; set; } + + public Entity Entity { get; set; } + +} diff --git a/Pf2eDataScrapper/Model/Pf2eDbContext.cs b/Pf2eModel/Model/Pf2eDbContext.cs similarity index 84% rename from Pf2eDataScrapper/Model/Pf2eDbContext.cs rename to Pf2eModel/Model/Pf2eDbContext.cs index 141c483..012d761 100644 --- a/Pf2eDataScrapper/Model/Pf2eDbContext.cs +++ b/Pf2eModel/Model/Pf2eDbContext.cs @@ -1,19 +1,21 @@ -using Microsoft.EntityFrameworkCore; -using Pf2eDataScrapper.Model.Base; -using Pf2eDataScrapper.Model.Base.Keywords; -using Pf2eDataScrapper.Model.Base.Source; -using Pf2eDataScrapper.Model.Base.Targets; -using Pf2eDataScrapper.Model.Common; -using Pf2eDataScrapper.Model.Enum; -using Pf2eDataScrapper.Model.Structure; -using Pf2eDataScrapper.Model.Structure.AncestryRelation; -using Pf2eDataScrapper.Model.Structure.BackgroundRelation; -using Pf2eDataScrapper.Model.Structure.ClassRelation; -using Pf2eDataScrapper.Model.Structure.DeityRelation; -using Pf2eDataScrapper.Model.Structure.FeatRelation; -using Pf2eDataScrapper.Model.Structure.SpellRelation; +using dotenv.net; +using dotenv.net.Utilities; +using Microsoft.EntityFrameworkCore; +using Pf2eModel.Model.Base; +using Pf2eModel.Model.Base.Keywords; +using Pf2eModel.Model.Base.Source; +using Pf2eModel.Model.Base.Targets; +using Pf2eModel.Model.Common; +using Pf2eModel.Model.Enum; +using Pf2eModel.Model.Structure; +using Pf2eModel.Model.Structure.AncestryRelation; +using Pf2eModel.Model.Structure.BackgroundRelation; +using Pf2eModel.Model.Structure.ClassRelation; +using Pf2eModel.Model.Structure.DeityRelation; +using Pf2eModel.Model.Structure.FeatRelation; +using Pf2eModel.Model.Structure.SpellRelation; -namespace Pf2eDataScrapper.Model; +namespace Pf2eModel.Model; public partial class Pf2eDbContext : DbContext { @@ -110,10 +112,11 @@ public partial class Pf2eDbContext : DbContext protected override void OnConfiguring(DbContextOptionsBuilder optionsBuilder) { - EnvSettings.Load(); + DotEnv.Load(); + // optionsBuilder.LogTo(Console.WriteLine); optionsBuilder.UseSnakeCaseNamingConvention(); - optionsBuilder.UseNpgsql(EnvSettings.DatabaseConnection, + optionsBuilder.UseNpgsql(EnvReader.GetStringValue("DATABASE_CONNECTION"), builder => { builder diff --git a/Pf2eDataScrapper/Model/Pf2eDbContextModel.cs b/Pf2eModel/Model/Pf2eDbContextModel.cs similarity index 95% rename from Pf2eDataScrapper/Model/Pf2eDbContextModel.cs rename to Pf2eModel/Model/Pf2eDbContextModel.cs index afdf0f8..2224c2a 100644 --- a/Pf2eDataScrapper/Model/Pf2eDbContextModel.cs +++ b/Pf2eModel/Model/Pf2eDbContextModel.cs @@ -1,22 +1,22 @@ using LinqToDB.Common; using Microsoft.EntityFrameworkCore; using Microsoft.EntityFrameworkCore.Metadata.Builders; -using Pf2eDataScrapper.Model.Base; -using Pf2eDataScrapper.Model.Base.Keywords; -using Pf2eDataScrapper.Model.Base.Source; -using Pf2eDataScrapper.Model.Base.Targets; -using Pf2eDataScrapper.Model.Common; -using Pf2eDataScrapper.Model.Enum; -using Pf2eDataScrapper.Model.Structure; -using Pf2eDataScrapper.Model.Structure.AncestryRelation; -using Pf2eDataScrapper.Model.Structure.BackgroundRelation; -using Pf2eDataScrapper.Model.Structure.ClassRelation; -using Pf2eDataScrapper.Model.Structure.DeityRelation; -using Pf2eDataScrapper.Model.Structure.FeatRelation; -using Pf2eDataScrapper.Model.Structure.SpellRelation; +using Pf2eModel.Model.Base; +using Pf2eModel.Model.Base.Keywords; +using Pf2eModel.Model.Base.Source; +using Pf2eModel.Model.Base.Targets; +using Pf2eModel.Model.Common; +using Pf2eModel.Model.Enum; +using Pf2eModel.Model.Structure; +using Pf2eModel.Model.Structure.AncestryRelation; +using Pf2eModel.Model.Structure.BackgroundRelation; +using Pf2eModel.Model.Structure.ClassRelation; +using Pf2eModel.Model.Structure.DeityRelation; +using Pf2eModel.Model.Structure.FeatRelation; +using Pf2eModel.Model.Structure.SpellRelation; using System.Reflection; -namespace Pf2eDataScrapper.Model; +namespace Pf2eModel.Model; public partial class Pf2eDbContext { diff --git a/Pf2eDataScrapper/Model/Structure/Action.cs b/Pf2eModel/Model/Structure/Action.cs similarity index 87% rename from Pf2eDataScrapper/Model/Structure/Action.cs rename to Pf2eModel/Model/Structure/Action.cs index 8815a06..afebe40 100644 --- a/Pf2eDataScrapper/Model/Structure/Action.cs +++ b/Pf2eModel/Model/Structure/Action.cs @@ -1,8 +1,8 @@ -using Pf2eDataScrapper.Model.Base; -using Pf2eDataScrapper.Model.Enum; +using Pf2eModel.Model.Base; +using Pf2eModel.Model.Enum; using System.ComponentModel.DataAnnotations.Schema; -namespace Pf2eDataScrapper.Model.Structure; +namespace Pf2eModel.Model.Structure; public partial class Action : IEntity { diff --git a/Pf2eDataScrapper/Model/Structure/Ancestry.cs b/Pf2eModel/Model/Structure/Ancestry.cs similarity index 84% rename from Pf2eDataScrapper/Model/Structure/Ancestry.cs rename to Pf2eModel/Model/Structure/Ancestry.cs index 4555c88..40544be 100644 --- a/Pf2eDataScrapper/Model/Structure/Ancestry.cs +++ b/Pf2eModel/Model/Structure/Ancestry.cs @@ -1,9 +1,9 @@ -using Pf2eDataScrapper.Model.Base; -using Pf2eDataScrapper.Model.Enum; -using Pf2eDataScrapper.Model.Structure.AncestryRelation; +using Pf2eModel.Model.Base; +using Pf2eModel.Model.Enum; +using Pf2eModel.Model.Structure.AncestryRelation; using System.ComponentModel.DataAnnotations.Schema; -namespace Pf2eDataScrapper.Model.Structure; +namespace Pf2eModel.Model.Structure; public partial class Ancestry : IEntity { diff --git a/Pf2eDataScrapper/Model/Structure/AncestryRelation/AncestryBoost.cs b/Pf2eModel/Model/Structure/AncestryRelation/AncestryBoost.cs similarity index 89% rename from Pf2eDataScrapper/Model/Structure/AncestryRelation/AncestryBoost.cs rename to Pf2eModel/Model/Structure/AncestryRelation/AncestryBoost.cs index 1f16e8e..71699fd 100644 --- a/Pf2eDataScrapper/Model/Structure/AncestryRelation/AncestryBoost.cs +++ b/Pf2eModel/Model/Structure/AncestryRelation/AncestryBoost.cs @@ -1,7 +1,7 @@ using System.ComponentModel.DataAnnotations; using System.ComponentModel.DataAnnotations.Schema; -namespace Pf2eDataScrapper.Model.Structure.AncestryRelation; +namespace Pf2eModel.Model.Structure.AncestryRelation; public partial class AncestryBoost { diff --git a/Pf2eDataScrapper/Model/Structure/AncestryRelation/AncestryItem.cs b/Pf2eModel/Model/Structure/AncestryRelation/AncestryItem.cs similarity index 83% rename from Pf2eDataScrapper/Model/Structure/AncestryRelation/AncestryItem.cs rename to Pf2eModel/Model/Structure/AncestryRelation/AncestryItem.cs index 2fb4616..1f456cc 100644 --- a/Pf2eDataScrapper/Model/Structure/AncestryRelation/AncestryItem.cs +++ b/Pf2eModel/Model/Structure/AncestryRelation/AncestryItem.cs @@ -1,8 +1,8 @@ using Microsoft.EntityFrameworkCore; -using Pf2eDataScrapper.Model.Base; +using Pf2eModel.Model.Base; using System.ComponentModel.DataAnnotations.Schema; -namespace Pf2eDataScrapper.Model.Structure.AncestryRelation; +namespace Pf2eModel.Model.Structure.AncestryRelation; [PrimaryKey(nameof(AncestryId), nameof(ItemId))] public partial class AncestryItem diff --git a/Pf2eDataScrapper/Model/Structure/AncestryRelation/AncestryLanguage.cs b/Pf2eModel/Model/Structure/AncestryRelation/AncestryLanguage.cs similarity index 83% rename from Pf2eDataScrapper/Model/Structure/AncestryRelation/AncestryLanguage.cs rename to Pf2eModel/Model/Structure/AncestryRelation/AncestryLanguage.cs index fbfbd00..8f3f518 100644 --- a/Pf2eDataScrapper/Model/Structure/AncestryRelation/AncestryLanguage.cs +++ b/Pf2eModel/Model/Structure/AncestryRelation/AncestryLanguage.cs @@ -1,8 +1,8 @@ using Microsoft.EntityFrameworkCore; -using Pf2eDataScrapper.Model.Common; +using Pf2eModel.Model.Common; using System.ComponentModel.DataAnnotations.Schema; -namespace Pf2eDataScrapper.Model.Structure.AncestryRelation; +namespace Pf2eModel.Model.Structure.AncestryRelation; [PrimaryKey(nameof(AncestryId), nameof(LanguageId))] public partial class AncestryLanguage diff --git a/Pf2eDataScrapper/Model/Structure/Background.cs b/Pf2eModel/Model/Structure/Background.cs similarity index 80% rename from Pf2eDataScrapper/Model/Structure/Background.cs rename to Pf2eModel/Model/Structure/Background.cs index 85db81c..04be35f 100644 --- a/Pf2eDataScrapper/Model/Structure/Background.cs +++ b/Pf2eModel/Model/Structure/Background.cs @@ -1,9 +1,9 @@ -using Pf2eDataScrapper.Model.Base; -using Pf2eDataScrapper.Model.Structure.BackgroundRelation; +using Pf2eModel.Model.Base; +using Pf2eModel.Model.Structure.BackgroundRelation; using System.ComponentModel.DataAnnotations; using System.ComponentModel.DataAnnotations.Schema; -namespace Pf2eDataScrapper.Model.Structure; +namespace Pf2eModel.Model.Structure; public partial class Background : IEntity { diff --git a/Pf2eDataScrapper/Model/Structure/BackgroundRelation/BackgroundBoost.cs b/Pf2eModel/Model/Structure/BackgroundRelation/BackgroundBoost.cs similarity index 82% rename from Pf2eDataScrapper/Model/Structure/BackgroundRelation/BackgroundBoost.cs rename to Pf2eModel/Model/Structure/BackgroundRelation/BackgroundBoost.cs index 0bfce65..7f81f3c 100644 --- a/Pf2eDataScrapper/Model/Structure/BackgroundRelation/BackgroundBoost.cs +++ b/Pf2eModel/Model/Structure/BackgroundRelation/BackgroundBoost.cs @@ -1,8 +1,8 @@ -using Pf2eDataScrapper.Model.Enum; +using Pf2eModel.Model.Enum; using System.ComponentModel.DataAnnotations; using System.ComponentModel.DataAnnotations.Schema; -namespace Pf2eDataScrapper.Model.Structure.BackgroundRelation; +namespace Pf2eModel.Model.Structure.BackgroundRelation; public partial class BackgroundBoost { diff --git a/Pf2eDataScrapper/Model/Structure/BackgroundRelation/BackgroundItem.cs b/Pf2eModel/Model/Structure/BackgroundRelation/BackgroundItem.cs similarity index 83% rename from Pf2eDataScrapper/Model/Structure/BackgroundRelation/BackgroundItem.cs rename to Pf2eModel/Model/Structure/BackgroundRelation/BackgroundItem.cs index 5002f3f..161a15b 100644 --- a/Pf2eDataScrapper/Model/Structure/BackgroundRelation/BackgroundItem.cs +++ b/Pf2eModel/Model/Structure/BackgroundRelation/BackgroundItem.cs @@ -1,8 +1,8 @@ using Microsoft.EntityFrameworkCore; -using Pf2eDataScrapper.Model.Base; +using Pf2eModel.Model.Base; using System.ComponentModel.DataAnnotations.Schema; -namespace Pf2eDataScrapper.Model.Structure.BackgroundRelation; +namespace Pf2eModel.Model.Structure.BackgroundRelation; [PrimaryKey(nameof(BackgroundId), nameof(EntityId))] public partial class BackgroundItem diff --git a/Pf2eDataScrapper/Model/Structure/BackgroundRelation/BackgroundTraining.cs b/Pf2eModel/Model/Structure/BackgroundRelation/BackgroundTraining.cs similarity index 81% rename from Pf2eDataScrapper/Model/Structure/BackgroundRelation/BackgroundTraining.cs rename to Pf2eModel/Model/Structure/BackgroundRelation/BackgroundTraining.cs index e12f0cd..bf77009 100644 --- a/Pf2eDataScrapper/Model/Structure/BackgroundRelation/BackgroundTraining.cs +++ b/Pf2eModel/Model/Structure/BackgroundRelation/BackgroundTraining.cs @@ -1,9 +1,9 @@ -using Pf2eDataScrapper.Model.Common; -using Pf2eDataScrapper.Model.Enum; +using Pf2eModel.Model.Common; +using Pf2eModel.Model.Enum; using System.ComponentModel.DataAnnotations; using System.ComponentModel.DataAnnotations.Schema; -namespace Pf2eDataScrapper.Model.Structure.BackgroundRelation; +namespace Pf2eModel.Model.Structure.BackgroundRelation; public partial class BackgroundTraining { diff --git a/Pf2eDataScrapper/Model/Structure/Class.cs b/Pf2eModel/Model/Structure/Class.cs similarity index 85% rename from Pf2eDataScrapper/Model/Structure/Class.cs rename to Pf2eModel/Model/Structure/Class.cs index 5035834..458ff5a 100644 --- a/Pf2eDataScrapper/Model/Structure/Class.cs +++ b/Pf2eModel/Model/Structure/Class.cs @@ -1,9 +1,9 @@ -using Pf2eDataScrapper.Model.Base; -using Pf2eDataScrapper.Model.Structure.ClassRelation; +using Pf2eModel.Model.Base; +using Pf2eModel.Model.Structure.ClassRelation; using System.ComponentModel.DataAnnotations; using System.ComponentModel.DataAnnotations.Schema; -namespace Pf2eDataScrapper.Model.Structure; +namespace Pf2eModel.Model.Structure; public partial class Class : IEntity { diff --git a/Pf2eDataScrapper/Model/Structure/ClassRelation/ClassKeyAbility.cs b/Pf2eModel/Model/Structure/ClassRelation/ClassKeyAbility.cs similarity index 82% rename from Pf2eDataScrapper/Model/Structure/ClassRelation/ClassKeyAbility.cs rename to Pf2eModel/Model/Structure/ClassRelation/ClassKeyAbility.cs index 0c7ed92..5f4ad43 100644 --- a/Pf2eDataScrapper/Model/Structure/ClassRelation/ClassKeyAbility.cs +++ b/Pf2eModel/Model/Structure/ClassRelation/ClassKeyAbility.cs @@ -1,8 +1,8 @@ -using Pf2eDataScrapper.Model.Enum; +using Pf2eModel.Model.Enum; using System.ComponentModel.DataAnnotations; using System.ComponentModel.DataAnnotations.Schema; -namespace Pf2eDataScrapper.Model.Structure.ClassRelation; +namespace Pf2eModel.Model.Structure.ClassRelation; public partial class ClassKeyAbility { diff --git a/Pf2eDataScrapper/Model/Structure/ClassRelation/ClassProgression.cs b/Pf2eModel/Model/Structure/ClassRelation/ClassProgression.cs similarity index 82% rename from Pf2eDataScrapper/Model/Structure/ClassRelation/ClassProgression.cs rename to Pf2eModel/Model/Structure/ClassRelation/ClassProgression.cs index 5db01d2..24b40a1 100644 --- a/Pf2eDataScrapper/Model/Structure/ClassRelation/ClassProgression.cs +++ b/Pf2eModel/Model/Structure/ClassRelation/ClassProgression.cs @@ -1,9 +1,9 @@ -using Pf2eDataScrapper.Model.Base; -using Pf2eDataScrapper.Model.Enum; +using Pf2eModel.Model.Base; +using Pf2eModel.Model.Enum; using System.ComponentModel.DataAnnotations; using System.ComponentModel.DataAnnotations.Schema; -namespace Pf2eDataScrapper.Model.Structure.ClassRelation; +namespace Pf2eModel.Model.Structure.ClassRelation; public partial class ClassProgression { [Key] diff --git a/Pf2eDataScrapper/Model/Structure/ClassRelation/ClassTraining.cs b/Pf2eModel/Model/Structure/ClassRelation/ClassTraining.cs similarity index 87% rename from Pf2eDataScrapper/Model/Structure/ClassRelation/ClassTraining.cs rename to Pf2eModel/Model/Structure/ClassRelation/ClassTraining.cs index b659089..e0aa598 100644 --- a/Pf2eDataScrapper/Model/Structure/ClassRelation/ClassTraining.cs +++ b/Pf2eModel/Model/Structure/ClassRelation/ClassTraining.cs @@ -1,8 +1,8 @@ -using Pf2eDataScrapper.Model.Common; +using Pf2eModel.Model.Common; using System.ComponentModel.DataAnnotations; using System.ComponentModel.DataAnnotations.Schema; -namespace Pf2eDataScrapper.Model.Structure.ClassRelation; +namespace Pf2eModel.Model.Structure.ClassRelation; public partial class ClassTraining { diff --git a/Pf2eDataScrapper/Model/Structure/Condition.cs b/Pf2eModel/Model/Structure/Condition.cs similarity index 79% rename from Pf2eDataScrapper/Model/Structure/Condition.cs rename to Pf2eModel/Model/Structure/Condition.cs index 51ee3e9..a9a3954 100644 --- a/Pf2eDataScrapper/Model/Structure/Condition.cs +++ b/Pf2eModel/Model/Structure/Condition.cs @@ -1,9 +1,9 @@ -using Pf2eDataScrapper.Model.Base; -using Pf2eDataScrapper.Model.Enum; +using Pf2eModel.Model.Base; +using Pf2eModel.Model.Enum; using System.ComponentModel.DataAnnotations; using System.ComponentModel.DataAnnotations.Schema; -namespace Pf2eDataScrapper.Model.Structure; +namespace Pf2eModel.Model.Structure; public partial class Condition : IEntity { diff --git a/Pf2eDataScrapper/Model/Structure/Deity.cs b/Pf2eModel/Model/Structure/Deity.cs similarity index 84% rename from Pf2eDataScrapper/Model/Structure/Deity.cs rename to Pf2eModel/Model/Structure/Deity.cs index 825cc1f..c58d955 100644 --- a/Pf2eDataScrapper/Model/Structure/Deity.cs +++ b/Pf2eModel/Model/Structure/Deity.cs @@ -1,11 +1,11 @@ -using Pf2eDataScrapper.Model.Base; -using Pf2eDataScrapper.Model.Common; -using Pf2eDataScrapper.Model.Enum; -using Pf2eDataScrapper.Model.Structure.DeityRelation; +using Pf2eModel.Model.Base; +using Pf2eModel.Model.Common; +using Pf2eModel.Model.Enum; +using Pf2eModel.Model.Structure.DeityRelation; using System.ComponentModel.DataAnnotations; using System.ComponentModel.DataAnnotations.Schema; -namespace Pf2eDataScrapper.Model.Structure; +namespace Pf2eModel.Model.Structure; public partial class Deity : IEntity { diff --git a/Pf2eDataScrapper/Model/Structure/DeityRelation/DeityAttribute.cs b/Pf2eModel/Model/Structure/DeityRelation/DeityAttribute.cs similarity index 80% rename from Pf2eDataScrapper/Model/Structure/DeityRelation/DeityAttribute.cs rename to Pf2eModel/Model/Structure/DeityRelation/DeityAttribute.cs index 16f1351..616c653 100644 --- a/Pf2eDataScrapper/Model/Structure/DeityRelation/DeityAttribute.cs +++ b/Pf2eModel/Model/Structure/DeityRelation/DeityAttribute.cs @@ -1,8 +1,8 @@ using Microsoft.EntityFrameworkCore; -using Pf2eDataScrapper.Model.Enum; +using Pf2eModel.Model.Enum; using System.ComponentModel.DataAnnotations.Schema; -namespace Pf2eDataScrapper.Model.Structure.DeityRelation; +namespace Pf2eModel.Model.Structure.DeityRelation; [PrimaryKey(nameof(DeityId), nameof(Attribute))] public partial class DeityAttribute diff --git a/Pf2eDataScrapper/Model/Structure/DeityRelation/DeityDomain.cs b/Pf2eModel/Model/Structure/DeityRelation/DeityDomain.cs similarity index 90% rename from Pf2eDataScrapper/Model/Structure/DeityRelation/DeityDomain.cs rename to Pf2eModel/Model/Structure/DeityRelation/DeityDomain.cs index 8223e96..e112c2d 100644 --- a/Pf2eDataScrapper/Model/Structure/DeityRelation/DeityDomain.cs +++ b/Pf2eModel/Model/Structure/DeityRelation/DeityDomain.cs @@ -1,7 +1,7 @@ using System.ComponentModel.DataAnnotations; using System.ComponentModel.DataAnnotations.Schema; -namespace Pf2eDataScrapper.Model.Structure.DeityRelation; +namespace Pf2eModel.Model.Structure.DeityRelation; public partial class DeityDomain { diff --git a/Pf2eDataScrapper/Model/Structure/DeityRelation/DeitySpell.cs b/Pf2eModel/Model/Structure/DeityRelation/DeitySpell.cs similarity index 90% rename from Pf2eDataScrapper/Model/Structure/DeityRelation/DeitySpell.cs rename to Pf2eModel/Model/Structure/DeityRelation/DeitySpell.cs index ae36447..97be457 100644 --- a/Pf2eDataScrapper/Model/Structure/DeityRelation/DeitySpell.cs +++ b/Pf2eModel/Model/Structure/DeityRelation/DeitySpell.cs @@ -1,7 +1,7 @@ using System.ComponentModel.DataAnnotations; using System.ComponentModel.DataAnnotations.Schema; -namespace Pf2eDataScrapper.Model.Structure.DeityRelation; +namespace Pf2eModel.Model.Structure.DeityRelation; public partial class DeitySpell { diff --git a/Pf2eDataScrapper/Model/Structure/DeityRelation/DeityWeapon.cs b/Pf2eModel/Model/Structure/DeityRelation/DeityWeapon.cs similarity index 89% rename from Pf2eDataScrapper/Model/Structure/DeityRelation/DeityWeapon.cs rename to Pf2eModel/Model/Structure/DeityRelation/DeityWeapon.cs index b1b5a7e..daf7241 100644 --- a/Pf2eDataScrapper/Model/Structure/DeityRelation/DeityWeapon.cs +++ b/Pf2eModel/Model/Structure/DeityRelation/DeityWeapon.cs @@ -1,7 +1,7 @@ using System.ComponentModel.DataAnnotations; using System.ComponentModel.DataAnnotations.Schema; -namespace Pf2eDataScrapper.Model.Structure.DeityRelation; +namespace Pf2eModel.Model.Structure.DeityRelation; public partial class DeityWeapon { diff --git a/Pf2eDataScrapper/Model/Structure/Feat.cs b/Pf2eModel/Model/Structure/Feat.cs similarity index 85% rename from Pf2eDataScrapper/Model/Structure/Feat.cs rename to Pf2eModel/Model/Structure/Feat.cs index 4e65378..247c56b 100644 --- a/Pf2eDataScrapper/Model/Structure/Feat.cs +++ b/Pf2eModel/Model/Structure/Feat.cs @@ -1,10 +1,10 @@ -using Pf2eDataScrapper.Model.Base; -using Pf2eDataScrapper.Model.Enum; -using Pf2eDataScrapper.Model.Structure.FeatRelation; +using Pf2eModel.Model.Base; +using Pf2eModel.Model.Enum; +using Pf2eModel.Model.Structure.FeatRelation; using System.ComponentModel.DataAnnotations; using System.ComponentModel.DataAnnotations.Schema; -namespace Pf2eDataScrapper.Model.Structure; +namespace Pf2eModel.Model.Structure; public partial class Feat : IEntity { diff --git a/Pf2eDataScrapper/Model/Structure/FeatRelation/FeatPrerequisite.cs b/Pf2eModel/Model/Structure/FeatRelation/FeatPrerequisite.cs similarity index 89% rename from Pf2eDataScrapper/Model/Structure/FeatRelation/FeatPrerequisite.cs rename to Pf2eModel/Model/Structure/FeatRelation/FeatPrerequisite.cs index 3125871..41c820e 100644 --- a/Pf2eDataScrapper/Model/Structure/FeatRelation/FeatPrerequisite.cs +++ b/Pf2eModel/Model/Structure/FeatRelation/FeatPrerequisite.cs @@ -1,7 +1,7 @@ using System.ComponentModel.DataAnnotations; using System.ComponentModel.DataAnnotations.Schema; -namespace Pf2eDataScrapper.Model.Structure.FeatRelation; +namespace Pf2eModel.Model.Structure.FeatRelation; public partial class FeatPrerequisite { diff --git a/Pf2eDataScrapper/Model/Structure/Heritage.cs b/Pf2eModel/Model/Structure/Heritage.cs similarity index 84% rename from Pf2eDataScrapper/Model/Structure/Heritage.cs rename to Pf2eModel/Model/Structure/Heritage.cs index 0d44d8c..ad19f3f 100644 --- a/Pf2eDataScrapper/Model/Structure/Heritage.cs +++ b/Pf2eModel/Model/Structure/Heritage.cs @@ -1,8 +1,8 @@ -using Pf2eDataScrapper.Model.Base; +using Pf2eModel.Model.Base; using System.ComponentModel.DataAnnotations; using System.ComponentModel.DataAnnotations.Schema; -namespace Pf2eDataScrapper.Model.Structure; +namespace Pf2eModel.Model.Structure; public partial class Heritage : IEntity { diff --git a/Pf2eDataScrapper/Model/Structure/Spell.cs b/Pf2eModel/Model/Structure/Spell.cs similarity index 91% rename from Pf2eDataScrapper/Model/Structure/Spell.cs rename to Pf2eModel/Model/Structure/Spell.cs index 63d0347..9e3e786 100644 --- a/Pf2eDataScrapper/Model/Structure/Spell.cs +++ b/Pf2eModel/Model/Structure/Spell.cs @@ -1,9 +1,9 @@ -using Pf2eDataScrapper.Model.Base; -using Pf2eDataScrapper.Model.Structure.SpellRelation; +using Pf2eModel.Model.Base; +using Pf2eModel.Model.Structure.SpellRelation; using System.ComponentModel.DataAnnotations; using System.ComponentModel.DataAnnotations.Schema; -namespace Pf2eDataScrapper.Model.Structure; +namespace Pf2eModel.Model.Structure; public partial class Spell : IEntity { diff --git a/Pf2eDataScrapper/Model/Structure/SpellRelation/SpellArea.cs b/Pf2eModel/Model/Structure/SpellRelation/SpellArea.cs similarity index 84% rename from Pf2eDataScrapper/Model/Structure/SpellRelation/SpellArea.cs rename to Pf2eModel/Model/Structure/SpellRelation/SpellArea.cs index 87f1163..b2d2ed4 100644 --- a/Pf2eDataScrapper/Model/Structure/SpellRelation/SpellArea.cs +++ b/Pf2eModel/Model/Structure/SpellRelation/SpellArea.cs @@ -1,8 +1,8 @@ -using Pf2eDataScrapper.Model.Enum; +using Pf2eModel.Model.Enum; using System.ComponentModel.DataAnnotations; using System.ComponentModel.DataAnnotations.Schema; -namespace Pf2eDataScrapper.Model.Structure.SpellRelation; +namespace Pf2eModel.Model.Structure.SpellRelation; public partial class SpellArea { diff --git a/Pf2eDataScrapper/Model/Structure/SpellRelation/SpellDamage.cs b/Pf2eModel/Model/Structure/SpellRelation/SpellDamage.cs similarity index 90% rename from Pf2eDataScrapper/Model/Structure/SpellRelation/SpellDamage.cs rename to Pf2eModel/Model/Structure/SpellRelation/SpellDamage.cs index a05791e..003b442 100644 --- a/Pf2eDataScrapper/Model/Structure/SpellRelation/SpellDamage.cs +++ b/Pf2eModel/Model/Structure/SpellRelation/SpellDamage.cs @@ -1,8 +1,8 @@ -using Pf2eDataScrapper.Model.Enum; +using Pf2eModel.Model.Enum; using System.ComponentModel.DataAnnotations; using System.ComponentModel.DataAnnotations.Schema; -namespace Pf2eDataScrapper.Model.Structure.SpellRelation; +namespace Pf2eModel.Model.Structure.SpellRelation; public partial class SpellDamage { diff --git a/Pf2eDataScrapper/Model/Structure/SpellRelation/SpellDefense.cs b/Pf2eModel/Model/Structure/SpellRelation/SpellDefense.cs similarity index 91% rename from Pf2eDataScrapper/Model/Structure/SpellRelation/SpellDefense.cs rename to Pf2eModel/Model/Structure/SpellRelation/SpellDefense.cs index 79c8322..b4313ba 100644 --- a/Pf2eDataScrapper/Model/Structure/SpellRelation/SpellDefense.cs +++ b/Pf2eModel/Model/Structure/SpellRelation/SpellDefense.cs @@ -1,7 +1,7 @@ using System.ComponentModel.DataAnnotations; using System.ComponentModel.DataAnnotations.Schema; -namespace Pf2eDataScrapper.Model.Structure.SpellRelation; +namespace Pf2eModel.Model.Structure.SpellRelation; public partial class SpellDefense { diff --git a/Pf2eDataScrapper/Model/Structure/SpellRelation/SpellRitual.cs b/Pf2eModel/Model/Structure/SpellRelation/SpellRitual.cs similarity index 91% rename from Pf2eDataScrapper/Model/Structure/SpellRelation/SpellRitual.cs rename to Pf2eModel/Model/Structure/SpellRelation/SpellRitual.cs index 4956d7a..fd96c08 100644 --- a/Pf2eDataScrapper/Model/Structure/SpellRelation/SpellRitual.cs +++ b/Pf2eModel/Model/Structure/SpellRelation/SpellRitual.cs @@ -1,7 +1,7 @@ using System.ComponentModel.DataAnnotations; using System.ComponentModel.DataAnnotations.Schema; -namespace Pf2eDataScrapper.Model.Structure.SpellRelation; +namespace Pf2eModel.Model.Structure.SpellRelation; public partial class SpellRitual { diff --git a/Pf2eDataScrapper/Model/Structure/Trait.cs b/Pf2eModel/Model/Structure/Trait.cs similarity index 79% rename from Pf2eDataScrapper/Model/Structure/Trait.cs rename to Pf2eModel/Model/Structure/Trait.cs index 1603391..fee868a 100644 --- a/Pf2eDataScrapper/Model/Structure/Trait.cs +++ b/Pf2eModel/Model/Structure/Trait.cs @@ -1,9 +1,9 @@ -using Pf2eDataScrapper.Model.Base; -using Pf2eDataScrapper.Model.Enum; +using Pf2eModel.Model.Base; +using Pf2eModel.Model.Enum; using System.ComponentModel.DataAnnotations; using System.ComponentModel.DataAnnotations.Schema; -namespace Pf2eDataScrapper.Model.Structure; +namespace Pf2eModel.Model.Structure; public partial class Trait : IEntity { diff --git a/Pf2eModel/Pf2eModel.csproj b/Pf2eModel/Pf2eModel.csproj new file mode 100644 index 0000000..d7cc940 --- /dev/null +++ b/Pf2eModel/Pf2eModel.csproj @@ -0,0 +1,24 @@ + + + + net8.0 + enable + enable + + + + + Always + + + + + + + + + + + + +