2024-09-10 10:16:31 +05:00
|
|
|
|
using AsbCloudApp.Data;
|
|
|
|
|
using AsbCloudApp.Data.SAUB;
|
2024-07-04 11:02:45 +05:00
|
|
|
|
using System;
|
2023-02-02 11:08:25 +05:00
|
|
|
|
using System.Collections.Generic;
|
2024-09-11 10:56:26 +05:00
|
|
|
|
using System.Linq;
|
2023-02-02 11:08:25 +05:00
|
|
|
|
|
2024-08-19 10:01:07 +05:00
|
|
|
|
namespace AsbCloudApp.Requests;
|
|
|
|
|
|
|
|
|
|
/// <summary>
|
|
|
|
|
/// параметры для запроса списка сообщений
|
|
|
|
|
/// </summary>
|
|
|
|
|
public class MessageRequestBase : RequestBase
|
2023-02-02 11:08:25 +05:00
|
|
|
|
{
|
|
|
|
|
/// <summary>
|
2024-08-19 10:01:07 +05:00
|
|
|
|
/// категория
|
2023-02-02 11:08:25 +05:00
|
|
|
|
/// </summary>
|
2024-09-10 10:16:31 +05:00
|
|
|
|
public IEnumerable<int>? IdsCategories { get; set; }
|
2023-02-02 11:08:25 +05:00
|
|
|
|
|
|
|
|
|
|
2024-08-19 10:01:07 +05:00
|
|
|
|
/// <summary>
|
|
|
|
|
/// начальная дата
|
|
|
|
|
/// </summary>
|
|
|
|
|
public DateTimeOffset? Begin { get; set; }
|
2023-02-02 11:08:25 +05:00
|
|
|
|
|
2024-08-19 10:01:07 +05:00
|
|
|
|
/// <summary>
|
|
|
|
|
/// конечная дата
|
|
|
|
|
/// </summary>
|
|
|
|
|
public DateTimeOffset? End { get; set; }
|
2023-02-02 11:08:25 +05:00
|
|
|
|
|
2024-08-19 10:01:07 +05:00
|
|
|
|
/// <summary>
|
|
|
|
|
/// строка поиска
|
|
|
|
|
/// </summary>
|
|
|
|
|
public string? SearchString { get; set; }
|
2023-02-02 11:08:25 +05:00
|
|
|
|
|
2024-09-10 12:33:24 +05:00
|
|
|
|
/// <summary>
|
|
|
|
|
///
|
|
|
|
|
/// </summary>
|
|
|
|
|
public MessageRequestBase()
|
|
|
|
|
{
|
|
|
|
|
|
|
|
|
|
}
|
|
|
|
|
|
2024-09-10 10:16:31 +05:00
|
|
|
|
/// <summary>
|
|
|
|
|
/// копирующий конструктор
|
|
|
|
|
/// </summary>
|
|
|
|
|
/// <param name="request"></param>
|
|
|
|
|
public MessageRequestBase(MessageRequestBase request)
|
|
|
|
|
{
|
|
|
|
|
this.IdsCategories = request.IdsCategories;
|
|
|
|
|
this.Begin = request.Begin;
|
|
|
|
|
this.End = request.End;
|
|
|
|
|
this.SearchString = request.SearchString;
|
|
|
|
|
|
|
|
|
|
this.Skip = request.Skip;
|
|
|
|
|
this.Take = request.Take;
|
|
|
|
|
this.SortFields = request.SortFields;
|
|
|
|
|
}
|
|
|
|
|
|
2024-08-19 10:01:07 +05:00
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
/// <summary>
|
2024-09-10 10:16:31 +05:00
|
|
|
|
/// параметры для запроса списка сообщений (с ids скважин)
|
2024-08-19 10:01:07 +05:00
|
|
|
|
/// </summary>
|
|
|
|
|
public class MessageRequest : MessageRequestBase
|
|
|
|
|
{
|
|
|
|
|
/// <summary>
|
2024-09-10 10:16:31 +05:00
|
|
|
|
/// ids скважин
|
2024-08-19 10:01:07 +05:00
|
|
|
|
/// </summary>
|
2024-09-10 10:16:31 +05:00
|
|
|
|
public IEnumerable<int> IdsWell { get; set; } = null!;
|
2023-02-02 11:08:25 +05:00
|
|
|
|
|
|
|
|
|
/// <summary>
|
2024-09-10 10:16:31 +05:00
|
|
|
|
/// параметры для запроса списка сообщений (с ids скважин)
|
2023-02-02 11:08:25 +05:00
|
|
|
|
/// </summary>
|
2024-08-19 10:01:07 +05:00
|
|
|
|
/// <param name="request"></param>
|
2024-09-10 10:16:31 +05:00
|
|
|
|
/// <param name="idsWell"></param>
|
|
|
|
|
public MessageRequest(MessageRequestBase request, IEnumerable<int> idsWell) : base(request)
|
2023-02-03 11:15:14 +05:00
|
|
|
|
{
|
2024-09-10 10:16:31 +05:00
|
|
|
|
this.IdsWell = idsWell;
|
|
|
|
|
}
|
|
|
|
|
}
|
2023-02-02 11:08:25 +05:00
|
|
|
|
|
2024-09-10 10:16:31 +05:00
|
|
|
|
/// <summary>
|
|
|
|
|
/// параметры запроса для получения списка сообщений телеметрии
|
|
|
|
|
/// </summary>
|
|
|
|
|
public class MessageTelemetryRequest : MessageRequestBase
|
|
|
|
|
{
|
|
|
|
|
/// <summary>
|
|
|
|
|
/// события
|
|
|
|
|
/// </summary>
|
2024-09-11 10:56:26 +05:00
|
|
|
|
public IEnumerable<TelemetryEventDto> Events { get; set; }= Enumerable.Empty<TelemetryEventDto>();
|
2023-02-02 11:08:25 +05:00
|
|
|
|
|
2024-09-10 10:16:31 +05:00
|
|
|
|
/// <summary>
|
|
|
|
|
/// телеметрии
|
|
|
|
|
/// </summary>
|
2024-09-11 10:56:26 +05:00
|
|
|
|
public IEnumerable<TelemetryBaseDto> Telemetries { get; set; } = Enumerable.Empty<TelemetryBaseDto>();
|
2024-08-19 10:01:07 +05:00
|
|
|
|
|
2024-09-11 10:56:26 +05:00
|
|
|
|
/// <inheritdoc/>
|
|
|
|
|
public MessageTelemetryRequest(
|
|
|
|
|
MessageRequestBase request,
|
|
|
|
|
IEnumerable<TelemetryEventDto> events,
|
|
|
|
|
IEnumerable<TelemetryBaseDto> telemetries) : base(request)
|
2024-09-10 10:16:31 +05:00
|
|
|
|
{
|
2024-09-11 10:56:26 +05:00
|
|
|
|
Events = events;
|
|
|
|
|
Telemetries = telemetries;
|
2024-09-10 10:16:31 +05:00
|
|
|
|
}
|
2024-09-11 10:56:26 +05:00
|
|
|
|
|
|
|
|
|
/// <inheritdoc/>
|
|
|
|
|
public MessageTelemetryRequest(MessageRequestBase request)
|
|
|
|
|
: base(request) { }
|
2023-02-02 11:08:25 +05:00
|
|
|
|
}
|
2024-09-10 10:16:31 +05:00
|
|
|
|
|