2024-12-13 09:51:30 +05:00
|
|
|
using System.ComponentModel.DataAnnotations;
|
2024-12-16 15:38:46 +05:00
|
|
|
using DD.Persistence.Models.Enumerations;
|
2024-11-28 08:55:50 +05:00
|
|
|
|
2024-12-16 15:38:46 +05:00
|
|
|
namespace DD.Persistence.Models
|
2024-11-25 13:49:07 +05:00
|
|
|
{
|
2024-12-09 13:19:55 +05:00
|
|
|
/// <summary>
|
|
|
|
/// Модель технологического сообщения
|
|
|
|
/// </summary>
|
|
|
|
public class TechMessageDto
|
|
|
|
{
|
|
|
|
/// <summary>
|
|
|
|
/// Id события
|
|
|
|
/// </summary>
|
|
|
|
[Required]
|
|
|
|
public Guid EventId { get; set; }
|
2024-11-25 13:49:07 +05:00
|
|
|
|
2024-12-09 13:19:55 +05:00
|
|
|
/// <summary>
|
|
|
|
/// Id Категории важности
|
|
|
|
/// </summary>
|
|
|
|
[Range(0, int.MaxValue, ErrorMessage = "Id Категории важности не может быть меньше 0")]
|
|
|
|
public int CategoryId { get; set; }
|
2024-11-25 13:49:07 +05:00
|
|
|
|
2024-12-09 13:19:55 +05:00
|
|
|
/// <summary>
|
|
|
|
/// Дата возникновения
|
|
|
|
/// </summary>
|
|
|
|
public DateTimeOffset Timestamp { get; set; }
|
2024-11-25 13:49:07 +05:00
|
|
|
|
|
|
|
/// <summary>
|
|
|
|
/// Текст сообщения
|
|
|
|
/// </summary>
|
2024-11-28 08:55:50 +05:00
|
|
|
[Required]
|
|
|
|
[StringLength(512, MinimumLength = 1, ErrorMessage = "Допустимая длина текста сообщения от 1 до 512 символов")]
|
2024-12-12 11:47:52 +05:00
|
|
|
public required string Text { get; set; }
|
2024-11-25 13:49:07 +05:00
|
|
|
|
|
|
|
/// <summary>
|
2024-12-12 11:47:52 +05:00
|
|
|
/// Статус события
|
2024-11-25 13:49:07 +05:00
|
|
|
/// </summary>
|
2024-12-12 11:47:52 +05:00
|
|
|
public EventState EventState { get; set; }
|
2024-11-25 13:49:07 +05:00
|
|
|
}
|
|
|
|
}
|