74 lines
2.6 KiB
C#
74 lines
2.6 KiB
C#
using Microsoft.AspNetCore.Mvc;
|
||
using Persistence.Models;
|
||
|
||
namespace Persistence.API;
|
||
|
||
/// <summary>
|
||
/// Интерфейс для работы с API журнала изменений
|
||
/// </summary>
|
||
public interface IChangeLogApi
|
||
{
|
||
/// <summary>
|
||
/// Получение исторических данных на текущую дату
|
||
/// </summary>
|
||
/// <param name="token"></param>
|
||
/// <returns></returns>
|
||
Task<ActionResult<IEnumerable<IDictionary<string, object>>>> GetChangeLogCurrent(CancellationToken token);
|
||
|
||
/// <summary>
|
||
/// Получение исторических данных на определенную дату
|
||
/// </summary>
|
||
/// <param name="historyMoment"></param>
|
||
/// <param name="token"></param>
|
||
/// <returns></returns>
|
||
Task<ActionResult<IEnumerable<ChangeLogDto<IDictionary<string, object>>>>> GetChangeLogForDate(DateTimeOffset historyMoment, CancellationToken token);
|
||
|
||
/// <summary>
|
||
/// Добавить одну запись
|
||
/// </summary>
|
||
/// <param name="dto"></param>
|
||
/// <param name="token"></param>
|
||
/// <returns></returns>
|
||
Task<ActionResult<int>> Add(Guid idDiscriminator, IDictionary<string, object> dto, CancellationToken token);
|
||
|
||
/// <summary>
|
||
/// Добавить несколько записей
|
||
/// </summary>
|
||
/// <param name="dtos"></param>
|
||
/// <param name="token"></param>
|
||
/// <returns></returns>
|
||
Task<ActionResult<int>> AddRange(IEnumerable<IDictionary<string, object>> dtos, CancellationToken token);
|
||
|
||
/// <summary>
|
||
/// Обновить одну запись
|
||
/// </summary>
|
||
/// <param name="dto"></param>
|
||
/// <param name="token"></param>
|
||
/// <returns></returns>
|
||
Task<ActionResult<int>> Update(IDictionary<string, object> dto, CancellationToken token);
|
||
|
||
/// <summary>
|
||
/// Обновить несколько записей
|
||
/// </summary>
|
||
/// <param name="dtos"></param>
|
||
/// <param name="token"></param>
|
||
/// <returns></returns>
|
||
Task<ActionResult<int>> UpdateRange(IEnumerable<IDictionary<string, object>> dtos, CancellationToken token);
|
||
|
||
/// <summary>
|
||
/// Удалить одну запись
|
||
/// </summary>
|
||
/// <param name="id"></param>
|
||
/// <param name="token"></param>
|
||
/// <returns></returns>
|
||
Task<ActionResult<int>> Delete(int id, CancellationToken token);
|
||
|
||
/// <summary>
|
||
/// Удалить несколько записей
|
||
/// </summary>
|
||
/// <param name="ids"></param>
|
||
/// <param name="token"></param>
|
||
/// <returns></returns>
|
||
Task<ActionResult<int>> DeleteRange(IEnumerable<int> ids, CancellationToken token);
|
||
}
|