2023-04-20 15:01:19 +05:00
|
|
|
|
using AsbCloudApp.Data;
|
|
|
|
|
using System.Collections.Generic;
|
|
|
|
|
using System.Threading.Tasks;
|
|
|
|
|
using System.Threading;
|
|
|
|
|
using AsbCloudApp.Requests;
|
|
|
|
|
using AsbCloudApp.Services;
|
|
|
|
|
|
|
|
|
|
namespace AsbCloudApp.Repositories
|
|
|
|
|
{
|
|
|
|
|
#nullable enable
|
|
|
|
|
/// <summary>
|
|
|
|
|
/// репозиторий по работе с faq-вопросами
|
|
|
|
|
/// </summary>
|
|
|
|
|
public interface IFaqRepository
|
|
|
|
|
{
|
|
|
|
|
/// <summary>
|
|
|
|
|
/// Получить список вопросов
|
|
|
|
|
/// </summary>
|
|
|
|
|
/// <param name="request"></param>
|
|
|
|
|
/// <param name="token"></param>
|
|
|
|
|
/// <returns></returns>
|
2023-04-20 17:18:00 +05:00
|
|
|
|
Task<IEnumerable<FaqDto>> GetAllAsync(FaqRequest request, CancellationToken token);
|
2023-04-20 15:01:19 +05:00
|
|
|
|
|
|
|
|
|
/// <summary>
|
|
|
|
|
/// Добавить вопрос
|
|
|
|
|
/// </summary>
|
|
|
|
|
/// <param name="faqDto"></param>
|
|
|
|
|
/// <param name="token"></param>
|
|
|
|
|
/// <returns></returns>
|
|
|
|
|
Task<int> InsertAsync(FaqDto faqDto, CancellationToken token);
|
|
|
|
|
|
|
|
|
|
/// <summary>
|
|
|
|
|
/// Обновить существующий вопрос
|
|
|
|
|
/// </summary>
|
|
|
|
|
/// <param name="dto"></param>
|
|
|
|
|
/// <param name="token"></param>
|
|
|
|
|
/// <returns></returns>
|
|
|
|
|
Task<int> UpdateAsync(FaqDto dto, CancellationToken token);
|
|
|
|
|
|
|
|
|
|
/// <summary>
|
|
|
|
|
/// Объединить 2 вопроса в 1
|
|
|
|
|
/// </summary>
|
|
|
|
|
/// <param name="sourceIds">Ключи вопросов, подлежащих объединению</param>
|
|
|
|
|
/// <param name="mergeTexts">Флаг, объединять текст вопросов или нет</param>
|
|
|
|
|
/// <param name="token"></param>
|
|
|
|
|
/// <returns></returns>
|
|
|
|
|
Task<int> MergeAsync(IEnumerable<int> sourceIds, bool mergeTexts, CancellationToken token);
|
|
|
|
|
|
|
|
|
|
/// <summary>
|
|
|
|
|
/// Пометить вопрос по id как удаленный
|
|
|
|
|
/// </summary>
|
|
|
|
|
/// <param name="idWell"></param>
|
|
|
|
|
/// <param name="id"></param>
|
|
|
|
|
/// <param name="token"></param>
|
|
|
|
|
/// <returns></returns>
|
|
|
|
|
Task<int> MarkAsDeletedAsync(int idWell, int id, CancellationToken token);
|
|
|
|
|
}
|
|
|
|
|
#nullable disable
|
|
|
|
|
}
|