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
|
|
|
|
|
{
|
2024-11-18 15:05:12 +05:00
|
|
|
|
/// <summary>
|
|
|
|
|
/// Получить значения уставок по набору ключей
|
|
|
|
|
/// </summary>
|
|
|
|
|
/// <param name="setpointKeys"></param>
|
|
|
|
|
/// <param name="token"></param>
|
|
|
|
|
/// <returns></returns>
|
|
|
|
|
Task<IEnumerable<SetpointValueDto>> GetCurrent(IEnumerable<Guid> setpointKeys, CancellationToken token);
|
|
|
|
|
|
|
|
|
|
/// <summary>
|
|
|
|
|
/// Получить значения уставок за определенный момент времени
|
|
|
|
|
/// </summary>
|
|
|
|
|
/// <param name="setpointKeys"></param>
|
|
|
|
|
/// <param name="historyMoment">дата, на которую получаем данные</param>
|
|
|
|
|
/// <param name="token"></param>
|
|
|
|
|
/// <returns></returns>
|
|
|
|
|
Task<IEnumerable<SetpointValueDto>> GetHistory(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 15:05:12 +05:00
|
|
|
|
Task<Dictionary<Guid, IEnumerable<SetpointLogDto>>> GetLog(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 15:05:12 +05:00
|
|
|
|
Task<int> Save(Guid setpointKey, object newValue, int idUser, CancellationToken token);
|
2024-11-12 13:36:09 +05:00
|
|
|
|
}
|