60 lines
1.5 KiB
C#
60 lines
1.5 KiB
C#
|
|
using System.ComponentModel.DataAnnotations.Schema;
|
|
using System.ComponentModel.DataAnnotations;
|
|
|
|
namespace Persistence.Database.Model;
|
|
|
|
/// <summary>
|
|
/// Часть записи, описывающая изменение
|
|
/// </summary>
|
|
public class ChangeLog : IChangeLog
|
|
{
|
|
/// <summary>
|
|
/// Ид записи
|
|
/// </summary>
|
|
[Key, Column("Id")]
|
|
public Guid Id { get; set; }
|
|
|
|
/// <summary>
|
|
/// Дискриминатор таблицы
|
|
/// </summary>
|
|
[Column("IdDiscriminator")]
|
|
public Guid IdDiscriminator { get; set; }
|
|
|
|
/// <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")]
|
|
public required object Value { get; set; }
|
|
}
|