persistence/Persistence/Repositories/IParameterRepository.cs
2024-12-12 16:56:25 +05:00

44 lines
1.7 KiB
C#
Raw Permalink 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 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);
}