Большой рефактор
This commit is contained in:
@@ -12,13 +12,13 @@ namespace Pf2eModel.Model.Base;
|
||||
|
||||
public class Entity
|
||||
{
|
||||
[System.ComponentModel.DataAnnotations.Key]
|
||||
[Key]
|
||||
[Column(Order = 1)]
|
||||
public int Id { get; set; }
|
||||
|
||||
[Column(Order = 2)]
|
||||
[Comment("Отображаемое имя")]
|
||||
public LocaleString Name { get; set; } = new();
|
||||
public LocaleString Name { get; set; } = [];
|
||||
|
||||
[Column(Order = 3)]
|
||||
[Comment("Тип объекта")]
|
||||
@@ -36,6 +36,7 @@ public class Entity
|
||||
|
||||
[Column(Order = 6)]
|
||||
[Comment("Текстовое описание объекта")]
|
||||
// ReSharper disable once EntityFramework.ModelValidation.UnlimitedStringLength
|
||||
public string Description { get; set; } = null!;
|
||||
|
||||
[Column(Order = 7)]
|
||||
|
||||
@@ -1,9 +1,10 @@
|
||||
using System.ComponentModel.DataAnnotations;
|
||||
using System.ComponentModel.DataAnnotations.Schema;
|
||||
using Pf2eModel.Model.Common.I18n;
|
||||
|
||||
namespace Pf2eModel.Model.Base.Keywords;
|
||||
|
||||
public partial class Keyword
|
||||
public class Keyword
|
||||
{
|
||||
[Key]
|
||||
[DatabaseGenerated(DatabaseGeneratedOption.Identity)]
|
||||
@@ -11,10 +12,14 @@ public partial class Keyword
|
||||
public int Id { get; set; }
|
||||
|
||||
[Column(Order = 2)]
|
||||
public LocaleString Name = [];
|
||||
|
||||
[Column(Order = 3)]
|
||||
[MaxLength(Pf2eDbContext.NameLength)]
|
||||
public string Slug { get; set; } = null!;
|
||||
|
||||
[Newtonsoft.Json.JsonIgnore]
|
||||
public virtual ICollection<Entity> Entities { get; set; } = [];
|
||||
public ICollection<Entity> Entities { get; set; } = [];
|
||||
|
||||
public virtual ICollection<KeywordAlias> Aliases { get; set; } = [];
|
||||
public ICollection<KeywordAlias> Aliases { get; set; } = [];
|
||||
}
|
||||
|
||||
@@ -3,7 +3,7 @@ using System.ComponentModel.DataAnnotations.Schema;
|
||||
|
||||
namespace Pf2eModel.Model.Base.Keywords;
|
||||
|
||||
public partial class KeywordAlias
|
||||
public class KeywordAlias
|
||||
{
|
||||
[Key]
|
||||
[DatabaseGenerated(DatabaseGeneratedOption.Identity)]
|
||||
@@ -18,5 +18,5 @@ public partial class KeywordAlias
|
||||
public string Value { get; set; } = null!;
|
||||
|
||||
[Newtonsoft.Json.JsonIgnore]
|
||||
public virtual Keyword Keyword { get; set; } = null!;
|
||||
public Keyword Keyword { get; set; } = null!;
|
||||
}
|
||||
|
||||
@@ -5,7 +5,7 @@ using Microsoft.EntityFrameworkCore;
|
||||
namespace Pf2eModel.Model.Base.Source;
|
||||
|
||||
[PrimaryKey(nameof(EntityId), nameof(SourceId))]
|
||||
public partial class EntitySource
|
||||
public class EntitySource
|
||||
{
|
||||
[Column(Order = 1)]
|
||||
public int EntityId { get; set; }
|
||||
@@ -23,7 +23,7 @@ public partial class EntitySource
|
||||
public bool IsRemaster { get; set; }
|
||||
|
||||
[Newtonsoft.Json.JsonIgnore]
|
||||
public virtual Entity Entity { get; set; } = null!;
|
||||
public Entity Entity { get; set; } = null!;
|
||||
|
||||
public virtual Source Source { get; set; } = null!;
|
||||
public Source Source { get; set; } = null!;
|
||||
}
|
||||
|
||||
@@ -4,7 +4,7 @@ using Pf2eModel.Model.Enum;
|
||||
|
||||
namespace Pf2eModel.Model.Base.Source;
|
||||
|
||||
public partial class Source
|
||||
public class Source
|
||||
{
|
||||
[Key]
|
||||
[DatabaseGenerated(DatabaseGeneratedOption.Identity)]
|
||||
|
||||
@@ -5,7 +5,7 @@ using Microsoft.EntityFrameworkCore;
|
||||
namespace Pf2eModel.Model.Base.Targets;
|
||||
|
||||
[PrimaryKey(nameof(EntityId), nameof(TargetId))]
|
||||
public partial class EntityExternal
|
||||
public class EntityExternal
|
||||
{
|
||||
[Column(Order = 0)]
|
||||
public int EntityId { get; set; }
|
||||
|
||||
@@ -3,7 +3,7 @@ using System.ComponentModel.DataAnnotations.Schema;
|
||||
|
||||
namespace Pf2eModel.Model.Base.Targets;
|
||||
|
||||
public partial class ExternalTarget
|
||||
public class ExternalTarget
|
||||
{
|
||||
[Key]
|
||||
[DatabaseGenerated(DatabaseGeneratedOption.Identity)]
|
||||
@@ -24,5 +24,5 @@ public partial class ExternalTarget
|
||||
|
||||
[Column(Order = 4)]
|
||||
[Newtonsoft.Json.JsonIgnore]
|
||||
public virtual ICollection<EntityExternal> EntityExternals { get; set; } = [];
|
||||
public ICollection<EntityExternal> EntityExternals { get; set; } = [];
|
||||
}
|
||||
|
||||
@@ -3,7 +3,7 @@ using System.ComponentModel.DataAnnotations.Schema;
|
||||
|
||||
namespace Pf2eModel.Model.Common;
|
||||
|
||||
public partial class Frequency
|
||||
public class Frequency
|
||||
{
|
||||
[Key]
|
||||
[DatabaseGenerated(DatabaseGeneratedOption.Identity)]
|
||||
|
||||
@@ -18,17 +18,19 @@ public static class LocaleExtension
|
||||
|
||||
public static LocaleType GetTypeByString(this string localeType)
|
||||
{
|
||||
foreach (System.Reflection.FieldInfo field in typeof(LocaleType).GetFields())
|
||||
foreach (FieldInfo field in typeof(LocaleType).GetFields())
|
||||
{
|
||||
if (
|
||||
Attribute.GetCustomAttribute(field, typeof(DescriptionAttribute))
|
||||
is DescriptionAttribute descriptionAttribute
|
||||
is not DescriptionAttribute descriptionAttribute
|
||||
)
|
||||
{
|
||||
if (descriptionAttribute.Description == localeType)
|
||||
{
|
||||
return (LocaleType)field.GetValue(null)!;
|
||||
}
|
||||
continue;
|
||||
}
|
||||
|
||||
if (descriptionAttribute.Description == localeType)
|
||||
{
|
||||
return (LocaleType)field.GetValue(null)!;
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
@@ -4,7 +4,7 @@ using Pf2eModel.Model.Enum;
|
||||
|
||||
namespace Pf2eModel.Model.Common;
|
||||
|
||||
public partial class Training
|
||||
public class Training
|
||||
{
|
||||
[Key]
|
||||
[DatabaseGenerated(DatabaseGeneratedOption.Identity)]
|
||||
|
||||
@@ -5,7 +5,7 @@ using Pf2eModel.Model.Enum;
|
||||
namespace Pf2eModel.Model.Structure;
|
||||
|
||||
[EntityOfType(EntityType.Action)]
|
||||
public partial class Action : IEntity
|
||||
public class Action : IEntity
|
||||
{
|
||||
[System.ComponentModel.DataAnnotations.Key]
|
||||
[DatabaseGenerated(DatabaseGeneratedOption.None)]
|
||||
@@ -28,6 +28,7 @@ public partial class Action : IEntity
|
||||
public bool IsPassive { get; set; } = false;
|
||||
|
||||
[Column(Order = 6)]
|
||||
// ReSharper disable once EntityFramework.ModelValidation.UnlimitedStringLength
|
||||
public string? Extra { get; set; }
|
||||
|
||||
public Entity Entity { get; set; } = null!;
|
||||
|
||||
@@ -6,7 +6,7 @@ using Pf2eModel.Model.Structure.AncestryRelation;
|
||||
namespace Pf2eModel.Model.Structure;
|
||||
|
||||
[EntityOfType(EntityType.Ancestry)]
|
||||
public partial class Ancestry : IEntity
|
||||
public class Ancestry : IEntity
|
||||
{
|
||||
[System.ComponentModel.DataAnnotations.Key]
|
||||
[DatabaseGenerated(DatabaseGeneratedOption.None)]
|
||||
@@ -27,11 +27,11 @@ public partial class Ancestry : IEntity
|
||||
[Column(Order = 5)]
|
||||
public AncestryVision Vision { get; set; } = AncestryVision.Normal;
|
||||
|
||||
public virtual ICollection<AncestryBoost> AncestryBoosts { get; set; } = [];
|
||||
public ICollection<AncestryBoost> AncestryBoosts { get; set; } = [];
|
||||
|
||||
public virtual ICollection<AncestryItem> AncestryItems { get; set; } = [];
|
||||
public ICollection<AncestryItem> AncestryItems { get; set; } = [];
|
||||
|
||||
public virtual ICollection<AncestryLanguage> AncestryLanguages { get; set; } = [];
|
||||
public ICollection<AncestryLanguage> AncestryLanguages { get; set; } = [];
|
||||
|
||||
public virtual ICollection<Heritage> Heritages { get; set; } = [];
|
||||
public ICollection<Heritage> Heritages { get; set; } = [];
|
||||
}
|
||||
|
||||
@@ -4,7 +4,7 @@ using Newtonsoft.Json;
|
||||
|
||||
namespace Pf2eModel.Model.Structure.AncestryRelation;
|
||||
|
||||
public partial class AncestryBoost
|
||||
public class AncestryBoost
|
||||
{
|
||||
[Key]
|
||||
[DatabaseGenerated(DatabaseGeneratedOption.Identity)]
|
||||
@@ -21,5 +21,5 @@ public partial class AncestryBoost
|
||||
public Enum.AttributeValues Value { get; set; }
|
||||
|
||||
[JsonIgnore]
|
||||
public virtual Ancestry Ancestry { get; set; } = null!;
|
||||
public Ancestry Ancestry { get; set; } = null!;
|
||||
}
|
||||
|
||||
@@ -5,7 +5,7 @@ using Pf2eModel.Model.Base;
|
||||
namespace Pf2eModel.Model.Structure.AncestryRelation;
|
||||
|
||||
[PrimaryKey(nameof(AncestryId), nameof(ItemId))]
|
||||
public partial class AncestryItem
|
||||
public class AncestryItem
|
||||
{
|
||||
[Column(Order = 1)]
|
||||
public int AncestryId { get; set; }
|
||||
@@ -16,7 +16,7 @@ public partial class AncestryItem
|
||||
[Column(Order = 3)]
|
||||
public int Level { get; set; }
|
||||
|
||||
public virtual Ancestry Ancestry { get; set; } = null!;
|
||||
public Ancestry Ancestry { get; set; } = null!;
|
||||
|
||||
public virtual Entity Item { get; set; } = null!;
|
||||
public Entity Item { get; set; } = null!;
|
||||
}
|
||||
|
||||
@@ -4,7 +4,7 @@ using Microsoft.EntityFrameworkCore;
|
||||
namespace Pf2eModel.Model.Structure.AncestryRelation;
|
||||
|
||||
[PrimaryKey(nameof(AncestryId), nameof(LanguageId))]
|
||||
public partial class AncestryLanguage
|
||||
public class AncestryLanguage
|
||||
{
|
||||
[Column(Order = 1)]
|
||||
public int AncestryId { get; set; }
|
||||
@@ -15,7 +15,7 @@ public partial class AncestryLanguage
|
||||
[Column(Order = 3)]
|
||||
public bool IsAdditional { get; set; }
|
||||
|
||||
public virtual Ancestry Ancestry { get; set; } = null!;
|
||||
public Ancestry Ancestry { get; set; } = null!;
|
||||
|
||||
public virtual Language Language { get; set; } = null!;
|
||||
public Language Language { get; set; } = null!;
|
||||
}
|
||||
|
||||
@@ -21,9 +21,10 @@ public class Archetype : IEntity
|
||||
public int? DedicationFeatId { get; set; } = null;
|
||||
|
||||
[Column(Order = 4)]
|
||||
// ReSharper disable once EntityFramework.ModelValidation.UnlimitedStringLength
|
||||
public string? Extra { get; set; }
|
||||
|
||||
public Feat DedicationFeat { get; set; } = null!;
|
||||
|
||||
public virtual ICollection<Feat> Feats { get; set; } = [];
|
||||
public ICollection<Feat> Feats { get; set; } = [];
|
||||
}
|
||||
|
||||
@@ -7,7 +7,7 @@ using Pf2eModel.Model.Structure.BackgroundRelation;
|
||||
namespace Pf2eModel.Model.Structure;
|
||||
|
||||
[EntityOfType(EntityType.Background)]
|
||||
public partial class Background : IEntity
|
||||
public class Background : IEntity
|
||||
{
|
||||
[Key]
|
||||
[DatabaseGenerated(DatabaseGeneratedOption.None)]
|
||||
@@ -16,9 +16,9 @@ public partial class Background : IEntity
|
||||
|
||||
public Entity Entity { get; set; } = null!;
|
||||
|
||||
public virtual ICollection<BackgroundBoost> BackgroundBoosts { get; set; } = [];
|
||||
public ICollection<BackgroundBoost> BackgroundBoosts { get; set; } = [];
|
||||
|
||||
public virtual ICollection<BackgroundItem> BackgroundItems { get; set; } = [];
|
||||
public ICollection<BackgroundItem> BackgroundItems { get; set; } = [];
|
||||
|
||||
public virtual ICollection<BackgroundTraining> BackgroundSkills { get; set; } = [];
|
||||
public ICollection<BackgroundTraining> BackgroundSkills { get; set; } = [];
|
||||
}
|
||||
|
||||
@@ -5,7 +5,7 @@ using Pf2eModel.Model.Enum;
|
||||
|
||||
namespace Pf2eModel.Model.Structure.BackgroundRelation;
|
||||
|
||||
public partial class BackgroundBoost
|
||||
public class BackgroundBoost
|
||||
{
|
||||
[Key]
|
||||
[DatabaseGenerated(DatabaseGeneratedOption.Identity)]
|
||||
@@ -19,5 +19,5 @@ public partial class BackgroundBoost
|
||||
public AttributeValues Attribute { get; set; }
|
||||
|
||||
[JsonIgnore]
|
||||
public virtual Background Background { get; set; } = null!;
|
||||
public Background Background { get; set; } = null!;
|
||||
}
|
||||
|
||||
@@ -6,7 +6,7 @@ using Pf2eModel.Model.Base;
|
||||
namespace Pf2eModel.Model.Structure.BackgroundRelation;
|
||||
|
||||
[PrimaryKey(nameof(BackgroundId), nameof(EntityId))]
|
||||
public partial class BackgroundItem
|
||||
public class BackgroundItem
|
||||
{
|
||||
[Column(Order = 1)]
|
||||
public int BackgroundId { get; set; }
|
||||
@@ -18,7 +18,7 @@ public partial class BackgroundItem
|
||||
public int? Level { get; set; }
|
||||
|
||||
[JsonIgnore]
|
||||
public virtual Background Background { get; set; } = null!;
|
||||
public Background Background { get; set; } = null!;
|
||||
|
||||
public virtual Entity Entity { get; set; } = null!;
|
||||
public Entity Entity { get; set; } = null!;
|
||||
}
|
||||
|
||||
@@ -6,7 +6,7 @@ using Pf2eModel.Model.Enum;
|
||||
|
||||
namespace Pf2eModel.Model.Structure.BackgroundRelation;
|
||||
|
||||
public partial class BackgroundTraining
|
||||
public class BackgroundTraining
|
||||
{
|
||||
[Key]
|
||||
[DatabaseGenerated(DatabaseGeneratedOption.None)]
|
||||
@@ -23,7 +23,7 @@ public partial class BackgroundTraining
|
||||
public TrainingStage Level { get; set; }
|
||||
|
||||
[JsonIgnore]
|
||||
public virtual Background Background { get; set; } = null!;
|
||||
public Background Background { get; set; } = null!;
|
||||
|
||||
public virtual Training Training { get; set; } = null!;
|
||||
public Training Training { get; set; } = null!;
|
||||
}
|
||||
|
||||
@@ -5,7 +5,7 @@ using Pf2eModel.Model.Enum;
|
||||
|
||||
namespace Pf2eModel.Model.Structure.ClassRelation;
|
||||
|
||||
public partial class ClassKeyAbility
|
||||
public class ClassKeyAbility
|
||||
{
|
||||
[Key]
|
||||
[DatabaseGenerated(DatabaseGeneratedOption.Identity)]
|
||||
@@ -19,5 +19,5 @@ public partial class ClassKeyAbility
|
||||
public AttributeValues Value { get; set; }
|
||||
|
||||
[JsonIgnore]
|
||||
public virtual Class Class { get; set; } = null!;
|
||||
public Class Class { get; set; } = null!;
|
||||
}
|
||||
|
||||
@@ -6,7 +6,7 @@ using Pf2eModel.Model.Enum;
|
||||
|
||||
namespace Pf2eModel.Model.Structure.ClassRelation;
|
||||
|
||||
public partial class ClassProgression
|
||||
public class ClassProgression
|
||||
{
|
||||
[Key]
|
||||
[DatabaseGenerated(DatabaseGeneratedOption.Identity)]
|
||||
@@ -26,7 +26,7 @@ public partial class ClassProgression
|
||||
public int? EntityId { get; set; }
|
||||
|
||||
[JsonIgnore]
|
||||
public virtual Class Class { get; set; } = null!;
|
||||
public Class Class { get; set; } = null!;
|
||||
|
||||
public virtual Entity? Entity { get; set; }
|
||||
public Entity? Entity { get; set; }
|
||||
}
|
||||
|
||||
@@ -6,7 +6,7 @@ using Pf2eModel.Model.Enum;
|
||||
|
||||
namespace Pf2eModel.Model.Structure.ClassRelation;
|
||||
|
||||
public partial class ClassTraining
|
||||
public class ClassTraining
|
||||
{
|
||||
[Key]
|
||||
[DatabaseGenerated(DatabaseGeneratedOption.Identity)]
|
||||
@@ -27,7 +27,7 @@ public partial class ClassTraining
|
||||
public TrainingStage Stage { get; set; }
|
||||
|
||||
[JsonIgnore]
|
||||
public virtual Class Class { get; set; } = null!;
|
||||
public Class Class { get; set; } = null!;
|
||||
|
||||
public virtual Training? Training { get; set; }
|
||||
public Training? Training { get; set; }
|
||||
}
|
||||
|
||||
@@ -6,7 +6,7 @@ using Pf2eModel.Model.Enum;
|
||||
namespace Pf2eModel.Model.Structure;
|
||||
|
||||
[EntityOfType(EntityType.Condition)]
|
||||
public partial class Condition : IEntity
|
||||
public class Condition : IEntity
|
||||
{
|
||||
[Key]
|
||||
[DatabaseGenerated(DatabaseGeneratedOption.None)]
|
||||
@@ -19,5 +19,6 @@ public partial class Condition : IEntity
|
||||
public ConditionGroup? Group { get; set; }
|
||||
|
||||
[Column(Order = 3)]
|
||||
// ReSharper disable once EntityFramework.ModelValidation.UnlimitedStringLength
|
||||
public string? Extra { get; set; }
|
||||
}
|
||||
|
||||
@@ -8,7 +8,7 @@ using Pf2eModel.Model.Structure.DeityRelation;
|
||||
namespace Pf2eModel.Model.Structure;
|
||||
|
||||
[EntityOfType(EntityType.Deity)]
|
||||
public partial class Deity : IEntity
|
||||
public class Deity : IEntity
|
||||
{
|
||||
[Key]
|
||||
[DatabaseGenerated(DatabaseGeneratedOption.None)]
|
||||
@@ -29,14 +29,13 @@ public partial class Deity : IEntity
|
||||
[Column(Order = 5)]
|
||||
public bool SanctificationMust { get; set; }
|
||||
|
||||
public virtual ICollection<DeityAttribute> DeityAttributes { get; set; } =
|
||||
new List<DeityAttribute>();
|
||||
public ICollection<DeityAttribute> DeityAttributes { get; set; } = new List<DeityAttribute>();
|
||||
|
||||
public virtual ICollection<DeityDomain> DeityDomains { get; set; } = new List<DeityDomain>();
|
||||
public ICollection<DeityDomain> DeityDomains { get; set; } = new List<DeityDomain>();
|
||||
|
||||
public virtual ICollection<DeitySpell> DeitySpells { get; set; } = new List<DeitySpell>();
|
||||
public ICollection<DeitySpell> DeitySpells { get; set; } = new List<DeitySpell>();
|
||||
|
||||
public virtual ICollection<DeityWeapon> DeityWeapons { get; set; } = new List<DeityWeapon>();
|
||||
public ICollection<DeityWeapon> DeityWeapons { get; set; } = new List<DeityWeapon>();
|
||||
|
||||
public virtual ICollection<Training> Skills { get; set; } = new List<Training>();
|
||||
public ICollection<Training> Skills { get; set; } = new List<Training>();
|
||||
}
|
||||
|
||||
@@ -5,7 +5,7 @@ using Pf2eModel.Model.Enum;
|
||||
namespace Pf2eModel.Model.Structure.DeityRelation;
|
||||
|
||||
[PrimaryKey(nameof(DeityId), nameof(Attribute))]
|
||||
public partial class DeityAttribute
|
||||
public class DeityAttribute
|
||||
{
|
||||
[Column(Order = 1)]
|
||||
public int DeityId { get; set; }
|
||||
@@ -13,5 +13,5 @@ public partial class DeityAttribute
|
||||
[Column(Order = 2)]
|
||||
public AttributeValues Attribute { get; set; }
|
||||
|
||||
public virtual Deity Deity { get; set; } = null!;
|
||||
public Deity Deity { get; set; } = null!;
|
||||
}
|
||||
|
||||
@@ -3,7 +3,7 @@ using System.ComponentModel.DataAnnotations.Schema;
|
||||
|
||||
namespace Pf2eModel.Model.Structure.DeityRelation;
|
||||
|
||||
public partial class DeityDomain
|
||||
public class DeityDomain
|
||||
{
|
||||
[Key]
|
||||
[DatabaseGenerated(DatabaseGeneratedOption.Identity)]
|
||||
|
||||
@@ -3,7 +3,7 @@ using System.ComponentModel.DataAnnotations.Schema;
|
||||
|
||||
namespace Pf2eModel.Model.Structure.DeityRelation;
|
||||
|
||||
public partial class DeitySpell
|
||||
public class DeitySpell
|
||||
{
|
||||
[Key]
|
||||
[DatabaseGenerated(DatabaseGeneratedOption.Identity)]
|
||||
|
||||
@@ -3,7 +3,7 @@ using System.ComponentModel.DataAnnotations.Schema;
|
||||
|
||||
namespace Pf2eModel.Model.Structure.DeityRelation;
|
||||
|
||||
public partial class DeityWeapon
|
||||
public class DeityWeapon
|
||||
{
|
||||
[Key]
|
||||
[DatabaseGenerated(DatabaseGeneratedOption.Identity)]
|
||||
|
||||
@@ -7,7 +7,7 @@ using Pf2eModel.Model.Structure.FeatRelation;
|
||||
namespace Pf2eModel.Model.Structure;
|
||||
|
||||
[EntityOfType(EntityType.Feat)]
|
||||
public partial class Feat : IEntity
|
||||
public class Feat : IEntity
|
||||
{
|
||||
[Key]
|
||||
[DatabaseGenerated(DatabaseGeneratedOption.None)]
|
||||
@@ -38,9 +38,10 @@ public partial class Feat : IEntity
|
||||
public bool IsPassive { get; set; } = false;
|
||||
|
||||
[Column(Order = 10)]
|
||||
// ReSharper disable once EntityFramework.ModelValidation.UnlimitedStringLength
|
||||
public string? Extra { get; set; }
|
||||
|
||||
public virtual ICollection<Archetype> Archetypes { get; set; } = [];
|
||||
public ICollection<Archetype> Archetypes { get; set; } = [];
|
||||
|
||||
public virtual ICollection<FeatPrerequisite> FeatPrerequisites { get; set; } = [];
|
||||
public ICollection<FeatPrerequisite> FeatPrerequisites { get; set; } = [];
|
||||
}
|
||||
|
||||
@@ -3,7 +3,7 @@ using System.ComponentModel.DataAnnotations.Schema;
|
||||
|
||||
namespace Pf2eModel.Model.Structure.FeatRelation;
|
||||
|
||||
public partial class FeatPrerequisite
|
||||
public class FeatPrerequisite
|
||||
{
|
||||
[Key]
|
||||
[DatabaseGenerated(DatabaseGeneratedOption.Identity)]
|
||||
|
||||
@@ -6,7 +6,7 @@ using Pf2eModel.Model.Enum;
|
||||
namespace Pf2eModel.Model.Structure;
|
||||
|
||||
[EntityOfType(EntityType.Heritage)]
|
||||
public partial class Heritage : IEntity
|
||||
public class Heritage : IEntity
|
||||
{
|
||||
[Key]
|
||||
[DatabaseGenerated(DatabaseGeneratedOption.None)]
|
||||
|
||||
@@ -6,7 +6,7 @@ using Pf2eModel.Model.Enum;
|
||||
namespace Pf2eModel.Model.Structure;
|
||||
|
||||
[EntityOfType(EntityType.Language)]
|
||||
public partial class Language : IEntity
|
||||
public class Language : IEntity
|
||||
{
|
||||
[Key]
|
||||
[DatabaseGenerated(DatabaseGeneratedOption.Identity)]
|
||||
|
||||
@@ -7,7 +7,7 @@ using Pf2eModel.Model.Structure.SpellRelation;
|
||||
namespace Pf2eModel.Model.Structure;
|
||||
|
||||
[EntityOfType(EntityType.Spell)]
|
||||
public partial class Spell : IEntity
|
||||
public class Spell : IEntity
|
||||
{
|
||||
[Key]
|
||||
[DatabaseGenerated(DatabaseGeneratedOption.None)]
|
||||
|
||||
@@ -4,7 +4,7 @@ using Pf2eModel.Model.Enum;
|
||||
|
||||
namespace Pf2eModel.Model.Structure.SpellRelation;
|
||||
|
||||
public partial class SpellArea
|
||||
public class SpellArea
|
||||
{
|
||||
[Key]
|
||||
[DatabaseGenerated(DatabaseGeneratedOption.None)]
|
||||
|
||||
@@ -4,7 +4,7 @@ using Pf2eModel.Model.Enum;
|
||||
|
||||
namespace Pf2eModel.Model.Structure.SpellRelation;
|
||||
|
||||
public partial class SpellDamage
|
||||
public class SpellDamage
|
||||
{
|
||||
[Key]
|
||||
[DatabaseGenerated(DatabaseGeneratedOption.Identity)]
|
||||
|
||||
@@ -3,7 +3,7 @@ using System.ComponentModel.DataAnnotations.Schema;
|
||||
|
||||
namespace Pf2eModel.Model.Structure.SpellRelation;
|
||||
|
||||
public partial class SpellDefense
|
||||
public class SpellDefense
|
||||
{
|
||||
[Key]
|
||||
[DatabaseGenerated(DatabaseGeneratedOption.Identity)]
|
||||
|
||||
@@ -3,7 +3,7 @@ using System.ComponentModel.DataAnnotations.Schema;
|
||||
|
||||
namespace Pf2eModel.Model.Structure.SpellRelation;
|
||||
|
||||
public partial class SpellRitual
|
||||
public class SpellRitual
|
||||
{
|
||||
[Key]
|
||||
[DatabaseGenerated(DatabaseGeneratedOption.None)]
|
||||
|
||||
@@ -21,7 +21,9 @@ public class Subclass : IEntity
|
||||
public SubclassGroup Group { get; set; } = null!;
|
||||
|
||||
[Column(Order = 3)]
|
||||
public LocaleString Additional { get; set; } = new();
|
||||
public LocaleString Additional { get; set; } = [];
|
||||
|
||||
[Column(Order = 4)]
|
||||
// ReSharper disable once EntityFramework.ModelValidation.UnlimitedStringLength
|
||||
public string Extra { get; set; } = "{}";
|
||||
}
|
||||
|
||||
@@ -1,13 +1,7 @@
|
||||
using System;
|
||||
using System.Collections.Generic;
|
||||
using System.ComponentModel.DataAnnotations;
|
||||
using System.ComponentModel.DataAnnotations;
|
||||
using System.ComponentModel.DataAnnotations.Schema;
|
||||
using System.Linq;
|
||||
using System.Text;
|
||||
using System.Threading.Tasks;
|
||||
using Pf2eModel.Model.Base;
|
||||
using Pf2eModel.Model.Enum;
|
||||
using Pf2eModel.Model.Structure.ClassRelation;
|
||||
|
||||
namespace Pf2eModel.Model.Structure;
|
||||
|
||||
@@ -25,5 +19,5 @@ public class SubclassGroup : IEntity
|
||||
|
||||
public Class? Class { get; set; } = null!;
|
||||
|
||||
public virtual ICollection<Subclass> Subclasses { get; set; } = [];
|
||||
public ICollection<Subclass> Subclasses { get; set; } = [];
|
||||
}
|
||||
|
||||
@@ -6,7 +6,7 @@ using Pf2eModel.Model.Enum;
|
||||
namespace Pf2eModel.Model.Structure;
|
||||
|
||||
[EntityOfType(EntityType.Trait)]
|
||||
public partial class Trait : IEntity
|
||||
public class Trait : IEntity
|
||||
{
|
||||
[Key]
|
||||
[DatabaseGenerated(DatabaseGeneratedOption.None)]
|
||||
|
||||
Reference in New Issue
Block a user