2023-06-21 11:44:04 +05:00
|
|
|
|
using AsbCloudApp.Data;
|
2023-10-09 12:20:00 +05:00
|
|
|
|
using AsbCloudApp.Data.User;
|
2023-06-21 11:44:04 +05:00
|
|
|
|
using System.Collections.Generic;
|
|
|
|
|
using System.Threading;
|
|
|
|
|
using System.Threading.Tasks;
|
|
|
|
|
|
|
|
|
|
namespace AsbCloudApp.Services
|
|
|
|
|
{
|
|
|
|
|
/// <summary>
|
|
|
|
|
/// Сервис по работе с контактной информацией по скважине
|
|
|
|
|
/// </summary>
|
|
|
|
|
public interface IWellContactService
|
|
|
|
|
{
|
|
|
|
|
/// <summary>
|
2023-10-12 16:33:30 +05:00
|
|
|
|
/// Получение контактов по ключу скважины и типу контакта
|
2023-06-21 11:44:04 +05:00
|
|
|
|
/// </summary>
|
2023-10-12 16:33:30 +05:00
|
|
|
|
/// <param name="idWell">ключ скважины</param>
|
2023-06-21 11:44:04 +05:00
|
|
|
|
/// <param name="contactTypeId">тип контакта</param>
|
|
|
|
|
/// <param name="token"></param>
|
|
|
|
|
/// <returns></returns>
|
2023-10-12 16:33:30 +05:00
|
|
|
|
Task<IEnumerable<ContactDto>> GetAllAsync(int idWell, int contactTypeId, CancellationToken token);
|
|
|
|
|
|
|
|
|
|
/// <summary>
|
2023-10-13 16:58:27 +05:00
|
|
|
|
/// Получение контакта по ключу
|
2023-10-12 16:33:30 +05:00
|
|
|
|
/// </summary>
|
|
|
|
|
/// <param name="idWell">ключ скважины</param>
|
2023-10-16 10:56:10 +05:00
|
|
|
|
/// <param name="id">ключ пользователя</param>
|
2023-10-12 16:33:30 +05:00
|
|
|
|
/// <param name="token"></param>
|
|
|
|
|
/// <returns></returns>
|
|
|
|
|
Task<ContactDto?> GetAsync(int idWell, int id, CancellationToken token);
|
2023-06-21 11:44:04 +05:00
|
|
|
|
|
|
|
|
|
/// <summary>
|
2023-10-09 12:20:00 +05:00
|
|
|
|
/// Получение типов контактов
|
2023-06-21 11:44:04 +05:00
|
|
|
|
/// </summary>
|
|
|
|
|
/// <param name="token"></param>
|
|
|
|
|
/// <returns></returns>
|
2023-10-13 16:58:27 +05:00
|
|
|
|
Task<IEnumerable<CompanyTypeDto>> GetTypesAsync(CancellationToken token);
|
2023-06-21 11:44:04 +05:00
|
|
|
|
|
2023-10-09 12:20:00 +05:00
|
|
|
|
/// <summary>
|
|
|
|
|
/// Добавление контакта
|
|
|
|
|
/// </summary>
|
|
|
|
|
/// <param name="contactDto"></param>
|
|
|
|
|
/// <param name="token"></param>
|
|
|
|
|
/// <returns></returns>
|
|
|
|
|
Task<int> InsertAsync(ContactDto contactDto, CancellationToken token);
|
|
|
|
|
|
2023-06-21 11:44:04 +05:00
|
|
|
|
/// <summary>
|
2023-10-12 16:33:30 +05:00
|
|
|
|
/// Изменение контакта
|
2023-06-21 11:44:04 +05:00
|
|
|
|
/// </summary>
|
2023-10-12 16:33:30 +05:00
|
|
|
|
/// <param name="contactDto"></param>
|
|
|
|
|
/// <param name="token"></param>
|
|
|
|
|
/// <returns></returns>
|
|
|
|
|
Task<int> UpdateAsync(ContactDto contactDto, CancellationToken token);
|
|
|
|
|
|
|
|
|
|
/// <summary>
|
|
|
|
|
/// Удаление контакта
|
|
|
|
|
/// </summary>
|
2023-10-16 11:48:59 +05:00
|
|
|
|
/// <param name="idWell">ключ скважины</param>
|
2023-10-12 16:33:30 +05:00
|
|
|
|
/// <param name="id">ключ скважины</param>
|
2023-06-21 11:44:04 +05:00
|
|
|
|
/// <param name="token"></param>
|
|
|
|
|
/// <returns></returns>
|
2023-10-16 11:48:59 +05:00
|
|
|
|
Task<int> DeleteAsync(int idWell, int id, CancellationToken token);
|
2023-06-21 11:44:04 +05:00
|
|
|
|
}
|
|
|
|
|
}
|