DD.WellWorkover.Cloud/AsbCloudApp/Repositories/IProcessMapPlanBaseRepository.cs
2024-01-22 13:16:39 +05:00

52 lines
1.8 KiB
C#
Raw Blame History

This file contains ambiguous Unicode characters

This file contains Unicode characters that might be confused with other characters. If you think that this is intentional, you can safely ignore this warning. Use the Escape button to reveal them.

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);
}