42 lines
1.2 KiB
C#
42 lines
1.2 KiB
C#
using System.ComponentModel.DataAnnotations;
|
|
using System.ComponentModel.DataAnnotations.Schema;
|
|
using Microsoft.EntityFrameworkCore;
|
|
using Pf2e.Database.Model.Base;
|
|
using Pf2e.Database.Model.Enum;
|
|
|
|
namespace Pf2e.Database.Model.Structure;
|
|
|
|
/// <summary>
|
|
/// Группа подклассов.
|
|
/// </summary>
|
|
[EntityOfType(EntityType.SubclassGroup)]
|
|
public class SubclassGroup : 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? ClassId { get; set; } = null;
|
|
|
|
/// <summary>
|
|
/// Класс, к которому относится группа подклассов.
|
|
/// </summary>
|
|
public Class? Class { get; set; } = null!;
|
|
|
|
/// <summary>
|
|
/// Коллекция подклассов, относящихся к этой группе.
|
|
/// </summary>
|
|
public ICollection<Subclass> Subclasses { get; set; } = [];
|
|
}
|