2024-11-18 09:39:24 +05:00
|
|
|
|
using Persistence.Models;
|
2024-11-12 13:36:09 +05:00
|
|
|
|
|
|
|
|
|
namespace Persistence.Repositories;
|
|
|
|
|
|
|
|
|
|
/// <summary>
|
|
|
|
|
/// Интерфейс по работе с уставками
|
|
|
|
|
/// </summary>
|
|
|
|
|
public interface ISetpointRepository
|
|
|
|
|
{
|
|
|
|
|
|
|
|
|
|
/// <summary>
|
|
|
|
|
/// Получить значения уставок за определенный момент времени
|
|
|
|
|
/// </summary>
|
2024-11-18 09:39:24 +05:00
|
|
|
|
/// <param name="setpointKeys"></param>
|
2024-11-12 13:36:09 +05:00
|
|
|
|
/// <param name="historyMoment">дата, на которую получаем данные</param>
|
|
|
|
|
/// <param name="token"></param>
|
|
|
|
|
/// <returns></returns>
|
2024-11-18 09:39:24 +05:00
|
|
|
|
Task<IEnumerable<SetpointValueDto>> GetHistoryAsync(IEnumerable<Guid> setpointKeys, DateTimeOffset historyMoment, CancellationToken token);
|
2024-11-12 13:36:09 +05:00
|
|
|
|
|
|
|
|
|
/// <summary>
|
|
|
|
|
/// Получить историю изменений значений уставок
|
|
|
|
|
/// </summary>
|
2024-11-18 09:39:24 +05:00
|
|
|
|
/// <param name="setpointKeys"></param>
|
2024-11-12 13:36:09 +05:00
|
|
|
|
/// <param name="token"></param>
|
|
|
|
|
/// <returns></returns>
|
2024-11-18 09:39:24 +05:00
|
|
|
|
Task<Dictionary<Guid, IEnumerable<SetpointLogDto>>> GetLogAsync(IEnumerable<Guid> setpointKeys, CancellationToken token);
|
2024-11-12 13:36:09 +05:00
|
|
|
|
|
|
|
|
|
/// <summary>
|
|
|
|
|
/// Метод сохранения уставки
|
|
|
|
|
/// </summary>
|
|
|
|
|
/// <param name="setpointKey">ключ операции</param>
|
|
|
|
|
/// <param name="idUser">ключ пользователя</param>
|
|
|
|
|
/// <param name="newValue">значение</param>
|
|
|
|
|
/// <param name="token"></param>
|
|
|
|
|
/// <returns></returns>
|
|
|
|
|
/// to do
|
|
|
|
|
/// id User учесть в соответствующем методе репозитория
|
2024-11-18 09:39:24 +05:00
|
|
|
|
Task<int> SaveAsync(Guid setpointKey, object newValue, CancellationToken token);
|
2024-11-12 13:36:09 +05:00
|
|
|
|
}
|