Документирование и небольшой рефакторинг модели.
This commit is contained in:
@@ -1,23 +1,36 @@
|
||||
using System.ComponentModel.DataAnnotations;
|
||||
using System.ComponentModel.DataAnnotations.Schema;
|
||||
using Microsoft.EntityFrameworkCore;
|
||||
using Pf2eModel.Model.Base;
|
||||
using Pf2eModel.Model.Enum;
|
||||
|
||||
namespace Pf2eModel.Model.Structure;
|
||||
|
||||
/// <summary>
|
||||
/// Признак.
|
||||
/// </summary>
|
||||
[EntityOfType(EntityType.Trait)]
|
||||
public class Trait : 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 TraitType Type { get; set; }
|
||||
|
||||
[Newtonsoft.Json.JsonIgnore]
|
||||
public virtual ICollection<Entity> Entities { get; set; } = [];
|
||||
/// <summary>
|
||||
/// Сущности, которые имеют данный признак.
|
||||
/// </summary>
|
||||
public ICollection<Entity> Entities { get; set; } = [];
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user