74 lines
2.2 KiB
C#
74 lines
2.2 KiB
C#
using System.ComponentModel.DataAnnotations;
|
|
using System.ComponentModel.DataAnnotations.Schema;
|
|
using Microsoft.EntityFrameworkCore;
|
|
using Pf2eModel.Model.Base;
|
|
using Pf2eModel.Model.Enum;
|
|
using Pf2eModel.Model.Structure.ClassRelation;
|
|
|
|
namespace Pf2eModel.Model.Structure;
|
|
|
|
/// <summary>
|
|
/// Класс.
|
|
/// </summary>
|
|
[EntityOfType(EntityType.Class)]
|
|
public class Class : IEntity
|
|
{
|
|
/// <inheritdoc/>
|
|
[Key]
|
|
[DatabaseGenerated(DatabaseGeneratedOption.None)]
|
|
[Column(Order = 1)]
|
|
[Comment("Идентификатор")]
|
|
public int Id { get; set; }
|
|
|
|
/// <inheritdoc/>
|
|
public Entity Entity { get; set; } = null!;
|
|
|
|
/// <summary>
|
|
/// Количество очков здоровья.
|
|
/// </summary>
|
|
[Column(Order = 2)]
|
|
[Comment("Количество очков здоровья")]
|
|
public int Hp { get; set; }
|
|
|
|
/// <summary>
|
|
/// Флаг, указывающий на то, что класс является заклинательным.
|
|
/// </summary>
|
|
[Column(Order = 3)]
|
|
[Comment("Заклинатель?")]
|
|
public bool Spellcasting { get; set; }
|
|
|
|
/// <summary>
|
|
/// Традиция заклинаний класса.
|
|
/// </summary>
|
|
[Column(Order = 6)]
|
|
[Comment("Традиция заклинаний")]
|
|
public SpellTradition? Tradition { get; set; } = null;
|
|
|
|
/// <summary>
|
|
/// Количество дополнительных навыков.
|
|
/// </summary>
|
|
[Column(Order = 7)]
|
|
[Comment("Дополнительные навыки")]
|
|
public int AdditionalTrainedSkills { get; set; }
|
|
|
|
/// <summary>
|
|
/// Аттрибуты класса.
|
|
/// </summary>
|
|
public virtual ICollection<ClassKeyAbility> ClassKeyAbilities { get; set; } = [];
|
|
|
|
/// <summary>
|
|
/// Прогрессия класса.
|
|
/// </summary>
|
|
public virtual ICollection<ClassProgression> ClassProgressions { get; set; } = [];
|
|
|
|
/// <summary>
|
|
/// Навыки класса.
|
|
/// </summary>
|
|
public virtual ICollection<ClassTraining> ClassTrainings { get; set; } = [];
|
|
|
|
/// <summary>
|
|
/// Группы подклассов.
|
|
/// </summary>
|
|
public virtual ICollection<SubclassGroup> SubclassGroups { get; set; } = [];
|
|
}
|