persistence/DD.Persistence.Database/Entity/Setpoint.cs

24 lines
727 B
C#
Raw Permalink Normal View History

using DD.Persistence.Database.EntityAbstractions;
2025-01-13 17:45:49 +05:00
using Microsoft.EntityFrameworkCore;
using System.ComponentModel.DataAnnotations.Schema;
using System.Text.Json;
namespace DD.Persistence.Database.Entity;
[Table("setpoint")]
[PrimaryKey(nameof(Key), nameof(Timestamp))]
public class Setpoint : ITimestampedItem
{
[Comment("Ключ")]
public Guid Key { get; set; }
[Column(TypeName = "jsonb"), Comment("Значение уставки")]
public required JsonElement Value { get; set; }
[Comment("Дата создания уставки")]
public DateTimeOffset Timestamp { get; set; }
[Comment("Id автора последнего изменения")]
public Guid IdUser { get; set; }
}