- Domain: NotificationCategory enum, Notification entity, INotificationRepository - Infrastructure: NotificationConfiguration, NotificationRepository, AppDbContext/DI 등록 - Migration: AddNotificationTable 생성 및 적용 - Application: DTO 7개, INotificationService, NotificationService, DI 등록 - API: NotificationController (summary, list, read, read-all) Closes #247
16 lines
611 B
C#
16 lines
611 B
C#
using SPMS.Domain.Entities;
|
|
using SPMS.Domain.Enums;
|
|
|
|
namespace SPMS.Domain.Interfaces;
|
|
|
|
public interface INotificationRepository : IRepository<Notification>
|
|
{
|
|
Task<(IReadOnlyList<Notification> Items, int TotalCount)> GetPagedAsync(
|
|
long adminId, NotificationCategory? category, DateTime? from, DateTime? to,
|
|
bool? isRead, int page, int size);
|
|
Task<int> GetUnreadCountAsync(long adminId);
|
|
Task<IReadOnlyList<Notification>> GetRecentAsync(long adminId, int limit);
|
|
Task<Notification?> GetByIdAndAdminAsync(long id, long adminId);
|
|
Task<int> MarkAllAsReadAsync(long adminId);
|
|
}
|