2024-11-25 10:05:23 +05:00
|
|
|
|
|
|
|
|
|
using System.ComponentModel.DataAnnotations.Schema;
|
|
|
|
|
using System.ComponentModel.DataAnnotations;
|
2024-12-05 18:13:52 +05:00
|
|
|
|
using Microsoft.EntityFrameworkCore;
|
2024-11-25 10:05:23 +05:00
|
|
|
|
|
|
|
|
|
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
|
|
|
|
{
|
2024-12-05 18:13:52 +05:00
|
|
|
|
[Key, Comment("Ключ записи")]
|
2024-11-25 10:05:23 +05:00
|
|
|
|
public Guid Id { get; set; }
|
|
|
|
|
|
2024-12-05 18:13:52 +05:00
|
|
|
|
[Comment("Дискриминатор таблицы")]
|
2024-11-25 18:11:46 +05:00
|
|
|
|
public Guid IdDiscriminator { get; set; }
|
|
|
|
|
|
2024-12-05 18:13:52 +05:00
|
|
|
|
[Comment("Автор изменения")]
|
2024-11-25 10:05:23 +05:00
|
|
|
|
public Guid IdAuthor { get; set; }
|
|
|
|
|
|
2024-12-05 18:13:52 +05:00
|
|
|
|
[Comment("Редактор")]
|
2024-11-25 10:05:23 +05:00
|
|
|
|
public Guid? IdEditor { get; set; }
|
|
|
|
|
|
2024-12-05 18:13:52 +05:00
|
|
|
|
[Comment("Дата создания записи")]
|
2024-11-25 10:05:23 +05:00
|
|
|
|
public DateTimeOffset Creation { get; set; }
|
|
|
|
|
|
2024-12-05 18:13:52 +05:00
|
|
|
|
[Comment("Дата устаревания (например при удалении)")]
|
2024-11-25 10:05:23 +05:00
|
|
|
|
public DateTimeOffset? Obsolete { get; set; }
|
|
|
|
|
|
2024-12-05 18:13:52 +05:00
|
|
|
|
[Comment("Id заменяющей записи")]
|
2024-11-25 10:05:23 +05:00
|
|
|
|
public Guid? IdNext { get; set; }
|
|
|
|
|
|
2024-12-05 18:13:52 +05:00
|
|
|
|
[Comment("Глубина забоя на дату начала интервала")]
|
2024-11-26 14:19:16 +05:00
|
|
|
|
public double DepthStart { get; set; }
|
|
|
|
|
|
2024-12-05 18:13:52 +05:00
|
|
|
|
[Comment("Глубина забоя на дату окончания интервала")]
|
2024-11-26 14:19:16 +05:00
|
|
|
|
public double DepthEnd { get; set; }
|
|
|
|
|
|
2024-12-05 18:13:52 +05:00
|
|
|
|
[Comment("Ключ секции")]
|
2024-11-26 14:19:16 +05:00
|
|
|
|
public Guid IdSection { get; set; }
|
|
|
|
|
|
2024-12-05 18:13:52 +05:00
|
|
|
|
[Column(TypeName = "jsonb"), Comment("Значение")]
|
2024-11-26 11:47:42 +05:00
|
|
|
|
public required IDictionary<string, object> Value { get; set; }
|
2024-11-25 10:05:23 +05:00
|
|
|
|
}
|