Вынесение модели в отдельный проект
This commit is contained in:
@@ -0,0 +1,6 @@
|
|||||||
|
<?xml version="1.0" encoding="utf-8" ?>
|
||||||
|
<configuration>
|
||||||
|
<startup>
|
||||||
|
<supportedRuntime version="v4.0" sku=".NETFramework,Version=v4.7.2" />
|
||||||
|
</startup>
|
||||||
|
</configuration>
|
||||||
@@ -0,0 +1,89 @@
|
|||||||
|
<?xml version="1.0" encoding="utf-8"?>
|
||||||
|
<Project ToolsVersion="15.0" xmlns="http://schemas.microsoft.com/developer/msbuild/2003">
|
||||||
|
<Import Project="$(MSBuildExtensionsPath)\$(MSBuildToolsVersion)\Microsoft.Common.props" Condition="Exists('$(MSBuildExtensionsPath)\$(MSBuildToolsVersion)\Microsoft.Common.props')" />
|
||||||
|
<PropertyGroup>
|
||||||
|
<Configuration Condition=" '$(Configuration)' == '' ">Debug</Configuration>
|
||||||
|
<Platform Condition=" '$(Platform)' == '' ">AnyCPU</Platform>
|
||||||
|
<ProjectGuid>{9590B32F-4C69-48FA-AD0F-E482FB4728AB}</ProjectGuid>
|
||||||
|
<OutputType>WinExe</OutputType>
|
||||||
|
<RootNamespace>DatabaseViewer</RootNamespace>
|
||||||
|
<AssemblyName>DatabaseViewer</AssemblyName>
|
||||||
|
<TargetFrameworkVersion>v4.7.2</TargetFrameworkVersion>
|
||||||
|
<FileAlignment>512</FileAlignment>
|
||||||
|
<AutoGenerateBindingRedirects>true</AutoGenerateBindingRedirects>
|
||||||
|
<Deterministic>true</Deterministic>
|
||||||
|
</PropertyGroup>
|
||||||
|
<PropertyGroup Condition=" '$(Configuration)|$(Platform)' == 'Debug|AnyCPU' ">
|
||||||
|
<PlatformTarget>AnyCPU</PlatformTarget>
|
||||||
|
<DebugSymbols>true</DebugSymbols>
|
||||||
|
<DebugType>full</DebugType>
|
||||||
|
<Optimize>false</Optimize>
|
||||||
|
<OutputPath>bin\Debug\</OutputPath>
|
||||||
|
<DefineConstants>DEBUG;TRACE</DefineConstants>
|
||||||
|
<ErrorReport>prompt</ErrorReport>
|
||||||
|
<WarningLevel>4</WarningLevel>
|
||||||
|
</PropertyGroup>
|
||||||
|
<PropertyGroup Condition=" '$(Configuration)|$(Platform)' == 'Release|AnyCPU' ">
|
||||||
|
<PlatformTarget>AnyCPU</PlatformTarget>
|
||||||
|
<DebugType>pdbonly</DebugType>
|
||||||
|
<Optimize>true</Optimize>
|
||||||
|
<OutputPath>bin\Release\</OutputPath>
|
||||||
|
<DefineConstants>TRACE</DefineConstants>
|
||||||
|
<ErrorReport>prompt</ErrorReport>
|
||||||
|
<WarningLevel>4</WarningLevel>
|
||||||
|
</PropertyGroup>
|
||||||
|
<ItemGroup>
|
||||||
|
<Reference Include="System" />
|
||||||
|
<Reference Include="System.Core" />
|
||||||
|
<Reference Include="System.Xml.Linq" />
|
||||||
|
<Reference Include="System.Data.DataSetExtensions" />
|
||||||
|
<Reference Include="Microsoft.CSharp" />
|
||||||
|
<Reference Include="System.Data" />
|
||||||
|
<Reference Include="System.Deployment" />
|
||||||
|
<Reference Include="System.Drawing" />
|
||||||
|
<Reference Include="System.Net.Http" />
|
||||||
|
<Reference Include="System.Windows.Forms" />
|
||||||
|
<Reference Include="System.Xml" />
|
||||||
|
</ItemGroup>
|
||||||
|
<ItemGroup>
|
||||||
|
<Compile Include="MainViewerForm.cs">
|
||||||
|
<SubType>Form</SubType>
|
||||||
|
</Compile>
|
||||||
|
<Compile Include="MainViewerForm.Designer.cs">
|
||||||
|
<DependentUpon>MainViewerForm.cs</DependentUpon>
|
||||||
|
</Compile>
|
||||||
|
<Compile Include="Program.cs" />
|
||||||
|
<Compile Include="Properties\AssemblyInfo.cs" />
|
||||||
|
<EmbeddedResource Include="MainViewerForm.resx">
|
||||||
|
<DependentUpon>MainViewerForm.cs</DependentUpon>
|
||||||
|
</EmbeddedResource>
|
||||||
|
<EmbeddedResource Include="Properties\Resources.resx">
|
||||||
|
<Generator>ResXFileCodeGenerator</Generator>
|
||||||
|
<LastGenOutput>Resources.Designer.cs</LastGenOutput>
|
||||||
|
<SubType>Designer</SubType>
|
||||||
|
</EmbeddedResource>
|
||||||
|
<Compile Include="Properties\Resources.Designer.cs">
|
||||||
|
<AutoGen>True</AutoGen>
|
||||||
|
<DependentUpon>Resources.resx</DependentUpon>
|
||||||
|
</Compile>
|
||||||
|
<None Include="Properties\Settings.settings">
|
||||||
|
<Generator>SettingsSingleFileGenerator</Generator>
|
||||||
|
<LastGenOutput>Settings.Designer.cs</LastGenOutput>
|
||||||
|
</None>
|
||||||
|
<Compile Include="Properties\Settings.Designer.cs">
|
||||||
|
<AutoGen>True</AutoGen>
|
||||||
|
<DependentUpon>Settings.settings</DependentUpon>
|
||||||
|
<DesignTimeSharedInput>True</DesignTimeSharedInput>
|
||||||
|
</Compile>
|
||||||
|
</ItemGroup>
|
||||||
|
<ItemGroup>
|
||||||
|
<None Include="App.config" />
|
||||||
|
</ItemGroup>
|
||||||
|
<ItemGroup>
|
||||||
|
<ProjectReference Include="..\Pf2eDataScrapper\Pf2eDataScrapper.csproj">
|
||||||
|
<Project>{ff82896a-92ca-4c63-8fdc-959ecc513773}</Project>
|
||||||
|
<Name>Pf2eDataScrapper</Name>
|
||||||
|
</ProjectReference>
|
||||||
|
</ItemGroup>
|
||||||
|
<Import Project="$(MSBuildToolsPath)\Microsoft.CSharp.targets" />
|
||||||
|
</Project>
|
||||||
+140
@@ -0,0 +1,140 @@
|
|||||||
|
namespace DatabaseViewer
|
||||||
|
{
|
||||||
|
partial class MainViewerForm
|
||||||
|
{
|
||||||
|
/// <summary>
|
||||||
|
/// Обязательная переменная конструктора.
|
||||||
|
/// </summary>
|
||||||
|
private System.ComponentModel.IContainer components = null;
|
||||||
|
|
||||||
|
/// <summary>
|
||||||
|
/// Освободить все используемые ресурсы.
|
||||||
|
/// </summary>
|
||||||
|
/// <param name="disposing">истинно, если управляемый ресурс должен быть удален; иначе ложно.</param>
|
||||||
|
protected override void Dispose(bool disposing)
|
||||||
|
{
|
||||||
|
if (disposing && (components != null))
|
||||||
|
{
|
||||||
|
components.Dispose();
|
||||||
|
}
|
||||||
|
base.Dispose(disposing);
|
||||||
|
}
|
||||||
|
|
||||||
|
#region Код, автоматически созданный конструктором форм Windows
|
||||||
|
|
||||||
|
/// <summary>
|
||||||
|
/// Требуемый метод для поддержки конструктора — не изменяйте
|
||||||
|
/// содержимое этого метода с помощью редактора кода.
|
||||||
|
/// </summary>
|
||||||
|
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;
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
@@ -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();
|
||||||
|
|
||||||
|
|
||||||
|
}
|
||||||
|
}
|
||||||
|
}
|
||||||
@@ -0,0 +1,123 @@
|
|||||||
|
<?xml version="1.0" encoding="utf-8"?>
|
||||||
|
<root>
|
||||||
|
<!--
|
||||||
|
Microsoft ResX Schema
|
||||||
|
|
||||||
|
Version 2.0
|
||||||
|
|
||||||
|
The primary goals of this format is to allow a simple XML format
|
||||||
|
that is mostly human readable. The generation and parsing of the
|
||||||
|
various data types are done through the TypeConverter classes
|
||||||
|
associated with the data types.
|
||||||
|
|
||||||
|
Example:
|
||||||
|
|
||||||
|
... ado.net/XML headers & schema ...
|
||||||
|
<resheader name="resmimetype">text/microsoft-resx</resheader>
|
||||||
|
<resheader name="version">2.0</resheader>
|
||||||
|
<resheader name="reader">System.Resources.ResXResourceReader, System.Windows.Forms, ...</resheader>
|
||||||
|
<resheader name="writer">System.Resources.ResXResourceWriter, System.Windows.Forms, ...</resheader>
|
||||||
|
<data name="Name1"><value>this is my long string</value><comment>this is a comment</comment></data>
|
||||||
|
<data name="Color1" type="System.Drawing.Color, System.Drawing">Blue</data>
|
||||||
|
<data name="Bitmap1" mimetype="application/x-microsoft.net.object.binary.base64">
|
||||||
|
<value>[base64 mime encoded serialized .NET Framework object]</value>
|
||||||
|
</data>
|
||||||
|
<data name="Icon1" type="System.Drawing.Icon, System.Drawing" mimetype="application/x-microsoft.net.object.bytearray.base64">
|
||||||
|
<value>[base64 mime encoded string representing a byte array form of the .NET Framework object]</value>
|
||||||
|
<comment>This is a comment</comment>
|
||||||
|
</data>
|
||||||
|
|
||||||
|
There are any number of "resheader" rows that contain simple
|
||||||
|
name/value pairs.
|
||||||
|
|
||||||
|
Each data row contains a name, and value. The row also contains a
|
||||||
|
type or mimetype. Type corresponds to a .NET class that support
|
||||||
|
text/value conversion through the TypeConverter architecture.
|
||||||
|
Classes that don't support this are serialized and stored with the
|
||||||
|
mimetype set.
|
||||||
|
|
||||||
|
The mimetype is used for serialized objects, and tells the
|
||||||
|
ResXResourceReader how to depersist the object. This is currently not
|
||||||
|
extensible. For a given mimetype the value must be set accordingly:
|
||||||
|
|
||||||
|
Note - application/x-microsoft.net.object.binary.base64 is the format
|
||||||
|
that the ResXResourceWriter will generate, however the reader can
|
||||||
|
read any of the formats listed below.
|
||||||
|
|
||||||
|
mimetype: application/x-microsoft.net.object.binary.base64
|
||||||
|
value : The object must be serialized with
|
||||||
|
: System.Runtime.Serialization.Formatters.Binary.BinaryFormatter
|
||||||
|
: and then encoded with base64 encoding.
|
||||||
|
|
||||||
|
mimetype: application/x-microsoft.net.object.soap.base64
|
||||||
|
value : The object must be serialized with
|
||||||
|
: System.Runtime.Serialization.Formatters.Soap.SoapFormatter
|
||||||
|
: and then encoded with base64 encoding.
|
||||||
|
|
||||||
|
mimetype: application/x-microsoft.net.object.bytearray.base64
|
||||||
|
value : The object must be serialized into a byte array
|
||||||
|
: using a System.ComponentModel.TypeConverter
|
||||||
|
: and then encoded with base64 encoding.
|
||||||
|
-->
|
||||||
|
<xsd:schema id="root" xmlns="" xmlns:xsd="http://www.w3.org/2001/XMLSchema" xmlns:msdata="urn:schemas-microsoft-com:xml-msdata">
|
||||||
|
<xsd:import namespace="http://www.w3.org/XML/1998/namespace" />
|
||||||
|
<xsd:element name="root" msdata:IsDataSet="true">
|
||||||
|
<xsd:complexType>
|
||||||
|
<xsd:choice maxOccurs="unbounded">
|
||||||
|
<xsd:element name="metadata">
|
||||||
|
<xsd:complexType>
|
||||||
|
<xsd:sequence>
|
||||||
|
<xsd:element name="value" type="xsd:string" minOccurs="0" />
|
||||||
|
</xsd:sequence>
|
||||||
|
<xsd:attribute name="name" use="required" type="xsd:string" />
|
||||||
|
<xsd:attribute name="type" type="xsd:string" />
|
||||||
|
<xsd:attribute name="mimetype" type="xsd:string" />
|
||||||
|
<xsd:attribute ref="xml:space" />
|
||||||
|
</xsd:complexType>
|
||||||
|
</xsd:element>
|
||||||
|
<xsd:element name="assembly">
|
||||||
|
<xsd:complexType>
|
||||||
|
<xsd:attribute name="alias" type="xsd:string" />
|
||||||
|
<xsd:attribute name="name" type="xsd:string" />
|
||||||
|
</xsd:complexType>
|
||||||
|
</xsd:element>
|
||||||
|
<xsd:element name="data">
|
||||||
|
<xsd:complexType>
|
||||||
|
<xsd:sequence>
|
||||||
|
<xsd:element name="value" type="xsd:string" minOccurs="0" msdata:Ordinal="1" />
|
||||||
|
<xsd:element name="comment" type="xsd:string" minOccurs="0" msdata:Ordinal="2" />
|
||||||
|
</xsd:sequence>
|
||||||
|
<xsd:attribute name="name" type="xsd:string" use="required" msdata:Ordinal="1" />
|
||||||
|
<xsd:attribute name="type" type="xsd:string" msdata:Ordinal="3" />
|
||||||
|
<xsd:attribute name="mimetype" type="xsd:string" msdata:Ordinal="4" />
|
||||||
|
<xsd:attribute ref="xml:space" />
|
||||||
|
</xsd:complexType>
|
||||||
|
</xsd:element>
|
||||||
|
<xsd:element name="resheader">
|
||||||
|
<xsd:complexType>
|
||||||
|
<xsd:sequence>
|
||||||
|
<xsd:element name="value" type="xsd:string" minOccurs="0" msdata:Ordinal="1" />
|
||||||
|
</xsd:sequence>
|
||||||
|
<xsd:attribute name="name" type="xsd:string" use="required" />
|
||||||
|
</xsd:complexType>
|
||||||
|
</xsd:element>
|
||||||
|
</xsd:choice>
|
||||||
|
</xsd:complexType>
|
||||||
|
</xsd:element>
|
||||||
|
</xsd:schema>
|
||||||
|
<resheader name="resmimetype">
|
||||||
|
<value>text/microsoft-resx</value>
|
||||||
|
</resheader>
|
||||||
|
<resheader name="version">
|
||||||
|
<value>2.0</value>
|
||||||
|
</resheader>
|
||||||
|
<resheader name="reader">
|
||||||
|
<value>System.Resources.ResXResourceReader, System.Windows.Forms, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089</value>
|
||||||
|
</resheader>
|
||||||
|
<resheader name="writer">
|
||||||
|
<value>System.Resources.ResXResourceWriter, System.Windows.Forms, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089</value>
|
||||||
|
</resheader>
|
||||||
|
<metadata name="menuStrip1.TrayLocation" type="System.Drawing.Point, System.Drawing, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b03f5f7f11d50a3a">
|
||||||
|
<value>17, 17</value>
|
||||||
|
</metadata>
|
||||||
|
</root>
|
||||||
@@ -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
|
||||||
|
{
|
||||||
|
/// <summary>
|
||||||
|
/// Главная точка входа для приложения.
|
||||||
|
/// </summary>
|
||||||
|
[STAThread]
|
||||||
|
static void Main()
|
||||||
|
{
|
||||||
|
Application.EnableVisualStyles();
|
||||||
|
Application.SetCompatibleTextRenderingDefault(false);
|
||||||
|
Application.Run(new MainViewerForm());
|
||||||
|
}
|
||||||
|
}
|
||||||
|
}
|
||||||
@@ -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")]
|
||||||
+71
@@ -0,0 +1,71 @@
|
|||||||
|
//------------------------------------------------------------------------------
|
||||||
|
// <auto-generated>
|
||||||
|
// Этот код создан программным средством.
|
||||||
|
// Версия среды выполнения: 4.0.30319.42000
|
||||||
|
//
|
||||||
|
// Изменения в этом файле могут привести к неправильному поведению и будут утрачены, если
|
||||||
|
// код создан повторно.
|
||||||
|
// </auto-generated>
|
||||||
|
//------------------------------------------------------------------------------
|
||||||
|
|
||||||
|
namespace DatabaseViewer.Properties
|
||||||
|
{
|
||||||
|
|
||||||
|
|
||||||
|
/// <summary>
|
||||||
|
/// Класс ресурсов со строгим типом для поиска локализованных строк и пр.
|
||||||
|
/// </summary>
|
||||||
|
// Этот класс был автоматически создан при помощи 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()
|
||||||
|
{
|
||||||
|
}
|
||||||
|
|
||||||
|
/// <summary>
|
||||||
|
/// Возврат кэшированного экземпляра ResourceManager, используемого этим классом.
|
||||||
|
/// </summary>
|
||||||
|
[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;
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
|
/// <summary>
|
||||||
|
/// Переопределяет свойство CurrentUICulture текущего потока для всех
|
||||||
|
/// подстановки ресурсов с помощью этого класса ресурсов со строгим типом.
|
||||||
|
/// </summary>
|
||||||
|
[global::System.ComponentModel.EditorBrowsableAttribute(global::System.ComponentModel.EditorBrowsableState.Advanced)]
|
||||||
|
internal static global::System.Globalization.CultureInfo Culture
|
||||||
|
{
|
||||||
|
get
|
||||||
|
{
|
||||||
|
return resourceCulture;
|
||||||
|
}
|
||||||
|
set
|
||||||
|
{
|
||||||
|
resourceCulture = value;
|
||||||
|
}
|
||||||
|
}
|
||||||
|
}
|
||||||
|
}
|
||||||
@@ -0,0 +1,117 @@
|
|||||||
|
<?xml version="1.0" encoding="utf-8"?>
|
||||||
|
<root>
|
||||||
|
<!--
|
||||||
|
Microsoft ResX Schema
|
||||||
|
|
||||||
|
Version 2.0
|
||||||
|
|
||||||
|
The primary goals of this format is to allow a simple XML format
|
||||||
|
that is mostly human readable. The generation and parsing of the
|
||||||
|
various data types are done through the TypeConverter classes
|
||||||
|
associated with the data types.
|
||||||
|
|
||||||
|
Example:
|
||||||
|
|
||||||
|
... ado.net/XML headers & schema ...
|
||||||
|
<resheader name="resmimetype">text/microsoft-resx</resheader>
|
||||||
|
<resheader name="version">2.0</resheader>
|
||||||
|
<resheader name="reader">System.Resources.ResXResourceReader, System.Windows.Forms, ...</resheader>
|
||||||
|
<resheader name="writer">System.Resources.ResXResourceWriter, System.Windows.Forms, ...</resheader>
|
||||||
|
<data name="Name1"><value>this is my long string</value><comment>this is a comment</comment></data>
|
||||||
|
<data name="Color1" type="System.Drawing.Color, System.Drawing">Blue</data>
|
||||||
|
<data name="Bitmap1" mimetype="application/x-microsoft.net.object.binary.base64">
|
||||||
|
<value>[base64 mime encoded serialized .NET Framework object]</value>
|
||||||
|
</data>
|
||||||
|
<data name="Icon1" type="System.Drawing.Icon, System.Drawing" mimetype="application/x-microsoft.net.object.bytearray.base64">
|
||||||
|
<value>[base64 mime encoded string representing a byte array form of the .NET Framework object]</value>
|
||||||
|
<comment>This is a comment</comment>
|
||||||
|
</data>
|
||||||
|
|
||||||
|
There are any number of "resheader" rows that contain simple
|
||||||
|
name/value pairs.
|
||||||
|
|
||||||
|
Each data row contains a name, and value. The row also contains a
|
||||||
|
type or mimetype. Type corresponds to a .NET class that support
|
||||||
|
text/value conversion through the TypeConverter architecture.
|
||||||
|
Classes that don't support this are serialized and stored with the
|
||||||
|
mimetype set.
|
||||||
|
|
||||||
|
The mimetype is used for serialized objects, and tells the
|
||||||
|
ResXResourceReader how to depersist the object. This is currently not
|
||||||
|
extensible. For a given mimetype the value must be set accordingly:
|
||||||
|
|
||||||
|
Note - application/x-microsoft.net.object.binary.base64 is the format
|
||||||
|
that the ResXResourceWriter will generate, however the reader can
|
||||||
|
read any of the formats listed below.
|
||||||
|
|
||||||
|
mimetype: application/x-microsoft.net.object.binary.base64
|
||||||
|
value : The object must be serialized with
|
||||||
|
: System.Serialization.Formatters.Binary.BinaryFormatter
|
||||||
|
: and then encoded with base64 encoding.
|
||||||
|
|
||||||
|
mimetype: application/x-microsoft.net.object.soap.base64
|
||||||
|
value : The object must be serialized with
|
||||||
|
: System.Runtime.Serialization.Formatters.Soap.SoapFormatter
|
||||||
|
: and then encoded with base64 encoding.
|
||||||
|
|
||||||
|
mimetype: application/x-microsoft.net.object.bytearray.base64
|
||||||
|
value : The object must be serialized into a byte array
|
||||||
|
: using a System.ComponentModel.TypeConverter
|
||||||
|
: and then encoded with base64 encoding.
|
||||||
|
-->
|
||||||
|
<xsd:schema id="root" xmlns="" xmlns:xsd="http://www.w3.org/2001/XMLSchema" xmlns:msdata="urn:schemas-microsoft-com:xml-msdata">
|
||||||
|
<xsd:element name="root" msdata:IsDataSet="true">
|
||||||
|
<xsd:complexType>
|
||||||
|
<xsd:choice maxOccurs="unbounded">
|
||||||
|
<xsd:element name="metadata">
|
||||||
|
<xsd:complexType>
|
||||||
|
<xsd:sequence>
|
||||||
|
<xsd:element name="value" type="xsd:string" minOccurs="0" />
|
||||||
|
</xsd:sequence>
|
||||||
|
<xsd:attribute name="name" type="xsd:string" />
|
||||||
|
<xsd:attribute name="type" type="xsd:string" />
|
||||||
|
<xsd:attribute name="mimetype" type="xsd:string" />
|
||||||
|
</xsd:complexType>
|
||||||
|
</xsd:element>
|
||||||
|
<xsd:element name="assembly">
|
||||||
|
<xsd:complexType>
|
||||||
|
<xsd:attribute name="alias" type="xsd:string" />
|
||||||
|
<xsd:attribute name="name" type="xsd:string" />
|
||||||
|
</xsd:complexType>
|
||||||
|
</xsd:element>
|
||||||
|
<xsd:element name="data">
|
||||||
|
<xsd:complexType>
|
||||||
|
<xsd:sequence>
|
||||||
|
<xsd:element name="value" type="xsd:string" minOccurs="0" msdata:Ordinal="1" />
|
||||||
|
<xsd:element name="comment" type="xsd:string" minOccurs="0" msdata:Ordinal="2" />
|
||||||
|
</xsd:sequence>
|
||||||
|
<xsd:attribute name="name" type="xsd:string" msdata:Ordinal="1" />
|
||||||
|
<xsd:attribute name="type" type="xsd:string" msdata:Ordinal="3" />
|
||||||
|
<xsd:attribute name="mimetype" type="xsd:string" msdata:Ordinal="4" />
|
||||||
|
</xsd:complexType>
|
||||||
|
</xsd:element>
|
||||||
|
<xsd:element name="resheader">
|
||||||
|
<xsd:complexType>
|
||||||
|
<xsd:sequence>
|
||||||
|
<xsd:element name="value" type="xsd:string" minOccurs="0" msdata:Ordinal="1" />
|
||||||
|
</xsd:sequence>
|
||||||
|
<xsd:attribute name="name" type="xsd:string" use="required" />
|
||||||
|
</xsd:complexType>
|
||||||
|
</xsd:element>
|
||||||
|
</xsd:choice>
|
||||||
|
</xsd:complexType>
|
||||||
|
</xsd:element>
|
||||||
|
</xsd:schema>
|
||||||
|
<resheader name="resmimetype">
|
||||||
|
<value>text/microsoft-resx</value>
|
||||||
|
</resheader>
|
||||||
|
<resheader name="version">
|
||||||
|
<value>2.0</value>
|
||||||
|
</resheader>
|
||||||
|
<resheader name="reader">
|
||||||
|
<value>System.Resources.ResXResourceReader, System.Windows.Forms, Version=2.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089</value>
|
||||||
|
</resheader>
|
||||||
|
<resheader name="writer">
|
||||||
|
<value>System.Resources.ResXResourceWriter, System.Windows.Forms, Version=2.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089</value>
|
||||||
|
</resheader>
|
||||||
|
</root>
|
||||||
+30
@@ -0,0 +1,30 @@
|
|||||||
|
//------------------------------------------------------------------------------
|
||||||
|
// <auto-generated>
|
||||||
|
// 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.
|
||||||
|
// </auto-generated>
|
||||||
|
//------------------------------------------------------------------------------
|
||||||
|
|
||||||
|
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;
|
||||||
|
}
|
||||||
|
}
|
||||||
|
}
|
||||||
|
}
|
||||||
@@ -0,0 +1,7 @@
|
|||||||
|
<?xml version='1.0' encoding='utf-8'?>
|
||||||
|
<SettingsFile xmlns="http://schemas.microsoft.com/VisualStudio/2004/01/settings" CurrentProfile="(Default)">
|
||||||
|
<Profiles>
|
||||||
|
<Profile Name="(Default)" />
|
||||||
|
</Profiles>
|
||||||
|
<Settings />
|
||||||
|
</SettingsFile>
|
||||||
+10
-1
@@ -1,9 +1,12 @@
|
|||||||
|
|
||||||
Microsoft Visual Studio Solution File, Format Version 12.00
|
Microsoft Visual Studio Solution File, Format Version 12.00
|
||||||
# Visual Studio Version 17
|
# Visual Studio Version 17
|
||||||
VisualStudioVersion = 17.13.35919.96 d17.13
|
VisualStudioVersion = 17.13.35919.96
|
||||||
MinimumVisualStudioVersion = 10.0.40219.1
|
MinimumVisualStudioVersion = 10.0.40219.1
|
||||||
Project("{FAE04EC0-301F-11D3-BF4B-00C04F79EFBC}") = "Pf2eDataScrapper", "Pf2eDataScrapper\Pf2eDataScrapper.csproj", "{FF82896A-92CA-4C63-8FDC-959ECC513773}"
|
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
|
EndProject
|
||||||
Project("{2150E333-8FDC-42A3-9474-1A3956D46DE8}") = "Элементы решения", "Элементы решения", "{754FC069-D67B-A9D7-50A1-8D1CA196D8F1}"
|
Project("{2150E333-8FDC-42A3-9474-1A3956D46DE8}") = "Элементы решения", "Элементы решения", "{754FC069-D67B-A9D7-50A1-8D1CA196D8F1}"
|
||||||
ProjectSection(SolutionItems) = preProject
|
ProjectSection(SolutionItems) = preProject
|
||||||
@@ -12,6 +15,8 @@ Project("{2150E333-8FDC-42A3-9474-1A3956D46DE8}") = "Элементы решен
|
|||||||
EndProject
|
EndProject
|
||||||
Project("{2150E333-8FDC-42A3-9474-1A3956D46DE8}") = "output", "output", "{36D591C7-65C7-A0D1-1CBC-10CDE441BDC8}"
|
Project("{2150E333-8FDC-42A3-9474-1A3956D46DE8}") = "output", "output", "{36D591C7-65C7-A0D1-1CBC-10CDE441BDC8}"
|
||||||
EndProject
|
EndProject
|
||||||
|
Project("{FAE04EC0-301F-11D3-BF4B-00C04F79EFBC}") = "Pf2eModel", "Pf2eModel\Pf2eModel.csproj", "{D32B7787-D912-4B21-B341-7C1F42F62D36}"
|
||||||
|
EndProject
|
||||||
Global
|
Global
|
||||||
GlobalSection(SolutionConfigurationPlatforms) = preSolution
|
GlobalSection(SolutionConfigurationPlatforms) = preSolution
|
||||||
Debug|Any CPU = Debug|Any CPU
|
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}.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.ActiveCfg = Release|Any CPU
|
||||||
{FF82896A-92CA-4C63-8FDC-959ECC513773}.Release|Any CPU.Build.0 = 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
|
EndGlobalSection
|
||||||
GlobalSection(SolutionProperties) = preSolution
|
GlobalSection(SolutionProperties) = preSolution
|
||||||
HideSolutionNode = FALSE
|
HideSolutionNode = FALSE
|
||||||
|
|||||||
@@ -1,4 +1,4 @@
|
|||||||
using Pf2eDataScrapper.Model;
|
using Pf2eModel.Model;
|
||||||
using Slugify;
|
using Slugify;
|
||||||
|
|
||||||
namespace Pf2eDataScrapper.Importers;
|
namespace Pf2eDataScrapper.Importers;
|
||||||
|
|||||||
@@ -1,5 +1,4 @@
|
|||||||
|
namespace Pf2eDataScrapper.Importers.Implementations.Aonprd.Compendium;
|
||||||
namespace Pf2eDataScrapper.Importers.Implementations.Aonprd.Compendium;
|
|
||||||
|
|
||||||
internal class AonprdReference(string id, string file)
|
internal class AonprdReference(string id, string file)
|
||||||
{
|
{
|
||||||
|
|||||||
@@ -1,11 +1,11 @@
|
|||||||
using LinqToDB;
|
using LinqToDB;
|
||||||
using Newtonsoft.Json.Linq;
|
using Newtonsoft.Json.Linq;
|
||||||
using Pf2eDataScrapper.Model;
|
using Pf2eModel.Model;
|
||||||
using Pf2eDataScrapper.Model.Base;
|
using Pf2eModel.Model.Base;
|
||||||
using Pf2eDataScrapper.Model.Base.Source;
|
using Pf2eModel.Model.Base.Source;
|
||||||
using Pf2eDataScrapper.Model.Base.Targets;
|
using Pf2eModel.Model.Base.Targets;
|
||||||
using Pf2eDataScrapper.Model.Enum;
|
using Pf2eModel.Model.Enum;
|
||||||
using Pf2eDataScrapper.Model.Structure;
|
using Pf2eModel.Model.Structure;
|
||||||
using System.Security.Cryptography;
|
using System.Security.Cryptography;
|
||||||
using System.Text;
|
using System.Text;
|
||||||
using System.Text.RegularExpressions;
|
using System.Text.RegularExpressions;
|
||||||
|
|||||||
@@ -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<Solver> Solvers = [
|
||||||
|
new Solver<ActionType>(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<SourceCategory>(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<T>(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<T>))
|
||||||
|
{
|
||||||
|
throw new EnumResolverEnumUnknownException(type);
|
||||||
|
}
|
||||||
|
|
||||||
|
Solver<T> tSolver = (Solver<T>) 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<T>(Dictionary<string, T> data) : Solver where T : struct, Enum
|
||||||
|
{
|
||||||
|
public override Type Type { get; } = typeof(T);
|
||||||
|
public Dictionary<string, T> 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");
|
||||||
|
|
||||||
|
}
|
||||||
+2
-2
@@ -1,5 +1,5 @@
|
|||||||
using Newtonsoft.Json.Linq;
|
using Newtonsoft.Json.Linq;
|
||||||
using Pf2eDataScrapper.Model.Enum;
|
using Pf2eModel.Model.Enum;
|
||||||
|
|
||||||
namespace Pf2eDataScrapper.Importers.Implementations.Aonprd.DataBuilder.Processors;
|
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 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()
|
public override void Process()
|
||||||
{
|
{
|
||||||
|
|||||||
+2
-2
@@ -1,5 +1,5 @@
|
|||||||
using Pf2eDataScrapper.Model.Enum;
|
using Pf2eModel.Model.Enum;
|
||||||
using Pf2eDataScrapper.Model.Structure;
|
using Pf2eModel.Model.Structure;
|
||||||
|
|
||||||
namespace Pf2eDataScrapper.Importers.Implementations.Aonprd.DataBuilder.Processors;
|
namespace Pf2eDataScrapper.Importers.Implementations.Aonprd.DataBuilder.Processors;
|
||||||
|
|
||||||
|
|||||||
+6
-6
@@ -1,11 +1,11 @@
|
|||||||
using Newtonsoft.Json.Linq;
|
using Newtonsoft.Json.Linq;
|
||||||
using Pf2eDataScrapper.Importers.Implementations.Aonprd.DataBuilder;
|
using Pf2eDataScrapper.Importers.Implementations.Aonprd.DataBuilder;
|
||||||
using Pf2eDataScrapper.Model;
|
using Pf2eModel.Model;
|
||||||
using Pf2eDataScrapper.Model.Base;
|
using Pf2eModel.Model.Base;
|
||||||
using Pf2eDataScrapper.Model.Base.Source;
|
using Pf2eModel.Model.Base.Source;
|
||||||
using Pf2eDataScrapper.Model.Base.Targets;
|
using Pf2eModel.Model.Base.Targets;
|
||||||
using Pf2eDataScrapper.Model.Enum;
|
using Pf2eModel.Model.Enum;
|
||||||
using Pf2eDataScrapper.Model.Structure;
|
using Pf2eModel.Model.Structure;
|
||||||
using System.Security.Cryptography;
|
using System.Security.Cryptography;
|
||||||
using System.Text;
|
using System.Text;
|
||||||
|
|
||||||
|
|||||||
+6
-6
@@ -1,5 +1,5 @@
|
|||||||
using Newtonsoft.Json.Linq;
|
using Newtonsoft.Json.Linq;
|
||||||
using Pf2eDataScrapper.Model.Enum;
|
using Pf2eModel.Model.Enum;
|
||||||
|
|
||||||
namespace Pf2eDataScrapper.Importers.Implementations.Pf2eFoundry.DataBuilder.Processors;
|
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 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()
|
public override void Process()
|
||||||
{
|
{
|
||||||
base.Process();
|
base.Process();
|
||||||
|
/*
|
||||||
Object.Type = EnumRequired<ActionType>("system.actionType.value");
|
Object.Type = EnumRequired<ActionType>("system.actionType.value");
|
||||||
// Object.Category = EnumOptional<ActionCategory>("system.category", ActionCategory.Unknown);
|
Object.Category = EnumOptional<ActionCategory>("system.category", ActionCategory.Unknown);
|
||||||
Object.Actions = GetOptional<int>("system.actions.value");
|
Object.Actions = GetOptional<int>("system.actions.value");
|
||||||
// Object.DeathNote = GetOptional<bool>("system.deathNote");
|
Object.DeathNote = GetOptional<bool>("system.deathNote");
|
||||||
|
*/
|
||||||
JObject extra = new()
|
JObject extra = new()
|
||||||
{
|
{
|
||||||
{ "selfEffect", Input.SelectToken("system.selfEffect") }
|
{ "selfEffect", Input.SelectToken("system.selfEffect") }
|
||||||
|
|||||||
+2
-2
@@ -1,6 +1,6 @@
|
|||||||
using Newtonsoft.Json.Linq;
|
using Newtonsoft.Json.Linq;
|
||||||
using Pf2eDataScrapper.Model.Enum;
|
using Pf2eModel.Model.Enum;
|
||||||
using Pf2eDataScrapper.Model.Structure;
|
using Pf2eModel.Model.Structure;
|
||||||
|
|
||||||
namespace Pf2eDataScrapper.Importers.Implementations.Pf2eFoundry.DataBuilder.Processors;
|
namespace Pf2eDataScrapper.Importers.Implementations.Pf2eFoundry.DataBuilder.Processors;
|
||||||
|
|
||||||
|
|||||||
-2054
File diff suppressed because it is too large
Load Diff
File diff suppressed because it is too large
Load Diff
File diff suppressed because it is too large
Load Diff
@@ -1,106 +0,0 @@
|
|||||||
using Microsoft.EntityFrameworkCore.Migrations;
|
|
||||||
|
|
||||||
#nullable disable
|
|
||||||
|
|
||||||
namespace Pf2eDataScrapper.Migrations
|
|
||||||
{
|
|
||||||
/// <inheritdoc />
|
|
||||||
public partial class EnumUpdate : Migration
|
|
||||||
{
|
|
||||||
/// <inheritdoc />
|
|
||||||
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");
|
|
||||||
}
|
|
||||||
|
|
||||||
/// <inheritdoc />
|
|
||||||
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");
|
|
||||||
}
|
|
||||||
}
|
|
||||||
}
|
|
||||||
File diff suppressed because it is too large
Load Diff
@@ -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,
|
|
||||||
}
|
|
||||||
@@ -1,11 +0,0 @@
|
|||||||
using Pf2eDataScrapper.Model.Base;
|
|
||||||
|
|
||||||
namespace Pf2eDataScrapper.Model;
|
|
||||||
|
|
||||||
internal interface IEntity
|
|
||||||
{
|
|
||||||
public int Id { get; set; }
|
|
||||||
|
|
||||||
public Entity Entity { get; set; }
|
|
||||||
|
|
||||||
}
|
|
||||||
@@ -24,6 +24,10 @@
|
|||||||
<PackageReference Include="Slugify.Core" Version="5.1.1" />
|
<PackageReference Include="Slugify.Core" Version="5.1.1" />
|
||||||
</ItemGroup>
|
</ItemGroup>
|
||||||
|
|
||||||
|
<ItemGroup>
|
||||||
|
<ProjectReference Include="..\Pf2eModel\Pf2eModel.csproj" />
|
||||||
|
</ItemGroup>
|
||||||
|
|
||||||
<ItemGroup>
|
<ItemGroup>
|
||||||
<None Update=".env">
|
<None Update=".env">
|
||||||
<CopyToOutputDirectory>Always</CopyToOutputDirectory>
|
<CopyToOutputDirectory>Always</CopyToOutputDirectory>
|
||||||
@@ -33,8 +37,4 @@
|
|||||||
</None>
|
</None>
|
||||||
</ItemGroup>
|
</ItemGroup>
|
||||||
|
|
||||||
<ItemGroup>
|
|
||||||
<Folder Include="Migrations\" />
|
|
||||||
</ItemGroup>
|
|
||||||
|
|
||||||
</Project>
|
</Project>
|
||||||
|
|||||||
@@ -1,6 +1,8 @@
|
|||||||
using Pf2eDataScrapper;
|
using Pf2eDataScrapper;
|
||||||
using Pf2eDataScrapper.Importers.Implementations.Aonprd;
|
using Pf2eDataScrapper.Importers.Implementations.Aonprd;
|
||||||
|
|
||||||
|
Console.SetWindowSize(Console.LargestWindowWidth - 20, Console.LargestWindowHeight - 10);
|
||||||
|
|
||||||
EnvSettings.Load();
|
EnvSettings.Load();
|
||||||
|
|
||||||
/*
|
/*
|
||||||
|
|||||||
+3
-3
@@ -5,12 +5,12 @@ using Microsoft.EntityFrameworkCore.Infrastructure;
|
|||||||
using Microsoft.EntityFrameworkCore.Migrations;
|
using Microsoft.EntityFrameworkCore.Migrations;
|
||||||
using Microsoft.EntityFrameworkCore.Storage.ValueConversion;
|
using Microsoft.EntityFrameworkCore.Storage.ValueConversion;
|
||||||
using Npgsql.EntityFrameworkCore.PostgreSQL.Metadata;
|
using Npgsql.EntityFrameworkCore.PostgreSQL.Metadata;
|
||||||
using Pf2eDataScrapper.Model;
|
using Pf2eModel.Model;
|
||||||
using Pf2eDataScrapper.Model.Enum;
|
using Pf2eModel.Model.Enum;
|
||||||
|
|
||||||
#nullable disable
|
#nullable disable
|
||||||
|
|
||||||
namespace Pf2eDataScrapper.Migrations
|
namespace Pf2eModel.Migrations
|
||||||
{
|
{
|
||||||
[DbContext(typeof(Pf2eDbContext))]
|
[DbContext(typeof(Pf2eDbContext))]
|
||||||
[Migration("20250418062358_Function")]
|
[Migration("20250418062358_Function")]
|
||||||
+1
-1
@@ -2,7 +2,7 @@
|
|||||||
|
|
||||||
#nullable disable
|
#nullable disable
|
||||||
|
|
||||||
namespace Pf2eDataScrapper.Migrations
|
namespace Pf2eModel.Migrations
|
||||||
{
|
{
|
||||||
/// <inheritdoc />
|
/// <inheritdoc />
|
||||||
public partial class Function : Migration
|
public partial class Function : Migration
|
||||||
@@ -1,13 +1,13 @@
|
|||||||
using Microsoft.EntityFrameworkCore;
|
using Microsoft.EntityFrameworkCore;
|
||||||
using Pf2eDataScrapper.Model.Base.Keywords;
|
using Pf2eModel.Model.Base.Keywords;
|
||||||
using Pf2eDataScrapper.Model.Base.Source;
|
using Pf2eModel.Model.Base.Source;
|
||||||
using Pf2eDataScrapper.Model.Base.Targets;
|
using Pf2eModel.Model.Base.Targets;
|
||||||
using Pf2eDataScrapper.Model.Enum;
|
using Pf2eModel.Model.Enum;
|
||||||
using Pf2eDataScrapper.Model.Structure;
|
using Pf2eModel.Model.Structure;
|
||||||
using System.ComponentModel.DataAnnotations;
|
using System.ComponentModel.DataAnnotations;
|
||||||
using System.ComponentModel.DataAnnotations.Schema;
|
using System.ComponentModel.DataAnnotations.Schema;
|
||||||
|
|
||||||
namespace Pf2eDataScrapper.Model.Base;
|
namespace Pf2eModel.Model.Base;
|
||||||
|
|
||||||
public class Entity
|
public class Entity
|
||||||
{
|
{
|
||||||
@@ -1,9 +1,9 @@
|
|||||||
using Microsoft.EntityFrameworkCore;
|
using Microsoft.EntityFrameworkCore;
|
||||||
using Pf2eDataScrapper.Model.Enum;
|
using Pf2eModel.Model.Enum;
|
||||||
using System.ComponentModel.DataAnnotations;
|
using System.ComponentModel.DataAnnotations;
|
||||||
using System.ComponentModel.DataAnnotations.Schema;
|
using System.ComponentModel.DataAnnotations.Schema;
|
||||||
|
|
||||||
namespace Pf2eDataScrapper.Model.Base;
|
namespace Pf2eModel.Model.Base;
|
||||||
|
|
||||||
[PrimaryKey(nameof(EntityId), nameof(Type))]
|
[PrimaryKey(nameof(EntityId), nameof(Type))]
|
||||||
public partial class EntityAlias
|
public partial class EntityAlias
|
||||||
+1
-1
@@ -1,7 +1,7 @@
|
|||||||
using System.ComponentModel.DataAnnotations;
|
using System.ComponentModel.DataAnnotations;
|
||||||
using System.ComponentModel.DataAnnotations.Schema;
|
using System.ComponentModel.DataAnnotations.Schema;
|
||||||
|
|
||||||
namespace Pf2eDataScrapper.Model.Base.Keywords;
|
namespace Pf2eModel.Model.Base.Keywords;
|
||||||
|
|
||||||
public partial class Keyword
|
public partial class Keyword
|
||||||
{
|
{
|
||||||
+1
-1
@@ -1,7 +1,7 @@
|
|||||||
using System.ComponentModel.DataAnnotations;
|
using System.ComponentModel.DataAnnotations;
|
||||||
using System.ComponentModel.DataAnnotations.Schema;
|
using System.ComponentModel.DataAnnotations.Schema;
|
||||||
|
|
||||||
namespace Pf2eDataScrapper.Model.Base.Keywords;
|
namespace Pf2eModel.Model.Base.Keywords;
|
||||||
|
|
||||||
public partial class KeywordAlias
|
public partial class KeywordAlias
|
||||||
{
|
{
|
||||||
+1
-1
@@ -2,7 +2,7 @@
|
|||||||
using System.ComponentModel.DataAnnotations;
|
using System.ComponentModel.DataAnnotations;
|
||||||
using System.ComponentModel.DataAnnotations.Schema;
|
using System.ComponentModel.DataAnnotations.Schema;
|
||||||
|
|
||||||
namespace Pf2eDataScrapper.Model.Base.Source;
|
namespace Pf2eModel.Model.Base.Source;
|
||||||
|
|
||||||
[PrimaryKey(nameof(EntityId), nameof(SourceId))]
|
[PrimaryKey(nameof(EntityId), nameof(SourceId))]
|
||||||
public partial class EntitySource
|
public partial class EntitySource
|
||||||
+2
-2
@@ -1,8 +1,8 @@
|
|||||||
using Pf2eDataScrapper.Model.Enum;
|
using Pf2eModel.Model.Enum;
|
||||||
using System.ComponentModel.DataAnnotations;
|
using System.ComponentModel.DataAnnotations;
|
||||||
using System.ComponentModel.DataAnnotations.Schema;
|
using System.ComponentModel.DataAnnotations.Schema;
|
||||||
|
|
||||||
namespace Pf2eDataScrapper.Model.Base.Source;
|
namespace Pf2eModel.Model.Base.Source;
|
||||||
|
|
||||||
public partial class Source
|
public partial class Source
|
||||||
{
|
{
|
||||||
+1
-1
@@ -2,7 +2,7 @@
|
|||||||
using System.ComponentModel.DataAnnotations;
|
using System.ComponentModel.DataAnnotations;
|
||||||
using System.ComponentModel.DataAnnotations.Schema;
|
using System.ComponentModel.DataAnnotations.Schema;
|
||||||
|
|
||||||
namespace Pf2eDataScrapper.Model.Base.Targets;
|
namespace Pf2eModel.Model.Base.Targets;
|
||||||
|
|
||||||
[PrimaryKey(nameof(EntityId), nameof(TargetId))]
|
[PrimaryKey(nameof(EntityId), nameof(TargetId))]
|
||||||
public partial class EntityExternal
|
public partial class EntityExternal
|
||||||
+1
-1
@@ -1,7 +1,7 @@
|
|||||||
using System.ComponentModel.DataAnnotations;
|
using System.ComponentModel.DataAnnotations;
|
||||||
using System.ComponentModel.DataAnnotations.Schema;
|
using System.ComponentModel.DataAnnotations.Schema;
|
||||||
|
|
||||||
namespace Pf2eDataScrapper.Model.Base.Targets;
|
namespace Pf2eModel.Model.Base.Targets;
|
||||||
|
|
||||||
public partial class ExternalTarget
|
public partial class ExternalTarget
|
||||||
{
|
{
|
||||||
@@ -1,7 +1,7 @@
|
|||||||
using System.ComponentModel.DataAnnotations;
|
using System.ComponentModel.DataAnnotations;
|
||||||
using System.ComponentModel.DataAnnotations.Schema;
|
using System.ComponentModel.DataAnnotations.Schema;
|
||||||
|
|
||||||
namespace Pf2eDataScrapper.Model.Common;
|
namespace Pf2eModel.Model.Common;
|
||||||
|
|
||||||
public partial class Frequency
|
public partial class Frequency
|
||||||
{
|
{
|
||||||
@@ -1,8 +1,8 @@
|
|||||||
using Pf2eDataScrapper.Model.Enum;
|
using Pf2eModel.Model.Enum;
|
||||||
using System.ComponentModel.DataAnnotations;
|
using System.ComponentModel.DataAnnotations;
|
||||||
using System.ComponentModel.DataAnnotations.Schema;
|
using System.ComponentModel.DataAnnotations.Schema;
|
||||||
|
|
||||||
namespace Pf2eDataScrapper.Model.Common;
|
namespace Pf2eModel.Model.Common;
|
||||||
|
|
||||||
public partial class Language
|
public partial class Language
|
||||||
{
|
{
|
||||||
@@ -1,7 +1,7 @@
|
|||||||
using System.ComponentModel.DataAnnotations;
|
using System.ComponentModel.DataAnnotations;
|
||||||
using System.ComponentModel.DataAnnotations.Schema;
|
using System.ComponentModel.DataAnnotations.Schema;
|
||||||
|
|
||||||
namespace Pf2eDataScrapper.Model.Common;
|
namespace Pf2eModel.Model.Common;
|
||||||
|
|
||||||
public partial class Training
|
public partial class Training
|
||||||
{
|
{
|
||||||
+1
-1
@@ -1,6 +1,6 @@
|
|||||||
using NpgsqlTypes;
|
using NpgsqlTypes;
|
||||||
|
|
||||||
namespace Pf2eDataScrapper.Model.Enum;
|
namespace Pf2eModel.Model.Enum;
|
||||||
|
|
||||||
public enum ActionCategory
|
public enum ActionCategory
|
||||||
{
|
{
|
||||||
@@ -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,
|
||||||
|
}
|
||||||
@@ -1,6 +1,6 @@
|
|||||||
using NpgsqlTypes;
|
using NpgsqlTypes;
|
||||||
|
|
||||||
namespace Pf2eDataScrapper.Model.Enum;
|
namespace Pf2eModel.Model.Enum;
|
||||||
|
|
||||||
public enum AliasType
|
public enum AliasType
|
||||||
{
|
{
|
||||||
+1
-1
@@ -1,6 +1,6 @@
|
|||||||
using NpgsqlTypes;
|
using NpgsqlTypes;
|
||||||
|
|
||||||
namespace Pf2eDataScrapper.Model.Enum;
|
namespace Pf2eModel.Model.Enum;
|
||||||
|
|
||||||
public enum AncestryVision
|
public enum AncestryVision
|
||||||
{
|
{
|
||||||
+1
-1
@@ -1,6 +1,6 @@
|
|||||||
using NpgsqlTypes;
|
using NpgsqlTypes;
|
||||||
|
|
||||||
namespace Pf2eDataScrapper.Model.Enum;
|
namespace Pf2eModel.Model.Enum;
|
||||||
|
|
||||||
public enum AttributeValues
|
public enum AttributeValues
|
||||||
{
|
{
|
||||||
+1
-1
@@ -1,6 +1,6 @@
|
|||||||
using NpgsqlTypes;
|
using NpgsqlTypes;
|
||||||
|
|
||||||
namespace Pf2eDataScrapper.Model.Enum;
|
namespace Pf2eModel.Model.Enum;
|
||||||
|
|
||||||
public enum ClassProgressionType
|
public enum ClassProgressionType
|
||||||
{
|
{
|
||||||
+1
-1
@@ -1,6 +1,6 @@
|
|||||||
using NpgsqlTypes;
|
using NpgsqlTypes;
|
||||||
|
|
||||||
namespace Pf2eDataScrapper.Model.Enum;
|
namespace Pf2eModel.Model.Enum;
|
||||||
|
|
||||||
|
|
||||||
public enum ConditionGroup
|
public enum ConditionGroup
|
||||||
+1
-1
@@ -1,6 +1,6 @@
|
|||||||
using NpgsqlTypes;
|
using NpgsqlTypes;
|
||||||
|
|
||||||
namespace Pf2eDataScrapper.Model.Enum;
|
namespace Pf2eModel.Model.Enum;
|
||||||
|
|
||||||
public enum DeityCategory
|
public enum DeityCategory
|
||||||
{
|
{
|
||||||
@@ -1,6 +1,6 @@
|
|||||||
using NpgsqlTypes;
|
using NpgsqlTypes;
|
||||||
|
|
||||||
namespace Pf2eDataScrapper.Model.Enum;
|
namespace Pf2eModel.Model.Enum;
|
||||||
|
|
||||||
public enum DeityFonts
|
public enum DeityFonts
|
||||||
{
|
{
|
||||||
+1
-1
@@ -1,6 +1,6 @@
|
|||||||
using NpgsqlTypes;
|
using NpgsqlTypes;
|
||||||
|
|
||||||
namespace Pf2eDataScrapper.Model.Enum;
|
namespace Pf2eModel.Model.Enum;
|
||||||
|
|
||||||
public enum DeitySanctification
|
public enum DeitySanctification
|
||||||
{
|
{
|
||||||
@@ -1,6 +1,6 @@
|
|||||||
using NpgsqlTypes;
|
using NpgsqlTypes;
|
||||||
|
|
||||||
namespace Pf2eDataScrapper.Model.Enum;
|
namespace Pf2eModel.Model.Enum;
|
||||||
|
|
||||||
public enum EntityRarity
|
public enum EntityRarity
|
||||||
{
|
{
|
||||||
@@ -1,6 +1,6 @@
|
|||||||
using NpgsqlTypes;
|
using NpgsqlTypes;
|
||||||
|
|
||||||
namespace Pf2eDataScrapper.Model.Enum;
|
namespace Pf2eModel.Model.Enum;
|
||||||
|
|
||||||
public enum EntityType
|
public enum EntityType
|
||||||
{
|
{
|
||||||
+1
-1
@@ -1,6 +1,6 @@
|
|||||||
using NpgsqlTypes;
|
using NpgsqlTypes;
|
||||||
|
|
||||||
namespace Pf2eDataScrapper.Model.Enum;
|
namespace Pf2eModel.Model.Enum;
|
||||||
|
|
||||||
public enum FeatActionType
|
public enum FeatActionType
|
||||||
{
|
{
|
||||||
@@ -1,6 +1,6 @@
|
|||||||
using NpgsqlTypes;
|
using NpgsqlTypes;
|
||||||
|
|
||||||
namespace Pf2eDataScrapper.Model.Enum;
|
namespace Pf2eModel.Model.Enum;
|
||||||
|
|
||||||
public enum FeatCategory
|
public enum FeatCategory
|
||||||
{
|
{
|
||||||
@@ -1,6 +1,6 @@
|
|||||||
using NpgsqlTypes;
|
using NpgsqlTypes;
|
||||||
|
|
||||||
namespace Pf2eDataScrapper.Model.Enum;
|
namespace Pf2eModel.Model.Enum;
|
||||||
|
|
||||||
public enum Size
|
public enum Size
|
||||||
{
|
{
|
||||||
+1
-9
@@ -1,34 +1,26 @@
|
|||||||
using NpgsqlTypes;
|
using NpgsqlTypes;
|
||||||
using Pf2eDataScrapper.Importers.Implementations.Aonprd.DataBuilder;
|
|
||||||
|
|
||||||
namespace Pf2eDataScrapper.Model.Enum;
|
namespace Pf2eModel.Model.Enum;
|
||||||
public enum SourceCategory
|
public enum SourceCategory
|
||||||
{
|
{
|
||||||
[PgName("rulebook")]
|
[PgName("rulebook")]
|
||||||
[AonprdEnum("Rulebooks")]
|
|
||||||
Rulebooks,
|
Rulebooks,
|
||||||
|
|
||||||
[PgName("adventure-path")]
|
[PgName("adventure-path")]
|
||||||
[AonprdEnum("Adventure Paths")]
|
|
||||||
AdventurePaths,
|
AdventurePaths,
|
||||||
|
|
||||||
[PgName("lost-omens")]
|
[PgName("lost-omens")]
|
||||||
[AonprdEnum("Lost Omens")]
|
|
||||||
LostOmens,
|
LostOmens,
|
||||||
|
|
||||||
[PgName("adventures")]
|
[PgName("adventures")]
|
||||||
[AonprdEnum("Adventures")]
|
|
||||||
Adventures,
|
Adventures,
|
||||||
|
|
||||||
[PgName("comics")]
|
[PgName("comics")]
|
||||||
[AonprdEnum("Comics")]
|
|
||||||
Comics,
|
Comics,
|
||||||
|
|
||||||
[PgName("blog-posts")]
|
[PgName("blog-posts")]
|
||||||
[AonprdEnum("Blog Posts")]
|
|
||||||
BlogPosts,
|
BlogPosts,
|
||||||
|
|
||||||
[PgName("society")]
|
[PgName("society")]
|
||||||
[AonprdEnum("Society")]
|
|
||||||
Society,
|
Society,
|
||||||
}
|
}
|
||||||
+1
-1
@@ -1,6 +1,6 @@
|
|||||||
using NpgsqlTypes;
|
using NpgsqlTypes;
|
||||||
|
|
||||||
namespace Pf2eDataScrapper.Model.Enum;
|
namespace Pf2eModel.Model.Enum;
|
||||||
|
|
||||||
public enum SpellAreaType
|
public enum SpellAreaType
|
||||||
{
|
{
|
||||||
+1
-1
@@ -1,6 +1,6 @@
|
|||||||
using NpgsqlTypes;
|
using NpgsqlTypes;
|
||||||
|
|
||||||
namespace Pf2eDataScrapper.Model.Enum;
|
namespace Pf2eModel.Model.Enum;
|
||||||
|
|
||||||
public enum SpellDamageCategory
|
public enum SpellDamageCategory
|
||||||
{
|
{
|
||||||
+1
-1
@@ -1,6 +1,6 @@
|
|||||||
using NpgsqlTypes;
|
using NpgsqlTypes;
|
||||||
|
|
||||||
namespace Pf2eDataScrapper.Model.Enum;
|
namespace Pf2eModel.Model.Enum;
|
||||||
|
|
||||||
public enum SpellDamageKinds
|
public enum SpellDamageKinds
|
||||||
{
|
{
|
||||||
+1
-1
@@ -1,4 +1,4 @@
|
|||||||
namespace Pf2eDataScrapper.Model.Enum;
|
namespace Pf2eModel.Model.Enum;
|
||||||
public enum TrainingStage
|
public enum TrainingStage
|
||||||
{
|
{
|
||||||
Untrained = 0,
|
Untrained = 0,
|
||||||
@@ -1,6 +1,6 @@
|
|||||||
using NpgsqlTypes;
|
using NpgsqlTypes;
|
||||||
|
|
||||||
namespace Pf2eDataScrapper.Model.Enum;
|
namespace Pf2eModel.Model.Enum;
|
||||||
|
|
||||||
public enum TraitType
|
public enum TraitType
|
||||||
{
|
{
|
||||||
@@ -0,0 +1,11 @@
|
|||||||
|
using Pf2eModel.Model.Base;
|
||||||
|
|
||||||
|
namespace Pf2eModel.Model;
|
||||||
|
|
||||||
|
public interface IEntity
|
||||||
|
{
|
||||||
|
public int Id { get; set; }
|
||||||
|
|
||||||
|
public Entity Entity { get; set; }
|
||||||
|
|
||||||
|
}
|
||||||
@@ -1,19 +1,21 @@
|
|||||||
using Microsoft.EntityFrameworkCore;
|
using dotenv.net;
|
||||||
using Pf2eDataScrapper.Model.Base;
|
using dotenv.net.Utilities;
|
||||||
using Pf2eDataScrapper.Model.Base.Keywords;
|
using Microsoft.EntityFrameworkCore;
|
||||||
using Pf2eDataScrapper.Model.Base.Source;
|
using Pf2eModel.Model.Base;
|
||||||
using Pf2eDataScrapper.Model.Base.Targets;
|
using Pf2eModel.Model.Base.Keywords;
|
||||||
using Pf2eDataScrapper.Model.Common;
|
using Pf2eModel.Model.Base.Source;
|
||||||
using Pf2eDataScrapper.Model.Enum;
|
using Pf2eModel.Model.Base.Targets;
|
||||||
using Pf2eDataScrapper.Model.Structure;
|
using Pf2eModel.Model.Common;
|
||||||
using Pf2eDataScrapper.Model.Structure.AncestryRelation;
|
using Pf2eModel.Model.Enum;
|
||||||
using Pf2eDataScrapper.Model.Structure.BackgroundRelation;
|
using Pf2eModel.Model.Structure;
|
||||||
using Pf2eDataScrapper.Model.Structure.ClassRelation;
|
using Pf2eModel.Model.Structure.AncestryRelation;
|
||||||
using Pf2eDataScrapper.Model.Structure.DeityRelation;
|
using Pf2eModel.Model.Structure.BackgroundRelation;
|
||||||
using Pf2eDataScrapper.Model.Structure.FeatRelation;
|
using Pf2eModel.Model.Structure.ClassRelation;
|
||||||
using Pf2eDataScrapper.Model.Structure.SpellRelation;
|
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
|
public partial class Pf2eDbContext : DbContext
|
||||||
{
|
{
|
||||||
@@ -110,10 +112,11 @@ public partial class Pf2eDbContext : DbContext
|
|||||||
|
|
||||||
protected override void OnConfiguring(DbContextOptionsBuilder optionsBuilder)
|
protected override void OnConfiguring(DbContextOptionsBuilder optionsBuilder)
|
||||||
{
|
{
|
||||||
EnvSettings.Load();
|
DotEnv.Load();
|
||||||
|
|
||||||
// optionsBuilder.LogTo(Console.WriteLine);
|
// optionsBuilder.LogTo(Console.WriteLine);
|
||||||
optionsBuilder.UseSnakeCaseNamingConvention();
|
optionsBuilder.UseSnakeCaseNamingConvention();
|
||||||
optionsBuilder.UseNpgsql(EnvSettings.DatabaseConnection,
|
optionsBuilder.UseNpgsql(EnvReader.GetStringValue("DATABASE_CONNECTION"),
|
||||||
builder =>
|
builder =>
|
||||||
{
|
{
|
||||||
builder
|
builder
|
||||||
+14
-14
@@ -1,22 +1,22 @@
|
|||||||
using LinqToDB.Common;
|
using LinqToDB.Common;
|
||||||
using Microsoft.EntityFrameworkCore;
|
using Microsoft.EntityFrameworkCore;
|
||||||
using Microsoft.EntityFrameworkCore.Metadata.Builders;
|
using Microsoft.EntityFrameworkCore.Metadata.Builders;
|
||||||
using Pf2eDataScrapper.Model.Base;
|
using Pf2eModel.Model.Base;
|
||||||
using Pf2eDataScrapper.Model.Base.Keywords;
|
using Pf2eModel.Model.Base.Keywords;
|
||||||
using Pf2eDataScrapper.Model.Base.Source;
|
using Pf2eModel.Model.Base.Source;
|
||||||
using Pf2eDataScrapper.Model.Base.Targets;
|
using Pf2eModel.Model.Base.Targets;
|
||||||
using Pf2eDataScrapper.Model.Common;
|
using Pf2eModel.Model.Common;
|
||||||
using Pf2eDataScrapper.Model.Enum;
|
using Pf2eModel.Model.Enum;
|
||||||
using Pf2eDataScrapper.Model.Structure;
|
using Pf2eModel.Model.Structure;
|
||||||
using Pf2eDataScrapper.Model.Structure.AncestryRelation;
|
using Pf2eModel.Model.Structure.AncestryRelation;
|
||||||
using Pf2eDataScrapper.Model.Structure.BackgroundRelation;
|
using Pf2eModel.Model.Structure.BackgroundRelation;
|
||||||
using Pf2eDataScrapper.Model.Structure.ClassRelation;
|
using Pf2eModel.Model.Structure.ClassRelation;
|
||||||
using Pf2eDataScrapper.Model.Structure.DeityRelation;
|
using Pf2eModel.Model.Structure.DeityRelation;
|
||||||
using Pf2eDataScrapper.Model.Structure.FeatRelation;
|
using Pf2eModel.Model.Structure.FeatRelation;
|
||||||
using Pf2eDataScrapper.Model.Structure.SpellRelation;
|
using Pf2eModel.Model.Structure.SpellRelation;
|
||||||
using System.Reflection;
|
using System.Reflection;
|
||||||
|
|
||||||
namespace Pf2eDataScrapper.Model;
|
namespace Pf2eModel.Model;
|
||||||
|
|
||||||
public partial class Pf2eDbContext
|
public partial class Pf2eDbContext
|
||||||
{
|
{
|
||||||
@@ -1,8 +1,8 @@
|
|||||||
using Pf2eDataScrapper.Model.Base;
|
using Pf2eModel.Model.Base;
|
||||||
using Pf2eDataScrapper.Model.Enum;
|
using Pf2eModel.Model.Enum;
|
||||||
using System.ComponentModel.DataAnnotations.Schema;
|
using System.ComponentModel.DataAnnotations.Schema;
|
||||||
|
|
||||||
namespace Pf2eDataScrapper.Model.Structure;
|
namespace Pf2eModel.Model.Structure;
|
||||||
|
|
||||||
public partial class Action : IEntity
|
public partial class Action : IEntity
|
||||||
{
|
{
|
||||||
+4
-4
@@ -1,9 +1,9 @@
|
|||||||
using Pf2eDataScrapper.Model.Base;
|
using Pf2eModel.Model.Base;
|
||||||
using Pf2eDataScrapper.Model.Enum;
|
using Pf2eModel.Model.Enum;
|
||||||
using Pf2eDataScrapper.Model.Structure.AncestryRelation;
|
using Pf2eModel.Model.Structure.AncestryRelation;
|
||||||
using System.ComponentModel.DataAnnotations.Schema;
|
using System.ComponentModel.DataAnnotations.Schema;
|
||||||
|
|
||||||
namespace Pf2eDataScrapper.Model.Structure;
|
namespace Pf2eModel.Model.Structure;
|
||||||
|
|
||||||
public partial class Ancestry : IEntity
|
public partial class Ancestry : IEntity
|
||||||
{
|
{
|
||||||
+1
-1
@@ -1,7 +1,7 @@
|
|||||||
using System.ComponentModel.DataAnnotations;
|
using System.ComponentModel.DataAnnotations;
|
||||||
using System.ComponentModel.DataAnnotations.Schema;
|
using System.ComponentModel.DataAnnotations.Schema;
|
||||||
|
|
||||||
namespace Pf2eDataScrapper.Model.Structure.AncestryRelation;
|
namespace Pf2eModel.Model.Structure.AncestryRelation;
|
||||||
|
|
||||||
public partial class AncestryBoost
|
public partial class AncestryBoost
|
||||||
{
|
{
|
||||||
+2
-2
@@ -1,8 +1,8 @@
|
|||||||
using Microsoft.EntityFrameworkCore;
|
using Microsoft.EntityFrameworkCore;
|
||||||
using Pf2eDataScrapper.Model.Base;
|
using Pf2eModel.Model.Base;
|
||||||
using System.ComponentModel.DataAnnotations.Schema;
|
using System.ComponentModel.DataAnnotations.Schema;
|
||||||
|
|
||||||
namespace Pf2eDataScrapper.Model.Structure.AncestryRelation;
|
namespace Pf2eModel.Model.Structure.AncestryRelation;
|
||||||
|
|
||||||
[PrimaryKey(nameof(AncestryId), nameof(ItemId))]
|
[PrimaryKey(nameof(AncestryId), nameof(ItemId))]
|
||||||
public partial class AncestryItem
|
public partial class AncestryItem
|
||||||
+2
-2
@@ -1,8 +1,8 @@
|
|||||||
using Microsoft.EntityFrameworkCore;
|
using Microsoft.EntityFrameworkCore;
|
||||||
using Pf2eDataScrapper.Model.Common;
|
using Pf2eModel.Model.Common;
|
||||||
using System.ComponentModel.DataAnnotations.Schema;
|
using System.ComponentModel.DataAnnotations.Schema;
|
||||||
|
|
||||||
namespace Pf2eDataScrapper.Model.Structure.AncestryRelation;
|
namespace Pf2eModel.Model.Structure.AncestryRelation;
|
||||||
|
|
||||||
[PrimaryKey(nameof(AncestryId), nameof(LanguageId))]
|
[PrimaryKey(nameof(AncestryId), nameof(LanguageId))]
|
||||||
public partial class AncestryLanguage
|
public partial class AncestryLanguage
|
||||||
+3
-3
@@ -1,9 +1,9 @@
|
|||||||
using Pf2eDataScrapper.Model.Base;
|
using Pf2eModel.Model.Base;
|
||||||
using Pf2eDataScrapper.Model.Structure.BackgroundRelation;
|
using Pf2eModel.Model.Structure.BackgroundRelation;
|
||||||
using System.ComponentModel.DataAnnotations;
|
using System.ComponentModel.DataAnnotations;
|
||||||
using System.ComponentModel.DataAnnotations.Schema;
|
using System.ComponentModel.DataAnnotations.Schema;
|
||||||
|
|
||||||
namespace Pf2eDataScrapper.Model.Structure;
|
namespace Pf2eModel.Model.Structure;
|
||||||
|
|
||||||
public partial class Background : IEntity
|
public partial class Background : IEntity
|
||||||
{
|
{
|
||||||
+2
-2
@@ -1,8 +1,8 @@
|
|||||||
using Pf2eDataScrapper.Model.Enum;
|
using Pf2eModel.Model.Enum;
|
||||||
using System.ComponentModel.DataAnnotations;
|
using System.ComponentModel.DataAnnotations;
|
||||||
using System.ComponentModel.DataAnnotations.Schema;
|
using System.ComponentModel.DataAnnotations.Schema;
|
||||||
|
|
||||||
namespace Pf2eDataScrapper.Model.Structure.BackgroundRelation;
|
namespace Pf2eModel.Model.Structure.BackgroundRelation;
|
||||||
|
|
||||||
public partial class BackgroundBoost
|
public partial class BackgroundBoost
|
||||||
{
|
{
|
||||||
+2
-2
@@ -1,8 +1,8 @@
|
|||||||
using Microsoft.EntityFrameworkCore;
|
using Microsoft.EntityFrameworkCore;
|
||||||
using Pf2eDataScrapper.Model.Base;
|
using Pf2eModel.Model.Base;
|
||||||
using System.ComponentModel.DataAnnotations.Schema;
|
using System.ComponentModel.DataAnnotations.Schema;
|
||||||
|
|
||||||
namespace Pf2eDataScrapper.Model.Structure.BackgroundRelation;
|
namespace Pf2eModel.Model.Structure.BackgroundRelation;
|
||||||
|
|
||||||
[PrimaryKey(nameof(BackgroundId), nameof(EntityId))]
|
[PrimaryKey(nameof(BackgroundId), nameof(EntityId))]
|
||||||
public partial class BackgroundItem
|
public partial class BackgroundItem
|
||||||
+3
-3
@@ -1,9 +1,9 @@
|
|||||||
using Pf2eDataScrapper.Model.Common;
|
using Pf2eModel.Model.Common;
|
||||||
using Pf2eDataScrapper.Model.Enum;
|
using Pf2eModel.Model.Enum;
|
||||||
using System.ComponentModel.DataAnnotations;
|
using System.ComponentModel.DataAnnotations;
|
||||||
using System.ComponentModel.DataAnnotations.Schema;
|
using System.ComponentModel.DataAnnotations.Schema;
|
||||||
|
|
||||||
namespace Pf2eDataScrapper.Model.Structure.BackgroundRelation;
|
namespace Pf2eModel.Model.Structure.BackgroundRelation;
|
||||||
|
|
||||||
public partial class BackgroundTraining
|
public partial class BackgroundTraining
|
||||||
{
|
{
|
||||||
@@ -1,9 +1,9 @@
|
|||||||
using Pf2eDataScrapper.Model.Base;
|
using Pf2eModel.Model.Base;
|
||||||
using Pf2eDataScrapper.Model.Structure.ClassRelation;
|
using Pf2eModel.Model.Structure.ClassRelation;
|
||||||
using System.ComponentModel.DataAnnotations;
|
using System.ComponentModel.DataAnnotations;
|
||||||
using System.ComponentModel.DataAnnotations.Schema;
|
using System.ComponentModel.DataAnnotations.Schema;
|
||||||
|
|
||||||
namespace Pf2eDataScrapper.Model.Structure;
|
namespace Pf2eModel.Model.Structure;
|
||||||
|
|
||||||
public partial class Class : IEntity
|
public partial class Class : IEntity
|
||||||
{
|
{
|
||||||
+2
-2
@@ -1,8 +1,8 @@
|
|||||||
using Pf2eDataScrapper.Model.Enum;
|
using Pf2eModel.Model.Enum;
|
||||||
using System.ComponentModel.DataAnnotations;
|
using System.ComponentModel.DataAnnotations;
|
||||||
using System.ComponentModel.DataAnnotations.Schema;
|
using System.ComponentModel.DataAnnotations.Schema;
|
||||||
|
|
||||||
namespace Pf2eDataScrapper.Model.Structure.ClassRelation;
|
namespace Pf2eModel.Model.Structure.ClassRelation;
|
||||||
|
|
||||||
public partial class ClassKeyAbility
|
public partial class ClassKeyAbility
|
||||||
{
|
{
|
||||||
+3
-3
@@ -1,9 +1,9 @@
|
|||||||
using Pf2eDataScrapper.Model.Base;
|
using Pf2eModel.Model.Base;
|
||||||
using Pf2eDataScrapper.Model.Enum;
|
using Pf2eModel.Model.Enum;
|
||||||
using System.ComponentModel.DataAnnotations;
|
using System.ComponentModel.DataAnnotations;
|
||||||
using System.ComponentModel.DataAnnotations.Schema;
|
using System.ComponentModel.DataAnnotations.Schema;
|
||||||
|
|
||||||
namespace Pf2eDataScrapper.Model.Structure.ClassRelation;
|
namespace Pf2eModel.Model.Structure.ClassRelation;
|
||||||
public partial class ClassProgression
|
public partial class ClassProgression
|
||||||
{
|
{
|
||||||
[Key]
|
[Key]
|
||||||
+2
-2
@@ -1,8 +1,8 @@
|
|||||||
using Pf2eDataScrapper.Model.Common;
|
using Pf2eModel.Model.Common;
|
||||||
using System.ComponentModel.DataAnnotations;
|
using System.ComponentModel.DataAnnotations;
|
||||||
using System.ComponentModel.DataAnnotations.Schema;
|
using System.ComponentModel.DataAnnotations.Schema;
|
||||||
|
|
||||||
namespace Pf2eDataScrapper.Model.Structure.ClassRelation;
|
namespace Pf2eModel.Model.Structure.ClassRelation;
|
||||||
|
|
||||||
public partial class ClassTraining
|
public partial class ClassTraining
|
||||||
{
|
{
|
||||||
+3
-3
@@ -1,9 +1,9 @@
|
|||||||
using Pf2eDataScrapper.Model.Base;
|
using Pf2eModel.Model.Base;
|
||||||
using Pf2eDataScrapper.Model.Enum;
|
using Pf2eModel.Model.Enum;
|
||||||
using System.ComponentModel.DataAnnotations;
|
using System.ComponentModel.DataAnnotations;
|
||||||
using System.ComponentModel.DataAnnotations.Schema;
|
using System.ComponentModel.DataAnnotations.Schema;
|
||||||
|
|
||||||
namespace Pf2eDataScrapper.Model.Structure;
|
namespace Pf2eModel.Model.Structure;
|
||||||
|
|
||||||
public partial class Condition : IEntity
|
public partial class Condition : IEntity
|
||||||
{
|
{
|
||||||
@@ -1,11 +1,11 @@
|
|||||||
using Pf2eDataScrapper.Model.Base;
|
using Pf2eModel.Model.Base;
|
||||||
using Pf2eDataScrapper.Model.Common;
|
using Pf2eModel.Model.Common;
|
||||||
using Pf2eDataScrapper.Model.Enum;
|
using Pf2eModel.Model.Enum;
|
||||||
using Pf2eDataScrapper.Model.Structure.DeityRelation;
|
using Pf2eModel.Model.Structure.DeityRelation;
|
||||||
using System.ComponentModel.DataAnnotations;
|
using System.ComponentModel.DataAnnotations;
|
||||||
using System.ComponentModel.DataAnnotations.Schema;
|
using System.ComponentModel.DataAnnotations.Schema;
|
||||||
|
|
||||||
namespace Pf2eDataScrapper.Model.Structure;
|
namespace Pf2eModel.Model.Structure;
|
||||||
|
|
||||||
public partial class Deity : IEntity
|
public partial class Deity : IEntity
|
||||||
{
|
{
|
||||||
+2
-2
@@ -1,8 +1,8 @@
|
|||||||
using Microsoft.EntityFrameworkCore;
|
using Microsoft.EntityFrameworkCore;
|
||||||
using Pf2eDataScrapper.Model.Enum;
|
using Pf2eModel.Model.Enum;
|
||||||
using System.ComponentModel.DataAnnotations.Schema;
|
using System.ComponentModel.DataAnnotations.Schema;
|
||||||
|
|
||||||
namespace Pf2eDataScrapper.Model.Structure.DeityRelation;
|
namespace Pf2eModel.Model.Structure.DeityRelation;
|
||||||
|
|
||||||
[PrimaryKey(nameof(DeityId), nameof(Attribute))]
|
[PrimaryKey(nameof(DeityId), nameof(Attribute))]
|
||||||
public partial class DeityAttribute
|
public partial class DeityAttribute
|
||||||
+1
-1
@@ -1,7 +1,7 @@
|
|||||||
using System.ComponentModel.DataAnnotations;
|
using System.ComponentModel.DataAnnotations;
|
||||||
using System.ComponentModel.DataAnnotations.Schema;
|
using System.ComponentModel.DataAnnotations.Schema;
|
||||||
|
|
||||||
namespace Pf2eDataScrapper.Model.Structure.DeityRelation;
|
namespace Pf2eModel.Model.Structure.DeityRelation;
|
||||||
|
|
||||||
public partial class DeityDomain
|
public partial class DeityDomain
|
||||||
{
|
{
|
||||||
+1
-1
@@ -1,7 +1,7 @@
|
|||||||
using System.ComponentModel.DataAnnotations;
|
using System.ComponentModel.DataAnnotations;
|
||||||
using System.ComponentModel.DataAnnotations.Schema;
|
using System.ComponentModel.DataAnnotations.Schema;
|
||||||
|
|
||||||
namespace Pf2eDataScrapper.Model.Structure.DeityRelation;
|
namespace Pf2eModel.Model.Structure.DeityRelation;
|
||||||
|
|
||||||
public partial class DeitySpell
|
public partial class DeitySpell
|
||||||
{
|
{
|
||||||
+1
-1
@@ -1,7 +1,7 @@
|
|||||||
using System.ComponentModel.DataAnnotations;
|
using System.ComponentModel.DataAnnotations;
|
||||||
using System.ComponentModel.DataAnnotations.Schema;
|
using System.ComponentModel.DataAnnotations.Schema;
|
||||||
|
|
||||||
namespace Pf2eDataScrapper.Model.Structure.DeityRelation;
|
namespace Pf2eModel.Model.Structure.DeityRelation;
|
||||||
|
|
||||||
public partial class DeityWeapon
|
public partial class DeityWeapon
|
||||||
{
|
{
|
||||||
@@ -1,10 +1,10 @@
|
|||||||
using Pf2eDataScrapper.Model.Base;
|
using Pf2eModel.Model.Base;
|
||||||
using Pf2eDataScrapper.Model.Enum;
|
using Pf2eModel.Model.Enum;
|
||||||
using Pf2eDataScrapper.Model.Structure.FeatRelation;
|
using Pf2eModel.Model.Structure.FeatRelation;
|
||||||
using System.ComponentModel.DataAnnotations;
|
using System.ComponentModel.DataAnnotations;
|
||||||
using System.ComponentModel.DataAnnotations.Schema;
|
using System.ComponentModel.DataAnnotations.Schema;
|
||||||
|
|
||||||
namespace Pf2eDataScrapper.Model.Structure;
|
namespace Pf2eModel.Model.Structure;
|
||||||
|
|
||||||
public partial class Feat : IEntity
|
public partial class Feat : IEntity
|
||||||
{
|
{
|
||||||
+1
-1
@@ -1,7 +1,7 @@
|
|||||||
using System.ComponentModel.DataAnnotations;
|
using System.ComponentModel.DataAnnotations;
|
||||||
using System.ComponentModel.DataAnnotations.Schema;
|
using System.ComponentModel.DataAnnotations.Schema;
|
||||||
|
|
||||||
namespace Pf2eDataScrapper.Model.Structure.FeatRelation;
|
namespace Pf2eModel.Model.Structure.FeatRelation;
|
||||||
|
|
||||||
public partial class FeatPrerequisite
|
public partial class FeatPrerequisite
|
||||||
{
|
{
|
||||||
+2
-2
@@ -1,8 +1,8 @@
|
|||||||
using Pf2eDataScrapper.Model.Base;
|
using Pf2eModel.Model.Base;
|
||||||
using System.ComponentModel.DataAnnotations;
|
using System.ComponentModel.DataAnnotations;
|
||||||
using System.ComponentModel.DataAnnotations.Schema;
|
using System.ComponentModel.DataAnnotations.Schema;
|
||||||
|
|
||||||
namespace Pf2eDataScrapper.Model.Structure;
|
namespace Pf2eModel.Model.Structure;
|
||||||
|
|
||||||
public partial class Heritage : IEntity
|
public partial class Heritage : IEntity
|
||||||
{
|
{
|
||||||
@@ -1,9 +1,9 @@
|
|||||||
using Pf2eDataScrapper.Model.Base;
|
using Pf2eModel.Model.Base;
|
||||||
using Pf2eDataScrapper.Model.Structure.SpellRelation;
|
using Pf2eModel.Model.Structure.SpellRelation;
|
||||||
using System.ComponentModel.DataAnnotations;
|
using System.ComponentModel.DataAnnotations;
|
||||||
using System.ComponentModel.DataAnnotations.Schema;
|
using System.ComponentModel.DataAnnotations.Schema;
|
||||||
|
|
||||||
namespace Pf2eDataScrapper.Model.Structure;
|
namespace Pf2eModel.Model.Structure;
|
||||||
|
|
||||||
public partial class Spell : IEntity
|
public partial class Spell : IEntity
|
||||||
{
|
{
|
||||||
+2
-2
@@ -1,8 +1,8 @@
|
|||||||
using Pf2eDataScrapper.Model.Enum;
|
using Pf2eModel.Model.Enum;
|
||||||
using System.ComponentModel.DataAnnotations;
|
using System.ComponentModel.DataAnnotations;
|
||||||
using System.ComponentModel.DataAnnotations.Schema;
|
using System.ComponentModel.DataAnnotations.Schema;
|
||||||
|
|
||||||
namespace Pf2eDataScrapper.Model.Structure.SpellRelation;
|
namespace Pf2eModel.Model.Structure.SpellRelation;
|
||||||
|
|
||||||
public partial class SpellArea
|
public partial class SpellArea
|
||||||
{
|
{
|
||||||
+2
-2
@@ -1,8 +1,8 @@
|
|||||||
using Pf2eDataScrapper.Model.Enum;
|
using Pf2eModel.Model.Enum;
|
||||||
using System.ComponentModel.DataAnnotations;
|
using System.ComponentModel.DataAnnotations;
|
||||||
using System.ComponentModel.DataAnnotations.Schema;
|
using System.ComponentModel.DataAnnotations.Schema;
|
||||||
|
|
||||||
namespace Pf2eDataScrapper.Model.Structure.SpellRelation;
|
namespace Pf2eModel.Model.Structure.SpellRelation;
|
||||||
|
|
||||||
public partial class SpellDamage
|
public partial class SpellDamage
|
||||||
{
|
{
|
||||||
+1
-1
@@ -1,7 +1,7 @@
|
|||||||
using System.ComponentModel.DataAnnotations;
|
using System.ComponentModel.DataAnnotations;
|
||||||
using System.ComponentModel.DataAnnotations.Schema;
|
using System.ComponentModel.DataAnnotations.Schema;
|
||||||
|
|
||||||
namespace Pf2eDataScrapper.Model.Structure.SpellRelation;
|
namespace Pf2eModel.Model.Structure.SpellRelation;
|
||||||
|
|
||||||
public partial class SpellDefense
|
public partial class SpellDefense
|
||||||
{
|
{
|
||||||
+1
-1
@@ -1,7 +1,7 @@
|
|||||||
using System.ComponentModel.DataAnnotations;
|
using System.ComponentModel.DataAnnotations;
|
||||||
using System.ComponentModel.DataAnnotations.Schema;
|
using System.ComponentModel.DataAnnotations.Schema;
|
||||||
|
|
||||||
namespace Pf2eDataScrapper.Model.Structure.SpellRelation;
|
namespace Pf2eModel.Model.Structure.SpellRelation;
|
||||||
|
|
||||||
public partial class SpellRitual
|
public partial class SpellRitual
|
||||||
{
|
{
|
||||||
@@ -1,9 +1,9 @@
|
|||||||
using Pf2eDataScrapper.Model.Base;
|
using Pf2eModel.Model.Base;
|
||||||
using Pf2eDataScrapper.Model.Enum;
|
using Pf2eModel.Model.Enum;
|
||||||
using System.ComponentModel.DataAnnotations;
|
using System.ComponentModel.DataAnnotations;
|
||||||
using System.ComponentModel.DataAnnotations.Schema;
|
using System.ComponentModel.DataAnnotations.Schema;
|
||||||
|
|
||||||
namespace Pf2eDataScrapper.Model.Structure;
|
namespace Pf2eModel.Model.Structure;
|
||||||
|
|
||||||
public partial class Trait : IEntity
|
public partial class Trait : IEntity
|
||||||
{
|
{
|
||||||
@@ -0,0 +1,24 @@
|
|||||||
|
<Project Sdk="Microsoft.NET.Sdk">
|
||||||
|
|
||||||
|
<PropertyGroup>
|
||||||
|
<TargetFramework>net8.0</TargetFramework>
|
||||||
|
<ImplicitUsings>enable</ImplicitUsings>
|
||||||
|
<Nullable>enable</Nullable>
|
||||||
|
</PropertyGroup>
|
||||||
|
|
||||||
|
<ItemGroup>
|
||||||
|
<None Include="..\Pf2eDataScrapper\.env" Link=".env">
|
||||||
|
<CopyToOutputDirectory>Always</CopyToOutputDirectory>
|
||||||
|
</None>
|
||||||
|
</ItemGroup>
|
||||||
|
|
||||||
|
<ItemGroup>
|
||||||
|
<PackageReference Include="dotenv.net" Version="3.2.1" />
|
||||||
|
<PackageReference Include="EFCore.NamingConventions" Version="9.0.0" />
|
||||||
|
<PackageReference Include="linq2db" Version="5.4.1" />
|
||||||
|
<PackageReference Include="linq2db.EntityFrameworkCore" Version="9.0.0" />
|
||||||
|
<PackageReference Include="Npgsql" Version="9.0.3" />
|
||||||
|
<PackageReference Include="Npgsql.EntityFrameworkCore.PostgreSQL" Version="9.0.4" />
|
||||||
|
</ItemGroup>
|
||||||
|
|
||||||
|
</Project>
|
||||||
Reference in New Issue
Block a user