persistence/Persistence/Repositories/ISetpointRepository.cs

40 lines
1.6 KiB
C#
Raw 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;
/// <summary>
/// Интерфейс по работе с уставками
/// </summary>
public interface ISetpointRepository
{
/// <summary>
/// Получить значения уставок за определенный момент времени
/// </summary>
/// <param name="setpoitKeys"></param>
/// <param name="historyMoment">дата, на которую получаем данные</param>
/// <param name="token"></param>
/// <returns></returns>
Task<IEnumerable<SetpointValueDto>> GetHistoryAsync(IEnumerable<Guid> setpoitKeys, DateTimeOffset historyMoment, CancellationToken token);
/// <summary>
/// Получить историю изменений значений уставок
/// </summary>
/// <param name="setpoitKeys"></param>
/// <param name="token"></param>
/// <returns></returns>
Task<Dictionary<Guid, IEnumerable<SetpointLogDto>>> GetLogAsync(IEnumerable<Guid> setpoitKeys, CancellationToken token);
/// <summary>
/// Метод сохранения уставки
/// </summary>
/// <param name="setpointKey">ключ операции</param>
/// <param name="idUser">ключ пользователя</param>
/// <param name="newValue">значение</param>
/// <param name="token"></param>
/// <returns></returns>
/// to do
/// id User учесть в соответствующем методе репозитория
Task<int> SaveAsync(Guid setpointKey, int idUser, object newValue, CancellationToken token);
}