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