Документирование и небольшой рефакторинг модели.

This commit is contained in:
2025-05-11 00:31:15 +04:00
parent 1a977ee988
commit 3c65274b45
64 changed files with 1960 additions and 554 deletions
+27 -4
View File
@@ -4,13 +4,24 @@ 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; }
/*
@@ -19,18 +30,30 @@ public class EntityExternal
public string ExternalId { get; set; } = "";
*/
/// <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("Контроль версии объекта")]
[Comment("Контрольная сумма объекта")]
public string Md5 { get; set; } = null!;
[Newtonsoft.Json.JsonIgnore]
public virtual Entity Entity { get; set; } = null!;
/// <summary>
/// Сущность, которая ссылается на внешнюю ссылку.
/// </summary>
public Entity Entity { get; set; } = null!;
public virtual ExternalTarget Target { get; set; } = null!;
/// <summary>
/// Цель внешней ссылки.
/// </summary>
public ExternalTarget Target { get; set; } = null!;
}