Начало работы по окончательносму оформлению моделей
This commit is contained in:
@@ -1,4 +1,5 @@
|
||||
using Pf2eDataScrapper.Model.Enum;
|
||||
using Pf2eDataScrapper.Model.Common;
|
||||
using Pf2eDataScrapper.Model.Enum;
|
||||
|
||||
namespace Pf2eDataScrapper.Model;
|
||||
|
||||
|
||||
@@ -1,4 +1,5 @@
|
||||
using Pf2eDataScrapper.Model.Enum;
|
||||
using Pf2eDataScrapper.Model.Common;
|
||||
using Pf2eDataScrapper.Model.Enum;
|
||||
|
||||
namespace Pf2eDataScrapper.Model;
|
||||
|
||||
|
||||
@@ -1,4 +1,6 @@
|
||||
namespace Pf2eDataScrapper.Model;
|
||||
using Pf2eDataScrapper.Model.Common;
|
||||
|
||||
namespace Pf2eDataScrapper.Model;
|
||||
|
||||
public partial class AncestryItem
|
||||
{
|
||||
|
||||
@@ -1,4 +1,5 @@
|
||||
using Pf2eDataScrapper.Model.Enum;
|
||||
using Pf2eDataScrapper.Model.Common;
|
||||
using Pf2eDataScrapper.Model.Enum;
|
||||
|
||||
namespace Pf2eDataScrapper.Model;
|
||||
|
||||
|
||||
@@ -1,4 +1,6 @@
|
||||
namespace Pf2eDataScrapper.Model;
|
||||
using Pf2eDataScrapper.Model.Common;
|
||||
|
||||
namespace Pf2eDataScrapper.Model;
|
||||
|
||||
public partial class BackgroundItem
|
||||
{
|
||||
|
||||
@@ -1,4 +1,5 @@
|
||||
using Pf2eDataScrapper.Model.Enum;
|
||||
using Pf2eDataScrapper.Model.Common;
|
||||
using Pf2eDataScrapper.Model.Enum;
|
||||
|
||||
namespace Pf2eDataScrapper.Model;
|
||||
|
||||
|
||||
@@ -1,4 +1,5 @@
|
||||
using Pf2eDataScrapper.Model.Enum;
|
||||
using Pf2eDataScrapper.Model.Common;
|
||||
using Pf2eDataScrapper.Model.Enum;
|
||||
|
||||
namespace Pf2eDataScrapper.Model;
|
||||
|
||||
|
||||
@@ -1,4 +1,6 @@
|
||||
namespace Pf2eDataScrapper.Model;
|
||||
using Pf2eDataScrapper.Model.Common;
|
||||
|
||||
namespace Pf2eDataScrapper.Model;
|
||||
|
||||
public partial class ClassProgression
|
||||
{
|
||||
|
||||
@@ -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<Trait> Traits { get; set; } = [];
|
||||
}
|
||||
@@ -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!;
|
||||
}
|
||||
@@ -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<Entity> Entities { get; set; } = [];
|
||||
}
|
||||
@@ -1,4 +1,5 @@
|
||||
using Pf2eDataScrapper.Model.Enum;
|
||||
using Pf2eDataScrapper.Model.Common;
|
||||
using Pf2eDataScrapper.Model.Enum;
|
||||
|
||||
namespace Pf2eDataScrapper.Model;
|
||||
|
||||
|
||||
@@ -1,4 +1,5 @@
|
||||
using Pf2eDataScrapper.Model.Enum;
|
||||
using Pf2eDataScrapper.Model.Common;
|
||||
using Pf2eDataScrapper.Model.Enum;
|
||||
|
||||
namespace Pf2eDataScrapper.Model;
|
||||
|
||||
|
||||
@@ -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<Trait> Traits { get; set; } = [];
|
||||
}
|
||||
@@ -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!;
|
||||
}
|
||||
@@ -1,4 +1,6 @@
|
||||
namespace Pf2eDataScrapper.Model;
|
||||
using Pf2eDataScrapper.Model.Common;
|
||||
|
||||
namespace Pf2eDataScrapper.Model;
|
||||
|
||||
public partial class EntityExternal
|
||||
{
|
||||
|
||||
@@ -1,4 +1,6 @@
|
||||
namespace Pf2eDataScrapper.Model;
|
||||
using Pf2eDataScrapper.Model.Common;
|
||||
|
||||
namespace Pf2eDataScrapper.Model;
|
||||
|
||||
public partial class EntityKeyword
|
||||
{
|
||||
|
||||
@@ -1,4 +1,6 @@
|
||||
namespace Pf2eDataScrapper.Model;
|
||||
using Pf2eDataScrapper.Model.Common;
|
||||
|
||||
namespace Pf2eDataScrapper.Model;
|
||||
|
||||
public partial class EntitySource
|
||||
{
|
||||
|
||||
@@ -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,
|
||||
}
|
||||
@@ -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,
|
||||
}
|
||||
@@ -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,
|
||||
}
|
||||
@@ -0,0 +1,15 @@
|
||||
using NpgsqlTypes;
|
||||
|
||||
namespace Pf2eDataScrapper.Model.Enum;
|
||||
|
||||
public enum AncestryVision
|
||||
{
|
||||
[PgName("normal")]
|
||||
normal,
|
||||
|
||||
[PgName("low-light-vision")]
|
||||
LowLightVision,
|
||||
|
||||
[PgName("darkvision")]
|
||||
darkvision,
|
||||
}
|
||||
@@ -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,
|
||||
}
|
||||
@@ -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,
|
||||
}
|
||||
@@ -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,
|
||||
}
|
||||
@@ -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,
|
||||
}
|
||||
@@ -0,0 +1,15 @@
|
||||
using NpgsqlTypes;
|
||||
|
||||
namespace Pf2eDataScrapper.Model.Enum;
|
||||
|
||||
public enum DeitySanctification
|
||||
{
|
||||
[PgName("holy")]
|
||||
Holy,
|
||||
|
||||
[PgName("unholy")]
|
||||
Unholy,
|
||||
|
||||
[PgName("any")]
|
||||
Any,
|
||||
}
|
||||
@@ -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
|
||||
}
|
||||
}
|
||||
@@ -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,
|
||||
}
|
||||
@@ -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,
|
||||
}
|
||||
@@ -0,0 +1,12 @@
|
||||
using NpgsqlTypes;
|
||||
|
||||
namespace Pf2eDataScrapper.Model.Enum;
|
||||
|
||||
public enum Size
|
||||
{
|
||||
[PgName("med")]
|
||||
med,
|
||||
|
||||
[PgName("tiny")]
|
||||
tiny,
|
||||
}
|
||||
@@ -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,
|
||||
}
|
||||
@@ -0,0 +1,12 @@
|
||||
using NpgsqlTypes;
|
||||
|
||||
namespace Pf2eDataScrapper.Model.Enum;
|
||||
|
||||
public enum SpellDamageCategory
|
||||
{
|
||||
[PgName("persistent")]
|
||||
Persistent,
|
||||
|
||||
[PgName("splash")]
|
||||
Splash,
|
||||
}
|
||||
@@ -0,0 +1,15 @@
|
||||
using NpgsqlTypes;
|
||||
|
||||
namespace Pf2eDataScrapper.Model.Enum;
|
||||
|
||||
public enum SpellDamageKinds
|
||||
{
|
||||
[PgName("damage")]
|
||||
Damage,
|
||||
|
||||
[PgName("healing")]
|
||||
Healing,
|
||||
|
||||
[PgName("any")]
|
||||
Any,
|
||||
}
|
||||
@@ -0,0 +1,13 @@
|
||||
using NpgsqlTypes;
|
||||
|
||||
namespace Pf2eDataScrapper.Model.Enum
|
||||
{
|
||||
public enum TraitType
|
||||
{
|
||||
[PgName("regular")]
|
||||
Regular,
|
||||
|
||||
[PgName("tradition")]
|
||||
Tradition
|
||||
}
|
||||
}
|
||||
@@ -1,4 +1,5 @@
|
||||
using Pf2eDataScrapper.Model.Enum;
|
||||
using Pf2eDataScrapper.Model.Common;
|
||||
using Pf2eDataScrapper.Model.Enum;
|
||||
|
||||
namespace Pf2eDataScrapper.Model;
|
||||
|
||||
|
||||
@@ -1,4 +1,6 @@
|
||||
namespace Pf2eDataScrapper.Model;
|
||||
using Pf2eDataScrapper.Model.Common;
|
||||
|
||||
namespace Pf2eDataScrapper.Model;
|
||||
|
||||
public partial class Frequency
|
||||
{
|
||||
|
||||
@@ -1,4 +1,5 @@
|
||||
using Pf2eDataScrapper.Model.Enum;
|
||||
using Pf2eDataScrapper.Model.Common;
|
||||
using Pf2eDataScrapper.Model.Enum;
|
||||
|
||||
namespace Pf2eDataScrapper.Model;
|
||||
|
||||
|
||||
@@ -1,4 +1,6 @@
|
||||
namespace Pf2eDataScrapper.Model
|
||||
using Pf2eDataScrapper.Model.Common;
|
||||
|
||||
namespace Pf2eDataScrapper.Model
|
||||
{
|
||||
internal interface IEntity
|
||||
{
|
||||
|
||||
@@ -1,4 +1,5 @@
|
||||
using Pf2eDataScrapper.Model.Enum;
|
||||
using Pf2eDataScrapper.Model.Common;
|
||||
using Pf2eDataScrapper.Model.Enum;
|
||||
|
||||
namespace Pf2eDataScrapper.Model;
|
||||
|
||||
|
||||
@@ -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!;
|
||||
}
|
||||
Reference in New Issue
Block a user