2024-11-25 10:05:23 +05:00
|
|
|
|
|
|
|
|
|
using System.ComponentModel.DataAnnotations.Schema;
|
|
|
|
|
using System.ComponentModel.DataAnnotations;
|
|
|
|
|
|
|
|
|
|
namespace Persistence.Database.Model;
|
|
|
|
|
|
|
|
|
|
/// <summary>
|
2024-11-25 18:11:46 +05:00
|
|
|
|
/// Часть записи, описывающая изменение
|
2024-11-25 10:05:23 +05:00
|
|
|
|
/// </summary>
|
2024-11-25 18:11:46 +05:00
|
|
|
|
public class ChangeLog : IChangeLog
|
2024-11-25 10:05:23 +05:00
|
|
|
|
{
|
|
|
|
|
/// <summary>
|
2024-11-26 11:47:42 +05:00
|
|
|
|
/// Ключ записи
|
2024-11-25 10:05:23 +05:00
|
|
|
|
/// </summary>
|
|
|
|
|
[Key, Column("Id")]
|
|
|
|
|
public Guid Id { get; set; }
|
|
|
|
|
|
2024-11-25 18:11:46 +05:00
|
|
|
|
/// <summary>
|
|
|
|
|
/// Дискриминатор таблицы
|
|
|
|
|
/// </summary>
|
|
|
|
|
[Column("IdDiscriminator")]
|
|
|
|
|
public Guid IdDiscriminator { get; set; }
|
|
|
|
|
|
2024-11-25 10:05:23 +05:00
|
|
|
|
/// <summary>
|
|
|
|
|
/// Автор изменения
|
|
|
|
|
/// </summary>
|
|
|
|
|
[Column("IdAuthor")]
|
|
|
|
|
public Guid IdAuthor { get; set; }
|
|
|
|
|
|
|
|
|
|
/// <summary>
|
|
|
|
|
/// Редактор
|
|
|
|
|
/// </summary>
|
|
|
|
|
[Column("IdEditor")]
|
|
|
|
|
public Guid? IdEditor { get; set; }
|
|
|
|
|
|
|
|
|
|
/// <summary>
|
|
|
|
|
/// Дата создания записи
|
|
|
|
|
/// </summary>
|
|
|
|
|
[Column("Creation")]
|
|
|
|
|
public DateTimeOffset Creation { get; set; }
|
|
|
|
|
|
|
|
|
|
/// <summary>
|
|
|
|
|
/// Дата устаревания (например при удалении)
|
|
|
|
|
/// </summary>
|
|
|
|
|
[Column("Obsolete")]
|
|
|
|
|
public DateTimeOffset? Obsolete { get; set; }
|
|
|
|
|
|
|
|
|
|
/// <summary>
|
|
|
|
|
/// Id заменяющей записи
|
|
|
|
|
/// </summary>
|
|
|
|
|
[Column("IdNext")]
|
|
|
|
|
public Guid? IdNext { get; set; }
|
|
|
|
|
|
|
|
|
|
/// <summary>
|
|
|
|
|
/// Значение
|
|
|
|
|
/// </summary>
|
|
|
|
|
[Column("Value", TypeName = "jsonb")]
|
2024-11-26 11:47:42 +05:00
|
|
|
|
public required IDictionary<string, object> Value { get; set; }
|
2024-11-25 10:05:23 +05:00
|
|
|
|
}
|