Документирование и небольшой рефакторинг модели.
This commit is contained in:
@@ -1,40 +1,73 @@
|
||||
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!;
|
||||
|
||||
[Column(Order = 3)]
|
||||
/// <summary>
|
||||
/// Количество очков здоровья.
|
||||
/// </summary>
|
||||
[Column(Order = 2)]
|
||||
[Comment("Количество очков здоровья")]
|
||||
public int Hp { get; set; }
|
||||
|
||||
[Column(Order = 4)]
|
||||
public int Perception { get; set; }
|
||||
|
||||
[Column(Order = 5)]
|
||||
/// <summary>
|
||||
/// Флаг, указывающий на то, что класс является заклинательным.
|
||||
/// </summary>
|
||||
[Column(Order = 3)]
|
||||
[Comment("Заклинатель?")]
|
||||
public bool Spellcasting { get; set; }
|
||||
|
||||
/// <summary>
|
||||
/// Традиция заклинаний класса.
|
||||
/// </summary>
|
||||
[Column(Order = 6)]
|
||||
public SpellTradition Tradition { get; set; }
|
||||
[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; } = [];
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user