62 lines
2.0 KiB
C#
62 lines
2.0 KiB
C#
using System.ComponentModel.DataAnnotations;
|
|
using System.ComponentModel.DataAnnotations.Schema;
|
|
using Microsoft.EntityFrameworkCore;
|
|
|
|
namespace Pf2eModel.Model.Base.Targets;
|
|
|
|
/// <summary>
|
|
/// Внешняя ссылка сущности.
|
|
/// </summary>
|
|
[PrimaryKey(nameof(EntityId), nameof(TargetId))]
|
|
public class EntityExternal
|
|
{
|
|
/// <summary>
|
|
/// Идентификатор сущности.
|
|
/// </summary>
|
|
[Column(Order = 1)]
|
|
[Comment("Идентификатор сущности")]
|
|
public int EntityId { get; set; }
|
|
|
|
/// <summary>
|
|
/// Идентификатор цели.
|
|
/// </summary>
|
|
[Column(Order = 2)]
|
|
[Comment("Идентификатор цели")]
|
|
public int TargetId { get; set; }
|
|
|
|
/// <summary>
|
|
/// Идентификатор элемента по ссылке.
|
|
/// </summary>
|
|
[Column(Order = 3)]
|
|
[MaxLength(255)]
|
|
[Comment("Идентификатор элемента в ссылке")]
|
|
public string? ExternalId { get; set; } = null;
|
|
|
|
/// <summary>
|
|
/// Конечная часть URL внешней ссылки.
|
|
/// Для источников Foundry - полный UUID объекта.
|
|
/// </summary>
|
|
[Column(Order = 4)]
|
|
[MaxLength(255)]
|
|
[Comment("Часть URL до объекта. Для источников Foundry - полный UUID объекта")]
|
|
public string Suffix { get; set; } = "";
|
|
|
|
/// <summary>
|
|
/// Контрольная сумма объекта.
|
|
/// </summary>
|
|
[Column(Order = 5)]
|
|
[MaxLength(32)]
|
|
[Comment("Контрольная сумма объекта")]
|
|
public string Md5 { get; set; } = null!;
|
|
|
|
/// <summary>
|
|
/// Сущность, которая ссылается на внешнюю ссылку.
|
|
/// </summary>
|
|
public Entity Entity { get; set; } = null!;
|
|
|
|
/// <summary>
|
|
/// Цель внешней ссылки.
|
|
/// </summary>
|
|
public ExternalTarget Target { get; set; } = null!;
|
|
}
|