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

20 lines
664 B
C#
Raw Normal View History

2025-01-13 17:45:49 +05:00
using DD.Persistence.Database.EntityAbstractions;
using Microsoft.EntityFrameworkCore;
using System.ComponentModel.DataAnnotations;
using System.ComponentModel.DataAnnotations.Schema;
namespace DD.Persistence.Database.Entity;
2025-01-13 17:45:49 +05:00
[PrimaryKey(nameof(DiscriminatorId), nameof(Timestamp))]
public class TimestampedValues : ITimestampedItem
{
[Comment("Временная отметка"), Key]
public DateTimeOffset Timestamp { get; set; }
2025-01-13 17:45:49 +05:00
[Comment("Дискриминатор системы"),]
public Guid DiscriminatorId { get; set; }
2025-01-13 17:45:49 +05:00
[Comment("Данные"), Column(TypeName = "jsonb")]
public required object[] Values { get; set; }
}