Больше обработчиков

This commit is contained in:
2025-04-18 20:39:17 +04:00
parent 5b1fad3372
commit 38bc6152ed
30 changed files with 1474 additions and 1492 deletions
-24
View File
@@ -1,24 +0,0 @@
using Pf2eModel.Model.Enum;
using System.ComponentModel.DataAnnotations;
using System.ComponentModel.DataAnnotations.Schema;
namespace Pf2eModel.Model.Common;
public partial class Language
{
[System.ComponentModel.DataAnnotations.Key]
[DatabaseGenerated(DatabaseGeneratedOption.Identity)]
[Column(Order = 1)]
public int Id { get; set; }
[Column(Order = 2)]
[MaxLength(Pf2eDbContext.NameLength)]
public string Name { get; set; } = null!;
[Column(Order = 3)]
[MaxLength(Pf2eDbContext.NameLength)]
public string Slug { get; set; } = null!;
[Column(Order = 4)]
public EntityRarity Rarity { get; set; }
}
+3 -3
View File
@@ -5,11 +5,11 @@ namespace Pf2eModel.Model.Enum;
public enum AncestryVision
{
[PgName("normal")]
normal,
Normal,
[PgName("low-light-vision")]
LowLightVision,
[PgName("darkvision")]
darkvision,
[PgName("dark-vision")]
DarkVision,
}
+2 -2
View File
@@ -4,8 +4,8 @@ namespace Pf2eModel.Model.Enum;
public enum AttributeValues
{
[PgName("any")]
Any,
[PgName("free")]
Free,
[PgName("str")]
Strength,
+4 -1
View File
@@ -41,5 +41,8 @@ public enum EntityType
Heritage,
[PgName("spell")]
Spell
Spell,
[PgName("language")]
Language
}
+10 -4
View File
@@ -4,9 +4,15 @@ namespace Pf2eModel.Model.Enum;
public enum Size
{
[PgName("med")]
med,
[PgName("tiny")]
tiny,
Tiny,
[PgName("small")]
Small,
[PgName("medium")]
Medium,
[PgName("large")]
Large,
}
+3 -6
View File
@@ -16,19 +16,16 @@ public partial class Ancestry : IEntity
public Entity Entity { get; set; } = null!;
[Column(Order = 2)]
public Size Size { get; set; } = Size.med;
public Size[] Size { get; set; }
[Column(Order = 3)]
public int Hp { get; set; }
[Column(Order = 4)]
public int Reach { get; set; }
[Column(Order = 5)]
public int Speed { get; set; }
[Column(Order = 6)]
public AncestryVision Vision { get; set; } = AncestryVision.normal;
[Column(Order = 5)]
public AncestryVision Vision { get; set; } = AncestryVision.Normal;
public virtual ICollection<AncestryBoost> AncestryBoosts { get; set; } = [];
@@ -1,5 +1,4 @@
using Microsoft.EntityFrameworkCore;
using Pf2eModel.Model.Common;
using System.ComponentModel.DataAnnotations.Schema;
namespace Pf2eModel.Model.Structure.AncestryRelation;
+18
View File
@@ -0,0 +1,18 @@
using Pf2eModel.Model.Base;
using Pf2eModel.Model.Enum;
using System.ComponentModel.DataAnnotations;
using System.ComponentModel.DataAnnotations.Schema;
namespace Pf2eModel.Model.Structure;
[EntityOfType(EntityType.Language)]
public partial class Language: IEntity
{
[Key]
[DatabaseGenerated(DatabaseGeneratedOption.Identity)]
[Column(Order = 1)]
public int Id { get; set; }
public Entity Entity { get; set; } = null!;
}