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

75 lines
2.6 KiB
C#
Raw Normal View History

2021-08-27 17:55:22 +05:00
using AsbCloudApp.Data;
using System.Collections.Generic;
using System.Threading;
using System.Threading.Tasks;
namespace AsbCloudApp.Services
{
2022-08-05 17:52:42 +05:00
/// <summary>
/// Сервис хранения результатов лабораторных анализов и измерений
/// </summary>
public interface IMeasureService
{
2022-08-05 17:52:42 +05:00
/// <summary>
/// Категории измерений
/// </summary>
/// <param name="token"></param>
/// <returns></returns>
2021-08-27 17:55:22 +05:00
Task<Dictionary<int, string>> GetCategoriesAsync(CancellationToken token);
2022-08-05 17:52:42 +05:00
/// <summary>
/// Последние измерения по категории
/// </summary>
/// <param name="idWell"></param>
/// <param name="idCategory"></param>
/// <param name="token"></param>
/// <returns></returns>
2023-04-13 15:34:16 +05:00
Task<MeasureDto?> GetLastOrDefaultAsync(int idWell, int idCategory, CancellationToken token);
2022-08-05 17:52:42 +05:00
/// <summary>
/// История измерений по категории
/// </summary>
/// <param name="idWell"></param>
/// <param name="idCategory"></param>
/// <param name="token"></param>
/// <returns></returns>
2021-12-22 12:31:37 +05:00
Task<IEnumerable<MeasureDto>> GetHisoryAsync(int idWell, int? idCategory, CancellationToken token);
2022-08-05 17:52:42 +05:00
/// <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);
2022-08-05 17:52:42 +05:00
/// <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);
2022-08-05 17:52:42 +05:00
/// <summary>
/// Пометить удаленным
/// </summary>
/// <param name="idWell"></param>
/// <param name="idData"></param>
/// <param name="token"></param>
/// <returns></returns>
2021-08-27 17:55:22 +05:00
Task<int> MarkAsDeleteAsync(int idWell, int idData, CancellationToken token);
2022-08-05 17:52:42 +05:00
/// <summary>
/// Удалить
/// </summary>
/// <param name="idWell"></param>
/// <param name="idData"></param>
/// <param name="token"></param>
/// <returns></returns>
2021-08-27 17:55:22 +05:00
Task<int> DeleteAsync(int idWell, int idData, CancellationToken token);
}
}