2024-12-16 15:38:46 +05:00
|
|
|
|
using DD.Persistence.Models;
|
2024-12-04 14:13:25 +05:00
|
|
|
|
|
2024-12-16 15:38:46 +05:00
|
|
|
|
namespace DD.Persistence.Repositories;
|
2024-12-04 14:13:25 +05:00
|
|
|
|
public interface IParameterRepository
|
|
|
|
|
{
|
2024-12-12 16:56:25 +05:00
|
|
|
|
/// <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);
|
2024-12-04 14:13:25 +05:00
|
|
|
|
|
2024-12-12 16:56:25 +05:00
|
|
|
|
/// <summary>
|
|
|
|
|
/// Получить диапазон дат, для которых есть данные в репозитории
|
|
|
|
|
/// </summary>
|
|
|
|
|
/// <param name="token"></param>
|
|
|
|
|
/// <returns></returns>
|
|
|
|
|
Task<DatesRangeDto> GetDatesRangeAsync(Guid idDiscriminator, CancellationToken token);
|
2024-12-04 14:13:25 +05:00
|
|
|
|
|
2024-12-12 16:56:25 +05:00
|
|
|
|
/// <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);
|
2024-12-04 14:13:25 +05:00
|
|
|
|
|
2024-12-12 16:56:25 +05:00
|
|
|
|
/// <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);
|
2024-12-04 14:13:25 +05:00
|
|
|
|
}
|