forked from ddrilling/AsbCloudServer
42 lines
1.4 KiB
C#
42 lines
1.4 KiB
C#
using AsbCloudApp.Data;
|
|
using AsbCloudApp.Requests;
|
|
using AsbCloudApp.Services;
|
|
using System.Threading;
|
|
using System.Threading.Tasks;
|
|
|
|
namespace AsbCloudApp.Repositories;
|
|
|
|
/// <summary>
|
|
/// Репозиторий для уведомлений
|
|
/// </summary>
|
|
public interface INotificationRepository : ICrudRepository<NotificationDto>
|
|
{
|
|
/// <summary>
|
|
/// Получение уведомлений по параметрам
|
|
/// </summary>
|
|
/// <param name="idUser"></param>
|
|
/// <param name="request"></param>
|
|
/// <param name="cancellationToken"></param>
|
|
/// <returns></returns>
|
|
Task<PaginationContainer<NotificationDto>> GetNotificationsAsync(int idUser,
|
|
NotificationRequest request,
|
|
CancellationToken cancellationToken);
|
|
|
|
/// <summary>
|
|
/// Удаление уведомлений по параметрам
|
|
/// </summary>
|
|
/// <param name="request"></param>
|
|
/// <param name="cancellationToken"></param>
|
|
/// <returns></returns>
|
|
Task<int> DeleteAsync(NotificationDeleteRequest request,
|
|
CancellationToken cancellationToken);
|
|
|
|
/// <summary>
|
|
/// Получение количества непрочтенных уведомлений
|
|
/// </summary>
|
|
/// <param name="idUser"></param>
|
|
/// <param name="idTransportType"></param>
|
|
/// <param name="cancellationToken"></param>
|
|
/// <returns></returns>
|
|
Task<int> GetUnreadCountAsync(int idUser, int idTransportType, CancellationToken cancellationToken);
|
|
} |