2024-11-12 13:36:09 +05:00
|
|
|
|
using Microsoft.AspNetCore.Mvc;
|
|
|
|
|
using Persistence.Models;
|
2024-11-28 16:29:00 +05:00
|
|
|
|
using Persistence.Models.Requests;
|
2024-11-08 18:24:52 +05:00
|
|
|
|
|
|
|
|
|
namespace Persistence.API;
|
|
|
|
|
|
|
|
|
|
/// <summary>
|
2024-11-12 13:36:09 +05:00
|
|
|
|
/// Интерфейс для работы с API журнала изменений
|
2024-11-08 18:24:52 +05:00
|
|
|
|
/// </summary>
|
2024-11-26 11:47:42 +05:00
|
|
|
|
public interface IChangeLogApi
|
2024-11-08 18:24:52 +05:00
|
|
|
|
{
|
|
|
|
|
/// <summary>
|
2024-11-28 16:29:00 +05:00
|
|
|
|
/// Импорт с заменой: удаление старых строк и добавление новых
|
2024-11-08 18:24:52 +05:00
|
|
|
|
/// </summary>
|
2024-11-27 17:59:37 +05:00
|
|
|
|
/// <param name="idDiscriminator"></param>
|
2024-11-28 16:29:00 +05:00
|
|
|
|
/// <param name="dtos"></param>
|
|
|
|
|
/// <param name="token"></param>
|
|
|
|
|
/// <returns></returns>
|
|
|
|
|
Task<IActionResult> ClearAndInsertRange(Guid idDiscriminator, IEnumerable<DataWithWellDepthAndSectionDto> dtos, CancellationToken token);
|
|
|
|
|
|
|
|
|
|
/// <summary>
|
|
|
|
|
/// Получение данных на текущую дату (с пагинацией)
|
|
|
|
|
/// </summary>
|
|
|
|
|
/// <param name="idDiscriminator"></param>
|
|
|
|
|
/// <param name="request">параметры запроса</param>
|
2024-11-08 18:24:52 +05:00
|
|
|
|
/// <param name="token"></param>
|
|
|
|
|
/// <returns></returns>
|
2024-11-29 10:03:52 +05:00
|
|
|
|
Task<IActionResult> GetCurrent(Guid idDiscriminator, SectionPartRequest request, CancellationToken token);
|
2024-11-08 18:24:52 +05:00
|
|
|
|
|
|
|
|
|
/// <summary>
|
2024-11-28 16:29:00 +05:00
|
|
|
|
/// Получение данных на определенную дату (с пагинацией)
|
2024-11-08 18:24:52 +05:00
|
|
|
|
/// </summary>
|
2024-11-27 17:59:37 +05:00
|
|
|
|
/// <param name="idDiscriminator"></param>
|
|
|
|
|
/// <param name="moment"></param>
|
2024-11-28 16:29:00 +05:00
|
|
|
|
/// <param name="request">параметры запроса</param>
|
2024-11-08 18:24:52 +05:00
|
|
|
|
/// <param name="token"></param>
|
|
|
|
|
/// <returns></returns>
|
2024-11-29 10:03:52 +05:00
|
|
|
|
Task<IActionResult> GetByDate(Guid idDiscriminator, DateTimeOffset moment, SectionPartRequest request, CancellationToken token);
|
2024-11-27 17:59:37 +05:00
|
|
|
|
|
|
|
|
|
/// <summary>
|
|
|
|
|
/// Получение исторических данных за определенный период времени
|
|
|
|
|
/// </summary>
|
|
|
|
|
/// <param name="idDiscriminator"></param>
|
|
|
|
|
/// <param name="dateBegin"></param>
|
|
|
|
|
/// <param name="dateEnd"></param>
|
|
|
|
|
/// <param name="token"></param>
|
|
|
|
|
/// <returns></returns>
|
2024-11-29 10:03:52 +05:00
|
|
|
|
Task<IActionResult> GetChangeLogForDate(Guid idDiscriminator, DateTimeOffset dateBegin, DateTimeOffset dateEnd, CancellationToken token);
|
2024-11-12 13:36:09 +05:00
|
|
|
|
|
2024-11-08 18:24:52 +05:00
|
|
|
|
/// <summary>
|
|
|
|
|
/// Добавить одну запись
|
|
|
|
|
/// </summary>
|
2024-11-27 17:59:37 +05:00
|
|
|
|
/// <param name="idDiscriminator"></param>
|
2024-11-08 18:24:52 +05:00
|
|
|
|
/// <param name="dto"></param>
|
|
|
|
|
/// <param name="token"></param>
|
|
|
|
|
/// <returns></returns>
|
2024-11-29 10:03:52 +05:00
|
|
|
|
Task<IActionResult> Add(Guid idDiscriminator, DataWithWellDepthAndSectionDto dto, CancellationToken token);
|
2024-11-08 18:24:52 +05:00
|
|
|
|
|
|
|
|
|
/// <summary>
|
|
|
|
|
/// Добавить несколько записей
|
|
|
|
|
/// </summary>
|
2024-11-27 17:59:37 +05:00
|
|
|
|
/// <param name="idDiscriminator"></param>
|
2024-11-08 18:24:52 +05:00
|
|
|
|
/// <param name="dtos"></param>
|
|
|
|
|
/// <param name="token"></param>
|
|
|
|
|
/// <returns></returns>
|
2024-11-29 10:03:52 +05:00
|
|
|
|
Task<IActionResult> AddRange(Guid idDiscriminator, IEnumerable<DataWithWellDepthAndSectionDto> dtos, CancellationToken token);
|
2024-11-08 18:24:52 +05:00
|
|
|
|
|
|
|
|
|
/// <summary>
|
|
|
|
|
/// Обновить одну запись
|
|
|
|
|
/// </summary>
|
2024-11-27 17:59:37 +05:00
|
|
|
|
/// <param name="idDiscriminator"></param>
|
2024-11-08 18:24:52 +05:00
|
|
|
|
/// <param name="dto"></param>
|
|
|
|
|
/// <param name="token"></param>
|
|
|
|
|
/// <returns></returns>
|
2024-11-29 10:03:52 +05:00
|
|
|
|
Task<IActionResult> Update(Guid idDiscriminator, DataWithWellDepthAndSectionDto dto, CancellationToken token);
|
2024-11-08 18:24:52 +05:00
|
|
|
|
|
|
|
|
|
/// <summary>
|
|
|
|
|
/// Обновить несколько записей
|
|
|
|
|
/// </summary>
|
2024-11-27 17:59:37 +05:00
|
|
|
|
/// <param name="idDiscriminator"></param>
|
2024-11-08 18:24:52 +05:00
|
|
|
|
/// <param name="dtos"></param>
|
|
|
|
|
/// <param name="token"></param>
|
|
|
|
|
/// <returns></returns>
|
2024-11-29 10:03:52 +05:00
|
|
|
|
Task<IActionResult> UpdateRange(Guid idDiscriminator, IEnumerable<DataWithWellDepthAndSectionDto> dtos, CancellationToken token);
|
2024-11-08 18:24:52 +05:00
|
|
|
|
|
|
|
|
|
/// <summary>
|
|
|
|
|
/// Удалить одну запись
|
|
|
|
|
/// </summary>
|
|
|
|
|
/// <param name="id"></param>
|
|
|
|
|
/// <param name="token"></param>
|
|
|
|
|
/// <returns></returns>
|
2024-11-29 10:03:52 +05:00
|
|
|
|
Task<IActionResult> Delete(Guid id, CancellationToken token);
|
2024-11-08 18:24:52 +05:00
|
|
|
|
|
|
|
|
|
/// <summary>
|
|
|
|
|
/// Удалить несколько записей
|
|
|
|
|
/// </summary>
|
|
|
|
|
/// <param name="ids"></param>
|
|
|
|
|
/// <param name="token"></param>
|
|
|
|
|
/// <returns></returns>
|
2024-11-29 10:03:52 +05:00
|
|
|
|
Task<IActionResult> DeleteRange(IEnumerable<Guid> ids, CancellationToken token);
|
2024-11-28 16:29:00 +05:00
|
|
|
|
|
|
|
|
|
/// <summary>
|
|
|
|
|
/// Получение списка дат, в которые происходили изменения (день, месяц, год, без времени)
|
|
|
|
|
/// </summary>
|
|
|
|
|
/// <param name="idDiscriminator"></param>
|
|
|
|
|
/// <param name="token"></param>
|
|
|
|
|
/// <returns></returns>
|
2024-11-29 10:03:52 +05:00
|
|
|
|
Task<IActionResult> GetDatesChange(Guid idDiscriminator, CancellationToken token);
|
2024-11-08 18:24:52 +05:00
|
|
|
|
}
|