2024-07-04 11:02:45 +05:00
|
|
|
|
using AsbCloudApp.Data.Trajectory;
|
2022-12-22 18:08:58 +05:00
|
|
|
|
using System.Collections.Generic;
|
|
|
|
|
using System.Threading;
|
|
|
|
|
using System.Threading.Tasks;
|
|
|
|
|
|
2024-08-19 10:01:07 +05:00
|
|
|
|
namespace AsbCloudApp.Repositories;
|
|
|
|
|
|
|
|
|
|
/// <summary>
|
|
|
|
|
/// CRUD-репозиторий для работы с траекторией из клиента (плановой и фактической)
|
|
|
|
|
/// </summary>
|
|
|
|
|
/// <returns></returns>
|
|
|
|
|
//TrajectoryGeoPlanDto
|
|
|
|
|
public interface ITrajectoryEditableRepository<T> : ITrajectoryRepository<T> where T : TrajectoryGeoDto
|
2022-12-22 18:08:58 +05:00
|
|
|
|
{
|
|
|
|
|
/// <summary>
|
2024-08-19 10:01:07 +05:00
|
|
|
|
/// Добавить строки с координатами по одной скважине. Если в коллекции координаты для разных скважин получаем exception.
|
|
|
|
|
/// </summary>
|
|
|
|
|
/// <param name="trajectoryRows"></param>
|
|
|
|
|
/// <param name="token"></param>
|
|
|
|
|
/// <returns>количество записанных строк или exception с описанием</returns>
|
|
|
|
|
Task<int> AddRangeAsync(IEnumerable<T> trajectoryRows, CancellationToken token);
|
2022-12-22 18:08:58 +05:00
|
|
|
|
|
2024-08-19 10:01:07 +05:00
|
|
|
|
/// <summary>
|
|
|
|
|
/// Добавить одну строку с координатами
|
|
|
|
|
/// </summary>
|
|
|
|
|
/// <param name="trajectoryRow"></param>
|
|
|
|
|
/// <param name="token"></param>
|
|
|
|
|
/// <returns></returns>
|
|
|
|
|
Task<int> AddAsync(T trajectoryRow, CancellationToken token);
|
2022-12-27 21:45:03 +05:00
|
|
|
|
|
2024-08-19 10:01:07 +05:00
|
|
|
|
/// <summary>
|
|
|
|
|
/// Обновить строку с координатами
|
|
|
|
|
/// </summary>
|
|
|
|
|
/// <param name="row"></param>
|
|
|
|
|
/// <param name="token"></param>
|
|
|
|
|
/// <returns></returns>
|
|
|
|
|
Task<int> UpdateAsync(T row,
|
|
|
|
|
CancellationToken token);
|
2022-12-22 18:08:58 +05:00
|
|
|
|
|
2024-08-19 10:01:07 +05:00
|
|
|
|
/// <summary>
|
|
|
|
|
/// Удалить строки с координатами
|
|
|
|
|
/// </summary>
|
|
|
|
|
/// <param name="ids"></param>
|
|
|
|
|
/// <param name="token"></param>
|
|
|
|
|
/// <returns></returns>
|
|
|
|
|
Task<int> DeleteRangeAsync(IEnumerable<int> ids, CancellationToken token);
|
2022-12-27 00:02:49 +05:00
|
|
|
|
|
2024-08-19 10:01:07 +05:00
|
|
|
|
/// <summary>
|
|
|
|
|
/// Удалить всю траекторию по ИД скважины
|
|
|
|
|
/// </summary>
|
|
|
|
|
/// <param name="idWell"></param>
|
|
|
|
|
/// <param name="token"></param>
|
|
|
|
|
/// <returns></returns>
|
|
|
|
|
Task<int> DeleteByIdWellAsync(int idWell, CancellationToken token);
|
2022-12-22 18:08:58 +05:00
|
|
|
|
}
|