DD.WellWorkover.Cloud/AsbCloudApp/Services/IWellContactService.cs
2024-08-19 10:01:07 +05:00

74 lines
2.7 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 AsbCloudApp.Requests;
using System.Collections.Generic;
using System.Threading;
using System.Threading.Tasks;
namespace AsbCloudApp.Services;
/// <summary>
/// Сервис по работе с контактной информацией по скважине
/// </summary>
public interface IWellContactService
{
/// <summary>
/// Получение контактов по параметрам запроса
/// </summary>
/// <param name="request">ключ скважины</param>
/// <param name="token"></param>
/// <returns></returns>
Task<IEnumerable<ContactDto>> GetAllAsync(WellContactRequest request, 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);
/// <summary>
/// Скопировать контакты в другую скважину
/// </summary>
/// <param name="idWell">ключ скважины, откуда копировать контакты</param>
/// <param name="idWellTarget">ключ скважины, куда копировать контакты</param>
/// <param name="contactIds"></param>
/// <param name="token"></param>
/// <returns></returns>
Task<int> CopyAsync(int idWell, int idWellTarget, IEnumerable<int> contactIds, CancellationToken token);
}