2024-11-25 13:49:07 +05:00
|
|
|
using Microsoft.EntityFrameworkCore;
|
2024-12-09 13:19:55 +05:00
|
|
|
using System.ComponentModel.DataAnnotations;
|
2024-11-25 13:49:07 +05:00
|
|
|
using System.ComponentModel.DataAnnotations.Schema;
|
|
|
|
|
2024-12-16 15:38:46 +05:00
|
|
|
namespace DD.Persistence.Database.Entity
|
2024-11-25 13:49:07 +05:00
|
|
|
{
|
2024-12-09 13:19:55 +05:00
|
|
|
public class TechMessage
|
|
|
|
{
|
|
|
|
[Key, Comment("Id события")]
|
|
|
|
public Guid EventId { get; set; }
|
2024-11-25 13:49:07 +05:00
|
|
|
|
2024-12-09 13:19:55 +05:00
|
|
|
[Comment("Id Категории важности")]
|
|
|
|
public int CategoryId { get; set; }
|
2024-11-25 13:49:07 +05:00
|
|
|
|
2024-12-09 13:19:55 +05:00
|
|
|
[Comment("Дата возникновения")]
|
|
|
|
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; }
|
|
|
|
|
2024-12-12 17:05:47 +05:00
|
|
|
[Required, ForeignKey(nameof(SystemId)), Comment("Система, к которой относится сообщение")]
|
|
|
|
public virtual required DataSourceSystem 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
|
|
|
}
|
|
|
|
}
|