From 4fec054ac6ef11c792d7344f1ce6ac830d0ffda0 Mon Sep 17 00:00:00 2001 From: kozhilya Date: Tue, 15 Apr 2025 16:26:35 +0400 Subject: [PATCH] =?UTF-8?q?=D0=9D=D0=B0=D1=87=D0=B0=D0=BB=D0=BE=20=D1=80?= =?UTF-8?q?=D0=B0=D0=B1=D0=BE=D1=82=D1=8B=20=D0=BF=D0=BE=20=D0=BE=D0=BA?= =?UTF-8?q?=D0=BE=D0=BD=D1=87=D0=B0=D1=82=D0=B5=D0=BB=D1=8C=D0=BD=D0=BE?= =?UTF-8?q?=D1=81=D0=BC=D1=83=20=D0=BE=D1=84=D0=BE=D1=80=D0=BC=D0=BB=D0=B5?= =?UTF-8?q?=D0=BD=D0=B8=D1=8E=20=D0=BC=D0=BE=D0=B4=D0=B5=D0=BB=D0=B5=D0=B9?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- Pf2eDataScrapper/Model/Action.cs | 3 +- Pf2eDataScrapper/Model/Ancestry.cs | 3 +- Pf2eDataScrapper/Model/AncestryItem.cs | 4 +- Pf2eDataScrapper/Model/Background.cs | 3 +- Pf2eDataScrapper/Model/BackgroundItem.cs | 4 +- Pf2eDataScrapper/Model/CampaignFeature.cs | 3 +- Pf2eDataScrapper/Model/Class.cs | 3 +- Pf2eDataScrapper/Model/ClassProgression.cs | 4 +- Pf2eDataScrapper/Model/Common/Entity.cs | 52 +++++++++++++++++++ Pf2eDataScrapper/Model/Common/EntityAlias.cs | 25 +++++++++ Pf2eDataScrapper/Model/Common/Trait.cs | 29 +++++++++++ Pf2eDataScrapper/Model/Condition.cs | 3 +- Pf2eDataScrapper/Model/Deity.cs | 3 +- Pf2eDataScrapper/Model/Entity.cs | 26 ---------- Pf2eDataScrapper/Model/EntityAlias.cs | 12 ----- Pf2eDataScrapper/Model/EntityExternal.cs | 4 +- Pf2eDataScrapper/Model/EntityKeyword.cs | 4 +- Pf2eDataScrapper/Model/EntitySource.cs | 4 +- Pf2eDataScrapper/Model/Enum/ActionCategory.cs | 18 +++++++ Pf2eDataScrapper/Model/Enum/ActionType.cs | 18 +++++++ Pf2eDataScrapper/Model/Enum/AliasType.cs | 21 ++++++++ Pf2eDataScrapper/Model/Enum/AncestryVision.cs | 15 ++++++ .../Model/Enum/CampaignFeatureCategory.cs | 21 ++++++++ .../Model/Enum/ClassProgressionType.cs | 24 +++++++++ Pf2eDataScrapper/Model/Enum/DeityCategory.cs | 18 +++++++ Pf2eDataScrapper/Model/Enum/DeityFonts.cs | 18 +++++++ .../Model/Enum/DeitySanctification.cs | 15 ++++++ Pf2eDataScrapper/Model/Enum/EntityRarity.cs | 19 +++++++ Pf2eDataScrapper/Model/Enum/FeatActionType.cs | 18 +++++++ Pf2eDataScrapper/Model/Enum/FeatCategory.cs | 39 ++++++++++++++ Pf2eDataScrapper/Model/Enum/Size.cs | 12 +++++ Pf2eDataScrapper/Model/Enum/SpellAreaType.cs | 27 ++++++++++ .../Model/Enum/SpellDamageCategory.cs | 12 +++++ .../Model/Enum/SpellDamageKinds.cs | 15 ++++++ Pf2eDataScrapper/Model/Enum/TraitType.cs | 13 +++++ Pf2eDataScrapper/Model/Feat.cs | 3 +- Pf2eDataScrapper/Model/Frequency.cs | 4 +- Pf2eDataScrapper/Model/Heritage.cs | 3 +- Pf2eDataScrapper/Model/IEntity.cs | 4 +- Pf2eDataScrapper/Model/Spell.cs | 3 +- Pf2eDataScrapper/Model/Trait.cs | 12 ----- 41 files changed, 473 insertions(+), 68 deletions(-) create mode 100644 Pf2eDataScrapper/Model/Common/Entity.cs create mode 100644 Pf2eDataScrapper/Model/Common/EntityAlias.cs create mode 100644 Pf2eDataScrapper/Model/Common/Trait.cs delete mode 100644 Pf2eDataScrapper/Model/Entity.cs delete mode 100644 Pf2eDataScrapper/Model/EntityAlias.cs create mode 100644 Pf2eDataScrapper/Model/Enum/ActionCategory.cs create mode 100644 Pf2eDataScrapper/Model/Enum/ActionType.cs create mode 100644 Pf2eDataScrapper/Model/Enum/AliasType.cs create mode 100644 Pf2eDataScrapper/Model/Enum/AncestryVision.cs create mode 100644 Pf2eDataScrapper/Model/Enum/CampaignFeatureCategory.cs create mode 100644 Pf2eDataScrapper/Model/Enum/ClassProgressionType.cs create mode 100644 Pf2eDataScrapper/Model/Enum/DeityCategory.cs create mode 100644 Pf2eDataScrapper/Model/Enum/DeityFonts.cs create mode 100644 Pf2eDataScrapper/Model/Enum/DeitySanctification.cs create mode 100644 Pf2eDataScrapper/Model/Enum/EntityRarity.cs create mode 100644 Pf2eDataScrapper/Model/Enum/FeatActionType.cs create mode 100644 Pf2eDataScrapper/Model/Enum/FeatCategory.cs create mode 100644 Pf2eDataScrapper/Model/Enum/Size.cs create mode 100644 Pf2eDataScrapper/Model/Enum/SpellAreaType.cs create mode 100644 Pf2eDataScrapper/Model/Enum/SpellDamageCategory.cs create mode 100644 Pf2eDataScrapper/Model/Enum/SpellDamageKinds.cs create mode 100644 Pf2eDataScrapper/Model/Enum/TraitType.cs delete mode 100644 Pf2eDataScrapper/Model/Trait.cs diff --git a/Pf2eDataScrapper/Model/Action.cs b/Pf2eDataScrapper/Model/Action.cs index 5aa0e60..06a0fa8 100644 --- a/Pf2eDataScrapper/Model/Action.cs +++ b/Pf2eDataScrapper/Model/Action.cs @@ -1,4 +1,5 @@ -using Pf2eDataScrapper.Model.Enum; +using Pf2eDataScrapper.Model.Common; +using Pf2eDataScrapper.Model.Enum; namespace Pf2eDataScrapper.Model; diff --git a/Pf2eDataScrapper/Model/Ancestry.cs b/Pf2eDataScrapper/Model/Ancestry.cs index 7331526..3de866b 100644 --- a/Pf2eDataScrapper/Model/Ancestry.cs +++ b/Pf2eDataScrapper/Model/Ancestry.cs @@ -1,4 +1,5 @@ -using Pf2eDataScrapper.Model.Enum; +using Pf2eDataScrapper.Model.Common; +using Pf2eDataScrapper.Model.Enum; namespace Pf2eDataScrapper.Model; diff --git a/Pf2eDataScrapper/Model/AncestryItem.cs b/Pf2eDataScrapper/Model/AncestryItem.cs index 7820bdb..e6c0bcb 100644 --- a/Pf2eDataScrapper/Model/AncestryItem.cs +++ b/Pf2eDataScrapper/Model/AncestryItem.cs @@ -1,4 +1,6 @@ -namespace Pf2eDataScrapper.Model; +using Pf2eDataScrapper.Model.Common; + +namespace Pf2eDataScrapper.Model; public partial class AncestryItem { diff --git a/Pf2eDataScrapper/Model/Background.cs b/Pf2eDataScrapper/Model/Background.cs index 396a830..c68b325 100644 --- a/Pf2eDataScrapper/Model/Background.cs +++ b/Pf2eDataScrapper/Model/Background.cs @@ -1,4 +1,5 @@ -using Pf2eDataScrapper.Model.Enum; +using Pf2eDataScrapper.Model.Common; +using Pf2eDataScrapper.Model.Enum; namespace Pf2eDataScrapper.Model; diff --git a/Pf2eDataScrapper/Model/BackgroundItem.cs b/Pf2eDataScrapper/Model/BackgroundItem.cs index bb37c57..cba434b 100644 --- a/Pf2eDataScrapper/Model/BackgroundItem.cs +++ b/Pf2eDataScrapper/Model/BackgroundItem.cs @@ -1,4 +1,6 @@ -namespace Pf2eDataScrapper.Model; +using Pf2eDataScrapper.Model.Common; + +namespace Pf2eDataScrapper.Model; public partial class BackgroundItem { diff --git a/Pf2eDataScrapper/Model/CampaignFeature.cs b/Pf2eDataScrapper/Model/CampaignFeature.cs index 110d28e..d0df20b 100644 --- a/Pf2eDataScrapper/Model/CampaignFeature.cs +++ b/Pf2eDataScrapper/Model/CampaignFeature.cs @@ -1,4 +1,5 @@ -using Pf2eDataScrapper.Model.Enum; +using Pf2eDataScrapper.Model.Common; +using Pf2eDataScrapper.Model.Enum; namespace Pf2eDataScrapper.Model; diff --git a/Pf2eDataScrapper/Model/Class.cs b/Pf2eDataScrapper/Model/Class.cs index 7c00b4d..4b21563 100644 --- a/Pf2eDataScrapper/Model/Class.cs +++ b/Pf2eDataScrapper/Model/Class.cs @@ -1,4 +1,5 @@ -using Pf2eDataScrapper.Model.Enum; +using Pf2eDataScrapper.Model.Common; +using Pf2eDataScrapper.Model.Enum; namespace Pf2eDataScrapper.Model; diff --git a/Pf2eDataScrapper/Model/ClassProgression.cs b/Pf2eDataScrapper/Model/ClassProgression.cs index 502ef3c..d38c7e3 100644 --- a/Pf2eDataScrapper/Model/ClassProgression.cs +++ b/Pf2eDataScrapper/Model/ClassProgression.cs @@ -1,4 +1,6 @@ -namespace Pf2eDataScrapper.Model; +using Pf2eDataScrapper.Model.Common; + +namespace Pf2eDataScrapper.Model; public partial class ClassProgression { diff --git a/Pf2eDataScrapper/Model/Common/Entity.cs b/Pf2eDataScrapper/Model/Common/Entity.cs new file mode 100644 index 0000000..4c0f02f --- /dev/null +++ b/Pf2eDataScrapper/Model/Common/Entity.cs @@ -0,0 +1,52 @@ +using Microsoft.EntityFrameworkCore; +using Pf2eDataScrapper.Model.Enum; +using System.ComponentModel.DataAnnotations; +using System.ComponentModel.DataAnnotations.Schema; + +namespace Pf2eDataScrapper.Model.Common; + +[Table("entity")] +public class Entity +{ + [Key] + [Column("id", Order = 1)] + public int Id { get; set; } + + [Column("name", Order = 2)] + [StringLength(255)] + [Required] + [Comment("Отображаемое имя")] + public string Name { get; set; } = null!; + + [Column("type", Order = 3)] + [Required] + [Comment("Тип объекта")] + public EntityType Type { get; set; } + + [Column("slug", Order = 4)] + [Required] + [Comment("Часть имени в URL")] + public string Slug { get; set; } = null!; + + [Column("img", Order = 5)] + [StringLength(255)] + [Comment("Изображение объекта")] + public string Img { get; set; } = null!; + + [Column("description")] + [Comment("Текстовое описание объекта")] + public string Description { get; set; } = null!; + + [Column("rarity")] + public EntityRarity Rarity { get; set; } = EntityRarity.Common; + + [Column("is_translated")] + [Comment("Флаг, указывающий, что у объекта существует перевод")] + public bool? IsTranslated { get; set; } = false; + + [Column("is_checked")] + [Comment("Флаг, указывающий, что объект был проверен и не требует автоматической перезаписи")] + public bool? IsChecked { get; set; } = false; + + public virtual ICollection Traits { get; set; } = []; +} diff --git a/Pf2eDataScrapper/Model/Common/EntityAlias.cs b/Pf2eDataScrapper/Model/Common/EntityAlias.cs new file mode 100644 index 0000000..7dabb82 --- /dev/null +++ b/Pf2eDataScrapper/Model/Common/EntityAlias.cs @@ -0,0 +1,25 @@ +using Pf2eDataScrapper.Model.Enum; +using System.ComponentModel.DataAnnotations; +using System.ComponentModel.DataAnnotations.Schema; + +namespace Pf2eDataScrapper.Model.Common; + +[Table("entity_alias")] +public partial class EntityAlias +{ + [Key] + [Column("id", Order = 1)] + public int Id { get; set; } + + [Column("entity_id", Order = 2)] + [ForeignKey("Entity")] + public int EntityId { get; set; } + + [Column("type", Order = 3)] + public AliasType Type { get; set; } = AliasType.Other; + + [Column("alias", Order = 4)] + public string Alias { get; set; } = null!; + + public virtual Entity Entity { get; set; } = null!; +} diff --git a/Pf2eDataScrapper/Model/Common/Trait.cs b/Pf2eDataScrapper/Model/Common/Trait.cs new file mode 100644 index 0000000..07df816 --- /dev/null +++ b/Pf2eDataScrapper/Model/Common/Trait.cs @@ -0,0 +1,29 @@ +using Pf2eDataScrapper.Model.Enum; +using System.ComponentModel.DataAnnotations; +using System.ComponentModel.DataAnnotations.Schema; + +namespace Pf2eDataScrapper.Model.Common; + +[Table("trait")] +public partial class Trait +{ + [Key] + [Column("id", Order = 1)] + public int Id { get; set; } + + [Column("name", Order = 2)] + [Required] + public string Name { get; set; } = null!; + + [Column("type", Order = 3)] + public TraitType Type { get; set; } + + [Column("slug", Order = 4)] + [Required] + public string Slug { get; set; } = null!; + + [Column("description", Order = 5)] + public string Description { get; set; } = null!; + + public virtual ICollection Entities { get; set; } = []; +} diff --git a/Pf2eDataScrapper/Model/Condition.cs b/Pf2eDataScrapper/Model/Condition.cs index 280d3d8..36df080 100644 --- a/Pf2eDataScrapper/Model/Condition.cs +++ b/Pf2eDataScrapper/Model/Condition.cs @@ -1,4 +1,5 @@ -using Pf2eDataScrapper.Model.Enum; +using Pf2eDataScrapper.Model.Common; +using Pf2eDataScrapper.Model.Enum; namespace Pf2eDataScrapper.Model; diff --git a/Pf2eDataScrapper/Model/Deity.cs b/Pf2eDataScrapper/Model/Deity.cs index c47cc83..eb15c81 100644 --- a/Pf2eDataScrapper/Model/Deity.cs +++ b/Pf2eDataScrapper/Model/Deity.cs @@ -1,4 +1,5 @@ -using Pf2eDataScrapper.Model.Enum; +using Pf2eDataScrapper.Model.Common; +using Pf2eDataScrapper.Model.Enum; namespace Pf2eDataScrapper.Model; diff --git a/Pf2eDataScrapper/Model/Entity.cs b/Pf2eDataScrapper/Model/Entity.cs deleted file mode 100644 index 3460574..0000000 --- a/Pf2eDataScrapper/Model/Entity.cs +++ /dev/null @@ -1,26 +0,0 @@ -using Pf2eDataScrapper.Model.Enum; - -namespace Pf2eDataScrapper.Model; - -public class Entity -{ - public int Id { get; set; } - - public string Name { get; set; } = null!; - - public string Img { get; set; } = null!; - - public EntityType Type { get; set; } - - public string Description { get; set; } = null!; - - public string? DescriptionGm { get; set; } - - public string Slug { get; set; } = null!; - - public bool? IsTranslated { get; set; } - - public bool? IsChecked { get; set; } - - public virtual ICollection Traits { get; set; } = []; -} diff --git a/Pf2eDataScrapper/Model/EntityAlias.cs b/Pf2eDataScrapper/Model/EntityAlias.cs deleted file mode 100644 index 229f58c..0000000 --- a/Pf2eDataScrapper/Model/EntityAlias.cs +++ /dev/null @@ -1,12 +0,0 @@ -namespace Pf2eDataScrapper.Model; - -public partial class EntityAlias -{ - public int Id { get; set; } - - public int EntityId { get; set; } - - public string Alias { get; set; } = null!; - - public virtual Entity Entity { get; set; } = null!; -} diff --git a/Pf2eDataScrapper/Model/EntityExternal.cs b/Pf2eDataScrapper/Model/EntityExternal.cs index 642e241..7909e63 100644 --- a/Pf2eDataScrapper/Model/EntityExternal.cs +++ b/Pf2eDataScrapper/Model/EntityExternal.cs @@ -1,4 +1,6 @@ -namespace Pf2eDataScrapper.Model; +using Pf2eDataScrapper.Model.Common; + +namespace Pf2eDataScrapper.Model; public partial class EntityExternal { diff --git a/Pf2eDataScrapper/Model/EntityKeyword.cs b/Pf2eDataScrapper/Model/EntityKeyword.cs index e88abb5..3f3c9de 100644 --- a/Pf2eDataScrapper/Model/EntityKeyword.cs +++ b/Pf2eDataScrapper/Model/EntityKeyword.cs @@ -1,4 +1,6 @@ -namespace Pf2eDataScrapper.Model; +using Pf2eDataScrapper.Model.Common; + +namespace Pf2eDataScrapper.Model; public partial class EntityKeyword { diff --git a/Pf2eDataScrapper/Model/EntitySource.cs b/Pf2eDataScrapper/Model/EntitySource.cs index 484f401..eee0535 100644 --- a/Pf2eDataScrapper/Model/EntitySource.cs +++ b/Pf2eDataScrapper/Model/EntitySource.cs @@ -1,4 +1,6 @@ -namespace Pf2eDataScrapper.Model; +using Pf2eDataScrapper.Model.Common; + +namespace Pf2eDataScrapper.Model; public partial class EntitySource { diff --git a/Pf2eDataScrapper/Model/Enum/ActionCategory.cs b/Pf2eDataScrapper/Model/Enum/ActionCategory.cs new file mode 100644 index 0000000..9867f88 --- /dev/null +++ b/Pf2eDataScrapper/Model/Enum/ActionCategory.cs @@ -0,0 +1,18 @@ +using NpgsqlTypes; + +namespace Pf2eDataScrapper.Model.Enum; + +public enum ActionCategory +{ + [PgName("offensive")] + offensive, + + [PgName("defensive")] + defensive, + + [PgName("interaction")] + interaction, + + [PgName("familiar")] + familiar, +} \ No newline at end of file diff --git a/Pf2eDataScrapper/Model/Enum/ActionType.cs b/Pf2eDataScrapper/Model/Enum/ActionType.cs new file mode 100644 index 0000000..ce0e335 --- /dev/null +++ b/Pf2eDataScrapper/Model/Enum/ActionType.cs @@ -0,0 +1,18 @@ +using NpgsqlTypes; + +namespace Pf2eDataScrapper.Model.Enum; + +public enum ActionType +{ + [PgName("action")] + action, + + [PgName("free")] + free, + + [PgName("reaction")] + reaction, + + [PgName("passive")] + passive, +} \ No newline at end of file diff --git a/Pf2eDataScrapper/Model/Enum/AliasType.cs b/Pf2eDataScrapper/Model/Enum/AliasType.cs new file mode 100644 index 0000000..a30a948 --- /dev/null +++ b/Pf2eDataScrapper/Model/Enum/AliasType.cs @@ -0,0 +1,21 @@ +using NpgsqlTypes; + +namespace Pf2eDataScrapper.Model.Enum; + +public enum AliasType +{ + [PgName("old")] + Old, + + [PgName("english")] + English, + + [PgName("old_english")] + OldEnglish, + + [PgName("hobby")] + Hobby, + + [PgName("other")] + Other, +} diff --git a/Pf2eDataScrapper/Model/Enum/AncestryVision.cs b/Pf2eDataScrapper/Model/Enum/AncestryVision.cs new file mode 100644 index 0000000..d6b844d --- /dev/null +++ b/Pf2eDataScrapper/Model/Enum/AncestryVision.cs @@ -0,0 +1,15 @@ +using NpgsqlTypes; + +namespace Pf2eDataScrapper.Model.Enum; + +public enum AncestryVision +{ + [PgName("normal")] + normal, + + [PgName("low-light-vision")] + LowLightVision, + + [PgName("darkvision")] + darkvision, +} \ No newline at end of file diff --git a/Pf2eDataScrapper/Model/Enum/CampaignFeatureCategory.cs b/Pf2eDataScrapper/Model/Enum/CampaignFeatureCategory.cs new file mode 100644 index 0000000..af48d66 --- /dev/null +++ b/Pf2eDataScrapper/Model/Enum/CampaignFeatureCategory.cs @@ -0,0 +1,21 @@ +using NpgsqlTypes; + +namespace Pf2eDataScrapper.Model.Enum; + +public enum CampaignFeatureCategory +{ + [PgName("army_tactic")] + ArmyTactic, + + [PgName("army_war_action")] + ArmyWarAction, + + [PgName("kingdom_activity")] + KingdomActivity, + + [PgName("kingdom_feat")] + KingdomFeat, + + [PgName("kingdom_feature")] + KingdomFeature, +} \ No newline at end of file diff --git a/Pf2eDataScrapper/Model/Enum/ClassProgressionType.cs b/Pf2eDataScrapper/Model/Enum/ClassProgressionType.cs new file mode 100644 index 0000000..433e9a7 --- /dev/null +++ b/Pf2eDataScrapper/Model/Enum/ClassProgressionType.cs @@ -0,0 +1,24 @@ +using NpgsqlTypes; + +namespace Pf2eDataScrapper.Model.Enum; + +public enum ClassProgressionType +{ + [PgName("entity")] + Entity, + + [PgName("ancestry_feat")] + AncestryFeat, + + [PgName("class_feat")] + ClassFeat, + + [PgName("general_feat")] + GeneralFeat, + + [PgName("skill_feat")] + SkillFeat, + + [PgName("skill_increase")] + SkillIncrease, +} diff --git a/Pf2eDataScrapper/Model/Enum/DeityCategory.cs b/Pf2eDataScrapper/Model/Enum/DeityCategory.cs new file mode 100644 index 0000000..e8c762e --- /dev/null +++ b/Pf2eDataScrapper/Model/Enum/DeityCategory.cs @@ -0,0 +1,18 @@ +using NpgsqlTypes; + +namespace Pf2eDataScrapper.Model.Enum; + +public enum DeityCategory +{ + [PgName("deity")] + Deity, + + [PgName("pantheon")] + Pantheon, + + [PgName("covenant")] + Covenant, + + [PgName("philosophy")] + Philosophy, +} diff --git a/Pf2eDataScrapper/Model/Enum/DeityFonts.cs b/Pf2eDataScrapper/Model/Enum/DeityFonts.cs new file mode 100644 index 0000000..fe9ecbf --- /dev/null +++ b/Pf2eDataScrapper/Model/Enum/DeityFonts.cs @@ -0,0 +1,18 @@ +using NpgsqlTypes; + +namespace Pf2eDataScrapper.Model.Enum; + +public enum DeityFonts +{ + [PgName("none")] + None, + + [PgName("heal")] + Heal, + + [PgName("harm")] + Harm, + + [PgName("any")] + Any, +} diff --git a/Pf2eDataScrapper/Model/Enum/DeitySanctification.cs b/Pf2eDataScrapper/Model/Enum/DeitySanctification.cs new file mode 100644 index 0000000..7689838 --- /dev/null +++ b/Pf2eDataScrapper/Model/Enum/DeitySanctification.cs @@ -0,0 +1,15 @@ +using NpgsqlTypes; + +namespace Pf2eDataScrapper.Model.Enum; + +public enum DeitySanctification +{ + [PgName("holy")] + Holy, + + [PgName("unholy")] + Unholy, + + [PgName("any")] + Any, +} \ No newline at end of file diff --git a/Pf2eDataScrapper/Model/Enum/EntityRarity.cs b/Pf2eDataScrapper/Model/Enum/EntityRarity.cs new file mode 100644 index 0000000..2850e8f --- /dev/null +++ b/Pf2eDataScrapper/Model/Enum/EntityRarity.cs @@ -0,0 +1,19 @@ +using NpgsqlTypes; + +namespace Pf2eDataScrapper.Model.Enum +{ + public enum EntityRarity + { + [PgName("common")] + Common, + + [PgName("uncommon")] + Uncommon, + + [PgName("rare")] + Rare, + + [PgName("unique")] + Unique + } +} diff --git a/Pf2eDataScrapper/Model/Enum/FeatActionType.cs b/Pf2eDataScrapper/Model/Enum/FeatActionType.cs new file mode 100644 index 0000000..0a37277 --- /dev/null +++ b/Pf2eDataScrapper/Model/Enum/FeatActionType.cs @@ -0,0 +1,18 @@ +using NpgsqlTypes; + +namespace Pf2eDataScrapper.Model.Enum; + +public enum FeatActionType +{ + [PgName("passive")] + Passive, + + [PgName("action")] + Action, + + [PgName("reaction")] + Reaction, + + [PgName("free")] + Free, +} diff --git a/Pf2eDataScrapper/Model/Enum/FeatCategory.cs b/Pf2eDataScrapper/Model/Enum/FeatCategory.cs new file mode 100644 index 0000000..2727a1f --- /dev/null +++ b/Pf2eDataScrapper/Model/Enum/FeatCategory.cs @@ -0,0 +1,39 @@ +using NpgsqlTypes; + +namespace Pf2eDataScrapper.Model.Enum; + +public enum FeatCategory +{ + [PgName("ancestryfeature")] + Ancestryfeature, + + [PgName("classfeature")] + Classfeature, + + [PgName("calling")] + Calling, + + [PgName("class")] + Class, + + [PgName("skill")] + Skill, + + [PgName("general")] + General, + + [PgName("ancestry")] + Ancestry, + + [PgName("bonus")] + Bonus, + + [PgName("deityboon")] + Deityboon, + + [PgName("curse")] + Curse, + + [PgName("pfsboon")] + Pfsboon, +} \ No newline at end of file diff --git a/Pf2eDataScrapper/Model/Enum/Size.cs b/Pf2eDataScrapper/Model/Enum/Size.cs new file mode 100644 index 0000000..1aa4952 --- /dev/null +++ b/Pf2eDataScrapper/Model/Enum/Size.cs @@ -0,0 +1,12 @@ +using NpgsqlTypes; + +namespace Pf2eDataScrapper.Model.Enum; + +public enum Size +{ + [PgName("med")] + med, + + [PgName("tiny")] + tiny, +} \ No newline at end of file diff --git a/Pf2eDataScrapper/Model/Enum/SpellAreaType.cs b/Pf2eDataScrapper/Model/Enum/SpellAreaType.cs new file mode 100644 index 0000000..e057d35 --- /dev/null +++ b/Pf2eDataScrapper/Model/Enum/SpellAreaType.cs @@ -0,0 +1,27 @@ +using NpgsqlTypes; + +namespace Pf2eDataScrapper.Model.Enum; + +public enum SpellAreaType +{ + [PgName("burst")] + Burst, + + [PgName("emanation")] + Emanation, + + [PgName("cone")] + Cone, + + [PgName("line")] + Line, + + [PgName("square")] + Square, + + [PgName("cube")] + Cube, + + [PgName("cylinder")] + Cylinder, +} \ No newline at end of file diff --git a/Pf2eDataScrapper/Model/Enum/SpellDamageCategory.cs b/Pf2eDataScrapper/Model/Enum/SpellDamageCategory.cs new file mode 100644 index 0000000..b7e14b3 --- /dev/null +++ b/Pf2eDataScrapper/Model/Enum/SpellDamageCategory.cs @@ -0,0 +1,12 @@ +using NpgsqlTypes; + +namespace Pf2eDataScrapper.Model.Enum; + +public enum SpellDamageCategory +{ + [PgName("persistent")] + Persistent, + + [PgName("splash")] + Splash, +} \ No newline at end of file diff --git a/Pf2eDataScrapper/Model/Enum/SpellDamageKinds.cs b/Pf2eDataScrapper/Model/Enum/SpellDamageKinds.cs new file mode 100644 index 0000000..1de47cb --- /dev/null +++ b/Pf2eDataScrapper/Model/Enum/SpellDamageKinds.cs @@ -0,0 +1,15 @@ +using NpgsqlTypes; + +namespace Pf2eDataScrapper.Model.Enum; + +public enum SpellDamageKinds +{ + [PgName("damage")] + Damage, + + [PgName("healing")] + Healing, + + [PgName("any")] + Any, +} \ No newline at end of file diff --git a/Pf2eDataScrapper/Model/Enum/TraitType.cs b/Pf2eDataScrapper/Model/Enum/TraitType.cs new file mode 100644 index 0000000..ceca1e1 --- /dev/null +++ b/Pf2eDataScrapper/Model/Enum/TraitType.cs @@ -0,0 +1,13 @@ +using NpgsqlTypes; + +namespace Pf2eDataScrapper.Model.Enum +{ + public enum TraitType + { + [PgName("regular")] + Regular, + + [PgName("tradition")] + Tradition + } +} diff --git a/Pf2eDataScrapper/Model/Feat.cs b/Pf2eDataScrapper/Model/Feat.cs index 06a34b9..2876981 100644 --- a/Pf2eDataScrapper/Model/Feat.cs +++ b/Pf2eDataScrapper/Model/Feat.cs @@ -1,4 +1,5 @@ -using Pf2eDataScrapper.Model.Enum; +using Pf2eDataScrapper.Model.Common; +using Pf2eDataScrapper.Model.Enum; namespace Pf2eDataScrapper.Model; diff --git a/Pf2eDataScrapper/Model/Frequency.cs b/Pf2eDataScrapper/Model/Frequency.cs index 355219a..45ca398 100644 --- a/Pf2eDataScrapper/Model/Frequency.cs +++ b/Pf2eDataScrapper/Model/Frequency.cs @@ -1,4 +1,6 @@ -namespace Pf2eDataScrapper.Model; +using Pf2eDataScrapper.Model.Common; + +namespace Pf2eDataScrapper.Model; public partial class Frequency { diff --git a/Pf2eDataScrapper/Model/Heritage.cs b/Pf2eDataScrapper/Model/Heritage.cs index 9c2a129..bacfdff 100644 --- a/Pf2eDataScrapper/Model/Heritage.cs +++ b/Pf2eDataScrapper/Model/Heritage.cs @@ -1,4 +1,5 @@ -using Pf2eDataScrapper.Model.Enum; +using Pf2eDataScrapper.Model.Common; +using Pf2eDataScrapper.Model.Enum; namespace Pf2eDataScrapper.Model; diff --git a/Pf2eDataScrapper/Model/IEntity.cs b/Pf2eDataScrapper/Model/IEntity.cs index 1bad196..aac682f 100644 --- a/Pf2eDataScrapper/Model/IEntity.cs +++ b/Pf2eDataScrapper/Model/IEntity.cs @@ -1,4 +1,6 @@ -namespace Pf2eDataScrapper.Model +using Pf2eDataScrapper.Model.Common; + +namespace Pf2eDataScrapper.Model { internal interface IEntity { diff --git a/Pf2eDataScrapper/Model/Spell.cs b/Pf2eDataScrapper/Model/Spell.cs index f840816..9711dad 100644 --- a/Pf2eDataScrapper/Model/Spell.cs +++ b/Pf2eDataScrapper/Model/Spell.cs @@ -1,4 +1,5 @@ -using Pf2eDataScrapper.Model.Enum; +using Pf2eDataScrapper.Model.Common; +using Pf2eDataScrapper.Model.Enum; namespace Pf2eDataScrapper.Model; diff --git a/Pf2eDataScrapper/Model/Trait.cs b/Pf2eDataScrapper/Model/Trait.cs deleted file mode 100644 index 4db7311..0000000 --- a/Pf2eDataScrapper/Model/Trait.cs +++ /dev/null @@ -1,12 +0,0 @@ -namespace Pf2eDataScrapper.Model; - -public partial class Trait -{ - public int Id { get; set; } - - public string Name { get; set; } = null!; - - public string Slug { get; set; } = null!; - - public string Description { get; set; } = null!; -}