2024-11-08 18:24:52 +05:00
|
|
|
|
using Microsoft.AspNetCore.Mvc;
|
|
|
|
|
using Persistence.Models;
|
|
|
|
|
|
|
|
|
|
namespace Persistence.API;
|
|
|
|
|
|
|
|
|
|
/// <summary>
|
2024-11-12 13:36:09 +05:00
|
|
|
|
/// Интерфейс для API, предназначенного для работы с уставками
|
2024-11-08 18:24:52 +05:00
|
|
|
|
/// </summary>
|
2024-11-14 15:17:43 +05:00
|
|
|
|
public interface ISetpointApi
|
2024-11-08 18:24:52 +05:00
|
|
|
|
{
|
|
|
|
|
/// <summary>
|
|
|
|
|
/// Получить актуальные значения уставок
|
|
|
|
|
/// </summary>
|
2024-11-12 13:36:09 +05:00
|
|
|
|
/// <param name="setpoitKeys">ключи уставок</param>
|
2024-11-08 18:24:52 +05:00
|
|
|
|
/// <param name="token"></param>
|
|
|
|
|
/// <returns></returns>
|
|
|
|
|
Task<ActionResult<IEnumerable<SetpointValueDto>>> GetCurrentAsync(IEnumerable<Guid> setpoitKeys, CancellationToken token);
|
|
|
|
|
|
|
|
|
|
/// <summary>
|
|
|
|
|
/// Получить значения уставок за определенный момент времени
|
|
|
|
|
/// </summary>
|
2024-11-12 13:36:09 +05:00
|
|
|
|
/// <param name="setpoitKeys">ключи уставок</param>
|
2024-11-08 18:24:52 +05:00
|
|
|
|
/// <param name="historyMoment">дата, на которую получаем данные</param>
|
|
|
|
|
/// <param name="token"></param>
|
|
|
|
|
/// <returns></returns>
|
2024-11-12 13:36:09 +05:00
|
|
|
|
Task<ActionResult<IEnumerable<SetpointValueDto>>> GetHistoryAsync(IEnumerable<Guid> setpoitKeys, DateTimeOffset historyMoment, CancellationToken token);
|
2024-11-08 18:24:52 +05:00
|
|
|
|
|
|
|
|
|
/// <summary>
|
|
|
|
|
/// Получить историю изменений значений уставок
|
|
|
|
|
/// </summary>
|
2024-11-12 13:36:09 +05:00
|
|
|
|
/// <param name="setpoitKeys">ключи уставок</param>
|
2024-11-08 18:24:52 +05:00
|
|
|
|
/// <param name="token"></param>
|
|
|
|
|
/// <returns></returns>
|
2024-11-12 13:36:09 +05:00
|
|
|
|
Task<ActionResult<Dictionary<Guid, IEnumerable<SetpointLogDto>>>> GetLogAsync(IEnumerable<Guid> setpoitKeys, CancellationToken token);
|
2024-11-08 18:24:52 +05:00
|
|
|
|
|
|
|
|
|
/// <summary>
|
|
|
|
|
/// Метод сохранения уставки
|
|
|
|
|
/// </summary>
|
2024-11-12 13:36:09 +05:00
|
|
|
|
/// <param name="setpointKey">ключ уставки</param>
|
2024-11-08 18:24:52 +05:00
|
|
|
|
/// <param name="newValue">значение</param>
|
|
|
|
|
/// <param name="token"></param>
|
|
|
|
|
/// <returns></returns>
|
2024-11-12 13:36:09 +05:00
|
|
|
|
Task<ActionResult<int>> SaveAsync(Guid setpointKey, object newValue, CancellationToken token);
|
2024-11-08 18:24:52 +05:00
|
|
|
|
}
|