2024-02-05 09:28:40 +05:00
|
|
|
|
using AsbCloudApp.Data.DetectedOperation;
|
|
|
|
|
using AsbCloudApp.Requests;
|
|
|
|
|
using System.Collections.Generic;
|
|
|
|
|
using System.Threading.Tasks;
|
|
|
|
|
using System.Threading;
|
|
|
|
|
|
|
|
|
|
namespace AsbCloudApp.Repositories;
|
|
|
|
|
|
|
|
|
|
/// <summary>
|
2024-02-08 11:38:25 +05:00
|
|
|
|
/// Таблица автоматически определенных операций
|
2024-02-05 09:28:40 +05:00
|
|
|
|
/// </summary>
|
|
|
|
|
public interface IDetectedOperationRepository
|
|
|
|
|
{
|
|
|
|
|
/// <summary>
|
|
|
|
|
/// Добавление записей
|
|
|
|
|
/// </summary>
|
|
|
|
|
/// <param name="idUser"></param>
|
|
|
|
|
/// <param name="dtos"></param>
|
|
|
|
|
/// <param name="token"></param>
|
|
|
|
|
/// <returns></returns>
|
2024-02-08 11:38:25 +05:00
|
|
|
|
Task<int> Insert(int? idUser, IEnumerable<DetectedOperationDto> dtos, CancellationToken token);
|
2024-02-05 09:28:40 +05:00
|
|
|
|
|
|
|
|
|
/// <summary>
|
2024-02-08 11:38:25 +05:00
|
|
|
|
/// Получить автоматически определенные операции по телеметрии
|
2024-02-05 09:28:40 +05:00
|
|
|
|
/// </summary>
|
|
|
|
|
/// <param name="request"></param>
|
|
|
|
|
/// <param name="token"></param>
|
|
|
|
|
/// <returns></returns>
|
2024-02-08 11:38:25 +05:00
|
|
|
|
Task<IEnumerable<DetectedOperationDto>> Get(DetectedOperationByTelemetryRequest request, CancellationToken token);
|
2024-02-05 09:28:40 +05:00
|
|
|
|
|
|
|
|
|
/// <summary>
|
|
|
|
|
/// Редактирование записей
|
|
|
|
|
/// </summary>
|
|
|
|
|
/// <param name="idUser"></param>
|
|
|
|
|
/// <param name="dtos"></param>
|
|
|
|
|
/// <param name="token"></param>
|
|
|
|
|
/// <returns></returns>
|
|
|
|
|
Task<int> Update(int idUser, IEnumerable<DetectedOperationDto> dtos, CancellationToken token);
|
|
|
|
|
|
|
|
|
|
/// <summary>
|
|
|
|
|
/// Добавляет Dto у которых id == 0, изменяет dto у которых id != 0
|
|
|
|
|
/// </summary>
|
|
|
|
|
/// <param name="idUser"></param>
|
|
|
|
|
/// <param name="dtos"></param>
|
|
|
|
|
/// <param name="token"></param>
|
|
|
|
|
/// <returns></returns>
|
|
|
|
|
Task<int> UpdateOrInsert(int idUser, IEnumerable<DetectedOperationDto> dtos, CancellationToken token);
|
|
|
|
|
|
|
|
|
|
/// <summary>
|
|
|
|
|
/// Удалить операции
|
|
|
|
|
/// </summary>
|
2024-02-08 11:38:25 +05:00
|
|
|
|
/// <param name="idUser"></param>
|
2024-02-05 09:28:40 +05:00
|
|
|
|
/// <param name="request"></param>
|
|
|
|
|
/// <param name="token"></param>
|
|
|
|
|
/// <returns></returns>
|
2024-02-08 11:38:25 +05:00
|
|
|
|
Task<int> Delete(int idUser, DetectedOperationByTelemetryRequest request, CancellationToken token);
|
2024-02-05 09:28:40 +05:00
|
|
|
|
|
|
|
|
|
/// <summary>
|
|
|
|
|
/// Удаление записей
|
|
|
|
|
/// </summary>
|
|
|
|
|
/// <param name="idUser"></param>
|
|
|
|
|
/// <param name="ids"></param>
|
|
|
|
|
/// <param name="token"></param>
|
|
|
|
|
/// <returns></returns>
|
|
|
|
|
Task<int> DeleteRange(int idUser, IEnumerable<int> ids, CancellationToken token);
|
|
|
|
|
}
|