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

65 lines
2.4 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 AsbCloudApp.Data;
using AsbCloudApp.Data.User;
using System.Collections.Generic;
using System.Threading;
using System.Threading.Tasks;
namespace AsbCloudApp.Services
{
/// <summary>
/// Сервис по работе с контактной информацией по скважине
/// </summary>
public interface IWellContactService
{
/// <summary>
/// Получение контактов по ключу скважины и типу контакта
/// </summary>
/// <param name="idWell">ключ скважины</param>
/// <param name="contactTypeId">тип контакта</param>
/// <param name="token"></param>
/// <returns></returns>
Task<IEnumerable<ContactDto>> GetAllAsync(int idWell, int contactTypeId, CancellationToken token);
/// <summary>
/// Получение контакта по ключу
/// </summary>
/// <param name="idWell">ключ скважины</param>
/// <param name="id">ключ пользователя</param>
/// <param name="token"></param>
/// <returns></returns>
Task<ContactDto?> GetAsync(int idWell, int id, CancellationToken token);
/// <summary>
/// Получение типов контактов
/// </summary>
/// <param name="token"></param>
/// <returns></returns>
Task<IEnumerable<CompanyTypeDto>> GetTypesAsync(CancellationToken token);
/// <summary>
/// Добавление контакта
/// </summary>
/// <param name="contactDto"></param>
/// <param name="token"></param>
/// <returns></returns>
Task<int> InsertAsync(ContactDto contactDto, CancellationToken token);
/// <summary>
/// Изменение контакта
/// </summary>
/// <param name="contactDto"></param>
/// <param name="token"></param>
/// <returns></returns>
Task<int> UpdateAsync(ContactDto contactDto, CancellationToken token);
/// <summary>
/// Удаление контакта
/// </summary>
/// <param name="idWell">ключ скважины</param>
/// <param name="id">ключ скважины</param>
/// <param name="token"></param>
/// <returns></returns>
Task<int> DeleteAsync(int idWell, int id, CancellationToken token);
}
}