2024-07-04 11:02:45 +05:00
|
|
|
using System;
|
2021-11-24 16:16:17 +05:00
|
|
|
using System.Collections.Generic;
|
2024-01-16 13:24:42 +05:00
|
|
|
using System.ComponentModel.DataAnnotations;
|
2023-06-21 12:33:18 +05:00
|
|
|
using AsbCloudApp.Data.User;
|
2021-11-24 16:16:17 +05:00
|
|
|
|
2022-04-11 18:00:34 +05:00
|
|
|
namespace AsbCloudApp.Data.SAUB
|
2021-11-24 16:16:17 +05:00
|
|
|
{
|
2022-06-02 12:35:51 +05:00
|
|
|
/// <summary>
|
|
|
|
/// DTO запроса для предложения по изменению уставок на панели оператора
|
|
|
|
/// </summary>
|
|
|
|
public class SetpointsRequestDto : IId, IWellRelated
|
2021-11-24 16:16:17 +05:00
|
|
|
{
|
2022-06-02 12:35:51 +05:00
|
|
|
/// <inheritdoc/>
|
2024-01-16 13:24:42 +05:00
|
|
|
[Required]
|
2021-11-24 16:16:17 +05:00
|
|
|
public int Id { get; set; }
|
|
|
|
|
2022-06-02 12:35:51 +05:00
|
|
|
/// <inheritdoc/>
|
2024-01-16 13:24:42 +05:00
|
|
|
[Required]
|
2021-11-24 16:16:17 +05:00
|
|
|
public int IdWell { get; set; }
|
|
|
|
|
2022-06-02 12:35:51 +05:00
|
|
|
/// <summary>
|
|
|
|
/// Id автора запроса
|
|
|
|
/// </summary>
|
2024-01-16 13:24:42 +05:00
|
|
|
[Required]
|
2021-11-24 16:16:17 +05:00
|
|
|
public int IdAuthor { get; set; }
|
|
|
|
|
2022-06-02 12:35:51 +05:00
|
|
|
/// <summary>
|
|
|
|
/// текущее состояние запроса 0: неизвестно, 1:ожидает отправки, 2: отправлено, 3: принято оператором, 4: отклонено оператором, 5: устарело
|
|
|
|
/// </summary>
|
2024-01-16 13:24:42 +05:00
|
|
|
[Required]
|
2021-11-24 16:16:17 +05:00
|
|
|
public int IdState { get; set; }
|
|
|
|
|
2022-06-02 12:35:51 +05:00
|
|
|
/// <summary>
|
|
|
|
/// отметка времени создания запроса
|
|
|
|
/// </summary>
|
2024-03-25 09:29:44 +05:00
|
|
|
public DateTimeOffset UploadDate { get; set; } = DateTimeOffset.Now;
|
2021-11-24 16:16:17 +05:00
|
|
|
|
2022-06-02 12:35:51 +05:00
|
|
|
/// <summary>
|
|
|
|
/// время в секундах актуальности этого запроса
|
|
|
|
/// </summary>
|
2024-01-16 13:24:42 +05:00
|
|
|
[Required]
|
2024-02-16 11:24:03 +05:00
|
|
|
[Range(10 * 60, 4 * 60 * 60)]
|
|
|
|
public int ObsolescenceSec { get; set; } = 10 * 60;
|
2021-11-24 16:16:17 +05:00
|
|
|
|
2022-06-02 12:35:51 +05:00
|
|
|
/// <summary>
|
|
|
|
/// набор уставок: {"название переменной панели"; "рекомендуемое значение"}
|
|
|
|
/// </summary>
|
2024-01-16 13:24:42 +05:00
|
|
|
[Required]
|
2023-02-20 14:21:52 +05:00
|
|
|
public Dictionary<string, double> Setpoints { get; set; } = new();
|
2022-06-02 12:35:51 +05:00
|
|
|
|
|
|
|
/// <summary>
|
|
|
|
/// Комментарий для оператора панели
|
|
|
|
/// </summary>
|
2023-02-20 14:21:52 +05:00
|
|
|
public string? Comment { get; set; }
|
2021-11-24 16:16:17 +05:00
|
|
|
|
2022-06-02 12:35:51 +05:00
|
|
|
/// <summary>
|
|
|
|
/// DTO скважины
|
|
|
|
/// </summary>
|
2023-02-20 14:21:52 +05:00
|
|
|
public WellDto? Well { get; set; }
|
2021-11-24 16:16:17 +05:00
|
|
|
|
2022-06-02 12:35:51 +05:00
|
|
|
/// <summary>
|
|
|
|
/// DTO автора
|
|
|
|
/// </summary>
|
2023-02-20 14:21:52 +05:00
|
|
|
public UserDto? Author { get; set; }
|
2021-11-24 16:16:17 +05:00
|
|
|
}
|
|
|
|
}
|