DD.WellWorkover.Cloud/AsbCloudApp/Requests/MessageRequest.cs

105 lines
2.6 KiB
C#
Raw Blame History

This file contains ambiguous Unicode characters

This file contains Unicode characters that might be confused with other characters. If you think that this is intentional, you can safely ignore this warning. Use the Escape button to reveal them.

using AsbCloudApp.Data;
using AsbCloudApp.Data.SAUB;
using System;
using System.Collections.Generic;
namespace AsbCloudApp.Requests;
/// <summary>
/// параметры для запроса списка сообщений
/// </summary>
public class MessageRequestBase : RequestBase
{
/// <summary>
/// категория
/// </summary>
public IEnumerable<int>? IdsCategories { get; set; }
/// <summary>
/// начальная дата
/// </summary>
public DateTimeOffset? Begin { get; set; }
/// <summary>
/// конечная дата
/// </summary>
public DateTimeOffset? End { get; set; }
/// <summary>
/// строка поиска
/// </summary>
public string? SearchString { get; set; }
/// <summary>
///
/// </summary>
public MessageRequestBase()
{
}
/// <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;
}
}
/// <summary>
/// параметры для запроса списка сообщений (с ids скважин)
/// </summary>
public class MessageRequest : MessageRequestBase
{
/// <summary>
/// ids скважин
/// </summary>
public IEnumerable<int> IdsWell { get; set; } = null!;
/// <summary>
/// параметры для запроса списка сообщений (с ids скважин)
/// </summary>
/// <param name="request"></param>
/// <param name="idsWell"></param>
public MessageRequest(MessageRequestBase request, IEnumerable<int> idsWell) : base(request)
{
this.IdsWell = idsWell;
}
}
/// <summary>
/// параметры запроса для получения списка сообщений телеметрии
/// </summary>
public class MessageTelemetryRequest : MessageRequestBase
{
/// <summary>
/// события
/// </summary>
public IEnumerable<TelemetryEventDto> Events { get; set; } = null!;
/// <summary>
/// телеметрии
/// </summary>
public IEnumerable<TelemetryBaseDto> Telemetries { get; set; } = null!;
/// <summary>
///
/// </summary>
/// <param name="request"></param>
public MessageTelemetryRequest(MessageRequestBase request) : base(request)
{
}
}