2021-04-23 10:21:25 +05:00
|
|
|
|
using System;
|
2023-03-07 00:04:20 +05:00
|
|
|
|
using System.ComponentModel.DataAnnotations;
|
2021-04-23 10:21:25 +05:00
|
|
|
|
|
|
|
|
|
namespace AsbCloudApp.Data
|
|
|
|
|
{
|
|
|
|
|
/// <summary>
|
|
|
|
|
/// Сообщение для frontend
|
|
|
|
|
/// </summary>
|
2021-09-09 12:31:12 +05:00
|
|
|
|
public class MessageDto : IId
|
2021-04-23 10:21:25 +05:00
|
|
|
|
{
|
2022-06-02 12:35:51 +05:00
|
|
|
|
/// <inheritdoc/>
|
2024-01-16 13:24:42 +05:00
|
|
|
|
[Required]
|
2021-04-23 10:21:25 +05:00
|
|
|
|
public int Id { get; set; }
|
|
|
|
|
|
2022-06-02 12:35:51 +05:00
|
|
|
|
/// <summary>
|
|
|
|
|
/// дата появления события
|
|
|
|
|
/// </summary>
|
2024-01-16 13:24:42 +05:00
|
|
|
|
[Required]
|
2023-10-04 10:25:05 +05:00
|
|
|
|
public DateTime DateTime { get; set; }
|
2021-04-23 10:21:25 +05:00
|
|
|
|
|
2022-06-02 12:35:51 +05:00
|
|
|
|
/// <summary>
|
|
|
|
|
/// категория события
|
|
|
|
|
/// </summary>
|
2024-01-16 13:24:42 +05:00
|
|
|
|
[Required]
|
2023-03-10 05:09:41 +05:00
|
|
|
|
[Range(1, int.MaxValue, ErrorMessage = "Id категории не может быть ниже 1")]
|
2021-04-23 10:21:25 +05:00
|
|
|
|
public int CategoryId { get; set; }
|
|
|
|
|
|
2022-06-02 12:35:51 +05:00
|
|
|
|
/// <summary>
|
|
|
|
|
/// глубина забоя, при котором событие возникло
|
|
|
|
|
/// </summary>
|
2024-01-16 13:24:42 +05:00
|
|
|
|
[Required]
|
2023-03-10 05:53:48 +05:00
|
|
|
|
[Range(-1, int.MaxValue, ErrorMessage = "Id скважины не может быть ниже 1")]
|
2021-09-24 11:17:31 +05:00
|
|
|
|
public double WellDepth { get; set; }
|
|
|
|
|
|
2022-06-02 12:35:51 +05:00
|
|
|
|
/// <summary>
|
|
|
|
|
/// пользователь панели оператора
|
|
|
|
|
/// </summary>
|
2023-02-22 15:31:16 +05:00
|
|
|
|
public string? User { get; set; }
|
2021-04-23 10:21:25 +05:00
|
|
|
|
|
2022-06-02 12:35:51 +05:00
|
|
|
|
/// <summary>
|
|
|
|
|
/// текст сообщения
|
|
|
|
|
/// </summary>
|
2024-01-16 13:24:42 +05:00
|
|
|
|
[Required]
|
2023-03-10 05:09:41 +05:00
|
|
|
|
[StringLength(400, MinimumLength = 1, ErrorMessage = "Допустимая длина текста сообщения от 1 до 400 символов")]
|
2023-02-22 15:03:15 +05:00
|
|
|
|
public string Message { get; set; } = string.Empty;
|
2021-04-23 10:21:25 +05:00
|
|
|
|
}
|
|
|
|
|
}
|