2024-07-04 11:02:45 +05:00
|
|
|
using AsbCloudApp.Data.User;
|
2024-05-17 16:40:31 +05:00
|
|
|
using System;
|
|
|
|
|
|
|
|
namespace AsbCloudApp.Data;
|
|
|
|
|
|
|
|
/// <summary>
|
|
|
|
/// Часть записи описывающая изменение
|
|
|
|
/// </summary>
|
2024-05-23 14:25:37 +05:00
|
|
|
public class ChangeLogDto<T> where T: IId
|
2024-05-17 16:40:31 +05:00
|
|
|
{
|
|
|
|
/// <summary>
|
|
|
|
/// Запись
|
|
|
|
/// </summary>
|
|
|
|
public required T Item { get; set; }
|
|
|
|
|
|
|
|
/// <summary>
|
|
|
|
/// Автор
|
|
|
|
/// </summary>
|
|
|
|
public UserDto? Author { get; set; }
|
|
|
|
|
|
|
|
/// <summary>
|
|
|
|
/// Автор
|
|
|
|
/// </summary>
|
|
|
|
public UserDto? Editor { get; set; }
|
|
|
|
|
|
|
|
/// <summary>
|
|
|
|
/// Дата создания записи
|
|
|
|
/// </summary>
|
|
|
|
public DateTimeOffset Creation { get; set; }
|
|
|
|
|
|
|
|
/// <summary>
|
|
|
|
/// Дата устаревания (например при удалении)
|
|
|
|
/// </summary>
|
|
|
|
public DateTimeOffset? Obsolete { get; set; }
|
|
|
|
|
|
|
|
/// <summary>
|
|
|
|
/// ИД состояния записи:
|
|
|
|
/// <list type="table">
|
|
|
|
/// <item>
|
|
|
|
/// <term>0</term>
|
|
|
|
/// <description>актуальная запись</description>
|
|
|
|
/// </item>
|
|
|
|
/// <item>
|
|
|
|
/// <term>1</term>
|
|
|
|
/// <description>замененная запись</description>
|
|
|
|
/// </item>
|
|
|
|
/// <item>
|
|
|
|
/// <term>2</term>
|
|
|
|
/// <description>удаленная запись</description>
|
|
|
|
/// </item>
|
|
|
|
/// </list>
|
|
|
|
/// </summary>
|
|
|
|
public int IdState { get; set; }
|
|
|
|
|
|
|
|
/// <summary>
|
|
|
|
/// Id заменяемой записи
|
|
|
|
/// </summary>
|
|
|
|
public int? IdPrevious { get; set; }
|
|
|
|
}
|