56 lines
1.6 KiB
C#
56 lines
1.6 KiB
C#
using System.ComponentModel.DataAnnotations;
|
|
using System.ComponentModel.DataAnnotations.Schema;
|
|
using Microsoft.EntityFrameworkCore;
|
|
using Pf2eModel.Model.Base;
|
|
using Pf2eModel.Model.Common.I18n;
|
|
using Pf2eModel.Model.Enum;
|
|
using Pf2eModel.Model.Structure.ClassRelation;
|
|
|
|
namespace Pf2eModel.Model.Structure;
|
|
|
|
/// <summary>
|
|
/// Подкласс.
|
|
/// </summary>
|
|
[EntityOfType(EntityType.Subclass)]
|
|
public class Subclass : 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 GroupId { get; set; }
|
|
|
|
/// <summary>
|
|
/// Группа подклассов.
|
|
/// </summary>
|
|
public SubclassGroup Group { get; set; } = null!;
|
|
|
|
/// <summary>
|
|
/// Дополнительная информация.
|
|
/// </summary>
|
|
[Column(Order = 3)]
|
|
[Comment("Дополнительная информация")]
|
|
public LocaleString Additional { get; set; } = [];
|
|
|
|
/// <summary>
|
|
/// Дополнительная информация в формате JSON.
|
|
/// </summary>
|
|
[Column(Order = 4)]
|
|
public string Extra { get; set; } = "{}";
|
|
|
|
public ICollection<Entity> Entities { get; set; } = [];
|
|
|
|
public ICollection<SubclassTrainings> Trainings { get; set; } = [];
|
|
}
|