2024-12-16 15:38:46 +05:00
|
|
|
|
using DD.Persistence.Models;
|
|
|
|
|
using DD.Persistence.Models.Requests;
|
2024-12-09 14:45:35 +05:00
|
|
|
|
|
2024-12-16 15:38:46 +05:00
|
|
|
|
namespace DD.Persistence.Client.Clients.Interfaces;
|
2024-12-09 14:45:35 +05:00
|
|
|
|
|
|
|
|
|
/// <summary>
|
|
|
|
|
/// Клиент для работы с технологическими сообщениями
|
|
|
|
|
/// </summary>
|
2024-12-10 13:55:01 +05:00
|
|
|
|
public interface ITechMessagesClient : IDisposable
|
2024-12-09 14:45:35 +05:00
|
|
|
|
{
|
|
|
|
|
/// <summary>
|
|
|
|
|
/// Добавить новые технологические сообщения
|
|
|
|
|
/// </summary>
|
|
|
|
|
/// <param name="dtos"></param>
|
|
|
|
|
/// <param name="token"></param>
|
|
|
|
|
/// <returns></returns>
|
2024-12-12 11:47:52 +05:00
|
|
|
|
Task<int> AddRange(Guid systemId, IEnumerable<TechMessageDto> dtos, CancellationToken token);
|
2024-12-09 14:45:35 +05:00
|
|
|
|
|
|
|
|
|
/// <summary>
|
|
|
|
|
/// Получить диапазон дат, для которых есть данные в репозитории
|
|
|
|
|
/// </summary>
|
|
|
|
|
/// <param name="token"></param>
|
|
|
|
|
/// <returns></returns>
|
2024-12-13 17:30:35 +05:00
|
|
|
|
Task<DatesRangeDto?> GetDatesRangeAsync(CancellationToken token);
|
2024-12-09 14:45:35 +05:00
|
|
|
|
|
|
|
|
|
/// <summary>
|
|
|
|
|
/// Получить список технологических сообщений в виде страницы
|
|
|
|
|
/// </summary>
|
|
|
|
|
/// <param name="request"></param>
|
|
|
|
|
/// <param name="token"></param>
|
|
|
|
|
/// <returns></returns>
|
2024-12-10 13:55:01 +05:00
|
|
|
|
Task<PaginationContainer<TechMessageDto>> GetPage(PaginationRequest request, CancellationToken token);
|
2024-12-09 14:45:35 +05:00
|
|
|
|
|
|
|
|
|
/// <summary>
|
|
|
|
|
/// Получить порцию записей, начиная с заданной даты
|
|
|
|
|
/// </summary>
|
|
|
|
|
/// <param name="dateBegin"></param>
|
|
|
|
|
/// <param name="take"></param>
|
|
|
|
|
/// <param name="token"></param>
|
|
|
|
|
/// <returns></returns>
|
|
|
|
|
Task<IEnumerable<TechMessageDto>> GetPart(DateTimeOffset dateBegin, int take, CancellationToken token);
|
|
|
|
|
|
|
|
|
|
/// <summary>
|
|
|
|
|
/// Получить статистику по системам
|
|
|
|
|
/// </summary>
|
2024-12-12 11:47:52 +05:00
|
|
|
|
/// <param name="systemIds"></param>
|
2024-12-13 15:30:11 +05:00
|
|
|
|
/// <param name="categoryIds"></param>
|
2024-12-09 14:45:35 +05:00
|
|
|
|
/// <param name="token"></param>
|
|
|
|
|
/// <returns></returns>
|
2024-12-12 11:47:52 +05:00
|
|
|
|
Task<IEnumerable<MessagesStatisticDto>> GetStatistics(IEnumerable<Guid> systemIds, IEnumerable<int> categoryIds, CancellationToken token);
|
2024-12-09 14:45:35 +05:00
|
|
|
|
|
|
|
|
|
/// <summary>
|
|
|
|
|
/// Получить список всех систем
|
|
|
|
|
/// </summary>
|
|
|
|
|
/// <param name="token"></param>
|
|
|
|
|
/// <returns></returns>
|
2024-12-12 17:05:47 +05:00
|
|
|
|
Task<IEnumerable<DataSourceSystemDto>> GetSystems(CancellationToken token);
|
2024-12-09 14:45:35 +05:00
|
|
|
|
}
|