forked from ddrilling/AsbCloudServer
52 lines
1.8 KiB
C#
52 lines
1.8 KiB
C#
using System;
|
||
using System.Collections.Generic;
|
||
using System.Threading;
|
||
using System.Threading.Tasks;
|
||
using AsbCloudApp.Data.ProcessMapPlan;
|
||
using AsbCloudApp.Requests;
|
||
|
||
namespace AsbCloudApp.Repositories;
|
||
|
||
/// <summary>
|
||
/// Общий интерфейс для РТК план с учетом истории изменений
|
||
/// </summary>
|
||
/// <typeparam name="T"></typeparam>
|
||
public interface IProcessMapPlanBaseRepository<T>: IChangeLogRepository<T>
|
||
where T: ProcessMapPlanBaseDto
|
||
{
|
||
/// <summary>
|
||
/// Добавление записей с удалением старых (для импорта)
|
||
/// </summary>
|
||
/// <param name="idUser"></param>
|
||
/// <param name="idWell"></param>
|
||
/// <param name="dtos"></param>
|
||
/// <param name="token"></param>
|
||
/// <returns></returns>
|
||
Task<int> ClearAndInsertRange(int idUser, int idWell, IEnumerable<T> dtos, CancellationToken token);
|
||
|
||
/// <summary>
|
||
/// Получение дат изменений записей
|
||
/// </summary>
|
||
/// <param name="idWell"></param>
|
||
/// <param name="token"></param>
|
||
/// <returns></returns>
|
||
Task<IEnumerable<DateOnly>> GetDatesChange(int idWell, CancellationToken token);
|
||
|
||
/// <summary>
|
||
/// Получение журнала изменений
|
||
/// </summary>
|
||
/// <param name="idWell"></param>
|
||
/// <param name="date"></param>
|
||
/// <param name="token"></param>
|
||
/// <returns></returns>
|
||
Task<IEnumerable<T>> GetChangeLog(int idWell, DateOnly? date, CancellationToken token);
|
||
|
||
/// <summary>
|
||
/// Получение записей по параметрам
|
||
/// </summary>
|
||
/// <param name="idWell"></param>
|
||
/// <param name="request"></param>
|
||
/// <param name="token"></param>
|
||
/// <returns></returns>
|
||
Task<IEnumerable<T>> Get(int idWell, ProcessMapPlanBaseRequest request, CancellationToken token);
|
||
} |