2024-11-12 13:36:09 +05:00
|
|
|
|
using Persistence.Models;
|
|
|
|
|
|
|
|
|
|
namespace Persistence.Repositories;
|
2024-10-31 15:01:12 +05:00
|
|
|
|
|
|
|
|
|
/// <summary>
|
2024-11-02 12:05:12 +05:00
|
|
|
|
/// Интерфейс по работе с временными данными
|
2024-10-31 15:01:12 +05:00
|
|
|
|
/// </summary>
|
2024-11-12 13:36:09 +05:00
|
|
|
|
/// <typeparam name="TDto"></typeparam>
|
2024-11-01 12:26:14 +05:00
|
|
|
|
public interface ITimeSeriesDataRepository<TDto> : ISyncRepository<TDto>
|
2024-11-14 15:17:43 +05:00
|
|
|
|
where TDto : class, ITimeSeriesAbstractDto, new()
|
2024-10-31 15:01:12 +05:00
|
|
|
|
{
|
2024-11-12 13:36:09 +05:00
|
|
|
|
/// <summary>
|
|
|
|
|
/// Получить страницу списка объектов
|
|
|
|
|
/// </summary>
|
|
|
|
|
/// <param name="dateBegin">дата начала</param>
|
|
|
|
|
/// <param name="dateEnd">дата окончания</param>
|
|
|
|
|
/// <param name="token"></param>
|
|
|
|
|
/// <returns></returns>
|
|
|
|
|
Task<IEnumerable<TDto>> GetAsync(DateTimeOffset dateBegin, DateTimeOffset dateEnd, CancellationToken token);
|
|
|
|
|
|
|
|
|
|
/// <summary>
|
|
|
|
|
/// Получить диапазон дат, для которых есть данные в репозитории
|
|
|
|
|
/// </summary>
|
|
|
|
|
/// <param name="token"></param>
|
|
|
|
|
/// <returns></returns>
|
|
|
|
|
Task<DatesRangeDto> GetDatesRangeAsync(CancellationToken token);
|
2024-11-01 12:26:14 +05:00
|
|
|
|
/// <summary>
|
|
|
|
|
/// Добавление записей
|
|
|
|
|
/// </summary>
|
|
|
|
|
/// <param name="dtos"></param>
|
|
|
|
|
/// <param name="token"></param>
|
|
|
|
|
/// <returns></returns>
|
|
|
|
|
Task<int> InsertRange(IEnumerable<TDto> dtos, CancellationToken token);
|
2024-10-31 15:01:12 +05:00
|
|
|
|
}
|