2024-07-23 17:26:23 +05:00
|
|
|
using AsbCloudApp.Data;
|
2024-02-20 13:22:58 +05:00
|
|
|
using AsbCloudApp.Data.DetectedOperation;
|
2024-02-05 09:28:40 +05:00
|
|
|
using AsbCloudApp.Requests;
|
|
|
|
using System.Collections.Generic;
|
|
|
|
using System.Threading;
|
2024-07-23 17:26:23 +05:00
|
|
|
using System.Threading.Tasks;
|
2024-07-25 18:58:26 +05:00
|
|
|
using AsbCloudApp.Services;
|
2024-02-05 09:28:40 +05:00
|
|
|
|
|
|
|
namespace AsbCloudApp.Repositories;
|
|
|
|
|
|
|
|
/// <summary>
|
2024-02-08 11:38:25 +05:00
|
|
|
/// Таблица автоматически определенных операций
|
2024-02-05 09:28:40 +05:00
|
|
|
/// </summary>
|
2024-07-23 17:26:23 +05:00
|
|
|
public interface IDetectedOperationRepository : ITelemetryDataEditorService
|
2024-02-05 09:28:40 +05:00
|
|
|
{
|
|
|
|
/// <summary>
|
2024-04-08 09:26:24 +05:00
|
|
|
/// Добавление нескольких записей
|
2024-02-05 09:28:40 +05:00
|
|
|
/// </summary>
|
|
|
|
/// <param name="dtos"></param>
|
|
|
|
/// <param name="token"></param>
|
2024-04-08 09:26:24 +05:00
|
|
|
/// <returns>количество добавленных</returns>
|
|
|
|
Task<int> InsertRangeAsync(IEnumerable<DetectedOperationDto> dtos, CancellationToken token);
|
|
|
|
|
2024-02-05 09:28:40 +05:00
|
|
|
/// <summary>
|
2024-04-08 09:26:24 +05:00
|
|
|
/// Обновить несколько записей
|
2024-02-05 09:28:40 +05:00
|
|
|
/// </summary>
|
2024-04-08 09:26:24 +05:00
|
|
|
/// <param name="dtos"></param>
|
2024-02-05 09:28:40 +05:00
|
|
|
/// <param name="token"></param>
|
|
|
|
/// <returns></returns>
|
2024-04-08 09:26:24 +05:00
|
|
|
Task<int> UpdateRangeAsync(IEnumerable<DetectedOperationDto> dtos, CancellationToken token);
|
2024-02-05 09:28:40 +05:00
|
|
|
|
|
|
|
/// <summary>
|
2024-04-08 09:26:24 +05:00
|
|
|
/// Удаление нескольких записей
|
2024-02-05 09:28:40 +05:00
|
|
|
/// </summary>
|
2024-04-08 09:26:24 +05:00
|
|
|
/// <param name="ids"></param>
|
2024-02-05 09:28:40 +05:00
|
|
|
/// <param name="token"></param>
|
|
|
|
/// <returns></returns>
|
2024-04-08 09:26:24 +05:00
|
|
|
Task<int> DeleteRangeAsync(IEnumerable<int> ids, CancellationToken token);
|
|
|
|
|
2024-02-05 09:28:40 +05:00
|
|
|
/// <summary>
|
2024-04-08 09:26:24 +05:00
|
|
|
/// Получить автоматически определенные операции по телеметрии
|
2024-02-05 09:28:40 +05:00
|
|
|
/// </summary>
|
|
|
|
/// <param name="request"></param>
|
|
|
|
/// <param name="token"></param>
|
|
|
|
/// <returns></returns>
|
2024-04-08 09:26:24 +05:00
|
|
|
Task<IEnumerable<DetectedOperationDto>> Get(DetectedOperationByTelemetryRequest request, CancellationToken token);
|
2024-02-05 09:28:40 +05:00
|
|
|
|
|
|
|
/// <summary>
|
2024-04-08 09:26:24 +05:00
|
|
|
/// Получить страницу списка операций
|
2024-02-05 09:28:40 +05:00
|
|
|
/// </summary>
|
2024-04-08 09:26:24 +05:00
|
|
|
/// <param name="request"></param>
|
2024-02-05 09:28:40 +05:00
|
|
|
/// <param name="token"></param>
|
|
|
|
/// <returns></returns>
|
2024-04-08 09:26:24 +05:00
|
|
|
Task<PaginationContainer<DetectedOperationDto>> GetPageAsync(DetectedOperationByTelemetryRequest request, CancellationToken token);
|
2024-07-24 15:19:13 +05:00
|
|
|
|
2024-02-20 13:22:58 +05:00
|
|
|
/// <summary>
|
2024-07-26 16:56:36 +05:00
|
|
|
/// Получение последних авто определённых операций
|
2024-02-20 13:22:58 +05:00
|
|
|
/// </summary>
|
|
|
|
/// <param name="token"></param>
|
|
|
|
/// <returns></returns>
|
2024-07-24 15:19:13 +05:00
|
|
|
Task<IDictionary<int, DetectedOperationDto>> GetLastDetectedOperationsAsync(CancellationToken token);
|
|
|
|
|
2024-04-08 09:26:24 +05:00
|
|
|
/// <summary>
|
|
|
|
/// Удалить операции
|
|
|
|
/// </summary>
|
|
|
|
/// <param name="request"></param>
|
|
|
|
/// <param name="token"></param>
|
|
|
|
/// <returns></returns>
|
|
|
|
Task<int> DeleteAsync(DetectedOperationByTelemetryRequest request, CancellationToken token);
|
2024-02-05 09:28:40 +05:00
|
|
|
}
|