46 lines
1.8 KiB
C#
46 lines
1.8 KiB
C#
using DD.Persistence.Models;
|
||
|
||
namespace DD.Persistence.Services.Interfaces;
|
||
|
||
/// <summary>
|
||
/// Сервис для работы с параметрами Wits
|
||
/// </summary>
|
||
public interface IWitsDataService
|
||
{
|
||
/// <summary>
|
||
/// Получить набор параметров для построения графика
|
||
/// </summary>
|
||
/// <param name="idDiscriminator"></param>
|
||
/// <param name="token"></param>
|
||
/// <returns></returns>
|
||
Task<DatesRangeDto> GetDatesRangeAsync(Guid idDiscriminator, CancellationToken token);
|
||
|
||
/// <summary>
|
||
/// Получить порцию записей, начиная с заданной даты
|
||
/// </summary>
|
||
/// <param name="idDiscriminator"></param>
|
||
/// <param name="dateBegin"></param>
|
||
/// <param name="take"></param>
|
||
/// <param name="token"></param>
|
||
/// <returns></returns>
|
||
Task<IEnumerable<WitsDataDto>> GetPart(Guid idDiscriminator, DateTimeOffset dateBegin, int take, CancellationToken token);
|
||
|
||
/// <summary>
|
||
/// Получить диапазон дат, для которых есть данные в репозитории
|
||
/// </summary>
|
||
/// <param name="discriminatorId"></param>
|
||
/// <param name="dateFrom"></param>
|
||
/// <param name="dateTo"></param>
|
||
/// <param name="approxPointsCount"></param>
|
||
/// <param name="token"></param>
|
||
/// <returns></returns>
|
||
Task<IEnumerable<WitsDataDto>> GetValuesForGraph(Guid discriminatorId, DateTimeOffset dateFrom, DateTimeOffset dateTo, int approxPointsCount, CancellationToken token);
|
||
|
||
/// <summary>
|
||
/// Сохранить набор параметров
|
||
/// </summary>
|
||
/// <param name="dtos"></param>
|
||
/// <param name="token"></param>
|
||
/// <returns></returns>
|
||
Task<int> AddRange(IEnumerable<WitsDataDto> dtos, CancellationToken token);
|
||
} |