2024-11-25 13:49:07 +05:00
|
|
|
|
using System.ComponentModel.DataAnnotations;
|
|
|
|
|
using System.ComponentModel.DataAnnotations.Schema;
|
|
|
|
|
using Microsoft.EntityFrameworkCore;
|
|
|
|
|
|
|
|
|
|
namespace Persistence.Database.Entity
|
|
|
|
|
{
|
|
|
|
|
public class TechMessage
|
|
|
|
|
{
|
|
|
|
|
[Key, Comment("Id события")]
|
|
|
|
|
public Guid EventId { get; set; }
|
|
|
|
|
|
|
|
|
|
[Comment("Id Категории важности")]
|
2024-11-28 13:13:07 +05:00
|
|
|
|
public int CategoryId { get; set; }
|
2024-11-25 13:49:07 +05:00
|
|
|
|
|
|
|
|
|
[Comment("Дата возникновения")]
|
2024-11-28 13:13:07 +05:00
|
|
|
|
public DateTimeOffset Timestamp { get; set; }
|
2024-11-25 13:49:07 +05:00
|
|
|
|
|
|
|
|
|
[Column(TypeName = "varchar(512)"), Comment("Текст сообщения")]
|
2024-12-12 11:47:52 +05:00
|
|
|
|
public required string Text { get; set; }
|
2024-11-25 13:49:07 +05:00
|
|
|
|
|
2024-12-12 11:47:52 +05:00
|
|
|
|
[Required, Comment("Id системы, к которой относится сообщение")]
|
2024-11-28 08:55:50 +05:00
|
|
|
|
public required Guid SystemId { get; set; }
|
|
|
|
|
|
|
|
|
|
[Required, ForeignKey(nameof(SystemId)), Comment("Система автобурения, к которой относится сообщение")]
|
2024-12-02 15:14:00 +05:00
|
|
|
|
public virtual required DrillingSystem System { get; set; }
|
2024-11-25 13:49:07 +05:00
|
|
|
|
|
2024-12-12 11:47:52 +05:00
|
|
|
|
[Comment("Статус события")]
|
|
|
|
|
public int EventState { get; set; }
|
2024-11-25 13:49:07 +05:00
|
|
|
|
}
|
|
|
|
|
}
|