DD.WellWorkover.Cloud/AsbCloudApp/Services/IMeasureService.cs

75 lines
2.6 KiB
C#

using AsbCloudApp.Data;
using System.Collections.Generic;
using System.Threading;
using System.Threading.Tasks;
namespace AsbCloudApp.Services
{
/// <summary>
/// Сервис хранения результатов лабораторных анализов и измерений
/// </summary>
public interface IMeasureService
{
/// <summary>
/// Категории измерений
/// </summary>
/// <param name="token"></param>
/// <returns></returns>
Task<Dictionary<int, string>> GetCategoriesAsync(CancellationToken token);
/// <summary>
/// Последние измерения по категории
/// </summary>
/// <param name="idWell"></param>
/// <param name="idCategory"></param>
/// <param name="token"></param>
/// <returns></returns>
Task<MeasureDto?> GetLastOrDefaultAsync(int idWell, int idCategory, CancellationToken token);
/// <summary>
/// История измерений по категории
/// </summary>
/// <param name="idWell"></param>
/// <param name="idCategory"></param>
/// <param name="token"></param>
/// <returns></returns>
Task<IEnumerable<MeasureDto>> GetHisoryAsync(int idWell, int? idCategory, CancellationToken token);
/// <summary>
/// Добавить измерение
/// </summary>
/// <param name="idWell"></param>
/// <param name="data"></param>
/// <param name="token"></param>
/// <returns></returns>
Task<int> InsertAsync(int idWell, MeasureDto data, CancellationToken token);
/// <summary>
/// Редактировать
/// </summary>
/// <param name="idWell"></param>
/// <param name="data"></param>
/// <param name="token"></param>
/// <returns></returns>
Task<int> UpdateAsync(int idWell, MeasureDto data, CancellationToken token);
/// <summary>
/// Пометить удаленным
/// </summary>
/// <param name="idWell"></param>
/// <param name="idData"></param>
/// <param name="token"></param>
/// <returns></returns>
Task<int> MarkAsDeleteAsync(int idWell, int idData, CancellationToken token);
/// <summary>
/// Удалить
/// </summary>
/// <param name="idWell"></param>
/// <param name="idData"></param>
/// <param name="token"></param>
/// <returns></returns>
Task<int> DeleteAsync(int idWell, int idData, CancellationToken token);
}
}