forked from ddrilling/AsbCloudServer
72 lines
2.6 KiB
C#
72 lines
2.6 KiB
C#
using System;
|
|
using AsbCloudApp.Data.DetectedOperation;
|
|
using AsbCloudApp.Requests;
|
|
using System.Collections.Generic;
|
|
using System.Threading.Tasks;
|
|
using System.Threading;
|
|
using AsbCloudApp.Data;
|
|
using AsbCloudApp.Data.WellOperation;
|
|
|
|
namespace AsbCloudApp.Repositories;
|
|
|
|
/// <summary>
|
|
/// Таблица автоматически определенных операций
|
|
/// </summary>
|
|
public interface IDetectedOperationRepository
|
|
{
|
|
/// <summary>
|
|
/// Добавление нескольких записей
|
|
/// </summary>
|
|
/// <param name="dtos"></param>
|
|
/// <param name="token"></param>
|
|
/// <returns>количество добавленных</returns>
|
|
Task<int> InsertRangeAsync(IEnumerable<DetectedOperationDto> dtos, CancellationToken token);
|
|
|
|
/// <summary>
|
|
/// Обновить несколько записей
|
|
/// </summary>
|
|
/// <param name="dtos"></param>
|
|
/// <param name="token"></param>
|
|
/// <returns></returns>
|
|
Task<int> UpdateRangeAsync(IEnumerable<DetectedOperationDto> dtos, CancellationToken token);
|
|
|
|
/// <summary>
|
|
/// Удаление нескольких записей
|
|
/// </summary>
|
|
/// <param name="ids"></param>
|
|
/// <param name="token"></param>
|
|
/// <returns></returns>
|
|
Task<int> DeleteRangeAsync(IEnumerable<int> ids, CancellationToken token);
|
|
|
|
/// <summary>
|
|
/// Получить автоматически определенные операции по телеметрии
|
|
/// </summary>
|
|
/// <param name="request"></param>
|
|
/// <param name="token"></param>
|
|
/// <returns></returns>
|
|
Task<IEnumerable<DetectedOperationDto>> Get(DetectedOperationByTelemetryRequest request, CancellationToken token);
|
|
|
|
/// <summary>
|
|
/// Получить страницу списка операций
|
|
/// </summary>
|
|
/// <param name="request"></param>
|
|
/// <param name="token"></param>
|
|
/// <returns></returns>
|
|
Task<PaginationContainer<DetectedOperationDto>> GetPageAsync(DetectedOperationByTelemetryRequest request, CancellationToken token);
|
|
|
|
/// <summary>
|
|
/// Получение дат последних определённых операций
|
|
/// </summary>
|
|
/// <param name="token"></param>
|
|
/// <returns></returns>
|
|
Task<IDictionary<int, DateTimeOffset>> GetLastDetectedDatesAsync(CancellationToken token);
|
|
|
|
/// <summary>
|
|
/// Удалить операции
|
|
/// </summary>
|
|
/// <param name="request"></param>
|
|
/// <param name="token"></param>
|
|
/// <returns></returns>
|
|
Task<int> DeleteAsync(DetectedOperationByTelemetryRequest request, CancellationToken token);
|
|
}
|