2024-07-04 11:02:45 +05:00
|
|
|
|
using AsbCloudApp.Data;
|
2023-10-09 12:20:00 +05:00
|
|
|
|
using AsbCloudApp.Data.User;
|
2024-08-08 14:29:59 +05:00
|
|
|
|
using AsbCloudApp.Requests;
|
2023-06-21 11:44:04 +05:00
|
|
|
|
using System.Collections.Generic;
|
|
|
|
|
using System.Threading;
|
|
|
|
|
using System.Threading.Tasks;
|
|
|
|
|
|
2024-08-19 10:01:07 +05:00
|
|
|
|
namespace AsbCloudApp.Services;
|
|
|
|
|
|
|
|
|
|
/// <summary>
|
|
|
|
|
/// Сервис по работе с контактной информацией по скважине
|
|
|
|
|
/// </summary>
|
|
|
|
|
public interface IWellContactService
|
2023-06-21 11:44:04 +05:00
|
|
|
|
{
|
|
|
|
|
/// <summary>
|
2024-08-19 10:01:07 +05:00
|
|
|
|
/// Получение контактов по параметрам запроса
|
2023-06-21 11:44:04 +05:00
|
|
|
|
/// </summary>
|
2024-08-19 10:01:07 +05:00
|
|
|
|
/// <param name="request">ключ скважины</param>
|
|
|
|
|
/// <param name="token"></param>
|
|
|
|
|
/// <returns></returns>
|
|
|
|
|
Task<IEnumerable<ContactDto>> GetAllAsync(WellContactRequest request, CancellationToken token);
|
2023-10-12 16:33:30 +05:00
|
|
|
|
|
2024-08-19 10:01:07 +05:00
|
|
|
|
/// <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);
|
2023-06-21 11:44:04 +05:00
|
|
|
|
|
2024-08-19 10:01:07 +05:00
|
|
|
|
/// <summary>
|
|
|
|
|
/// Получение типов контактов
|
|
|
|
|
/// </summary>
|
|
|
|
|
/// <param name="token"></param>
|
|
|
|
|
/// <returns></returns>
|
|
|
|
|
Task<IEnumerable<CompanyTypeDto>> GetTypesAsync(CancellationToken token);
|
2023-06-21 11:44:04 +05:00
|
|
|
|
|
2024-08-19 10:01:07 +05:00
|
|
|
|
/// <summary>
|
|
|
|
|
/// Добавление контакта
|
|
|
|
|
/// </summary>
|
|
|
|
|
/// <param name="contactDto"></param>
|
|
|
|
|
/// <param name="token"></param>
|
|
|
|
|
/// <returns></returns>
|
|
|
|
|
Task<int> InsertAsync(ContactDto contactDto, CancellationToken token);
|
2023-10-09 12:20:00 +05:00
|
|
|
|
|
2024-08-19 10:01:07 +05:00
|
|
|
|
/// <summary>
|
|
|
|
|
/// Изменение контакта
|
|
|
|
|
/// </summary>
|
|
|
|
|
/// <param name="contactDto"></param>
|
|
|
|
|
/// <param name="token"></param>
|
|
|
|
|
/// <returns></returns>
|
|
|
|
|
Task<int> UpdateAsync(ContactDto contactDto, CancellationToken token);
|
2023-10-12 16:33:30 +05:00
|
|
|
|
|
2024-08-19 10:01:07 +05:00
|
|
|
|
/// <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);
|
2024-07-25 14:55:05 +05:00
|
|
|
|
|
2024-08-19 10:01:07 +05:00
|
|
|
|
/// <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);
|
2023-06-21 11:44:04 +05:00
|
|
|
|
}
|