- WP-0.2: Namespace/folder skeleton (26 directories) - WP-0.3: Shared data types (6 enums, RetryPolicy, Result<T>) - WP-0.4: 24 domain entity POCOs across 10 domain areas - WP-0.5: 7 repository interfaces with full CRUD signatures - WP-0.6: IAuditService cross-cutting interface - WP-0.7: 26 message contract records across 8 concern areas - WP-0.8: IDataConnection protocol abstraction with batch ops - WP-0.9: 8 architectural constraint enforcement tests All 40 tests pass, zero warnings.
31 lines
2.0 KiB
C#
31 lines
2.0 KiB
C#
using ScadaLink.Commons.Entities.Notifications;
|
|
|
|
namespace ScadaLink.Commons.Interfaces.Repositories;
|
|
|
|
public interface INotificationRepository
|
|
{
|
|
// NotificationList
|
|
Task<NotificationList?> GetNotificationListByIdAsync(int id, CancellationToken cancellationToken = default);
|
|
Task<IReadOnlyList<NotificationList>> GetAllNotificationListsAsync(CancellationToken cancellationToken = default);
|
|
Task<NotificationList?> GetListByNameAsync(string name, CancellationToken cancellationToken = default);
|
|
Task AddNotificationListAsync(NotificationList list, CancellationToken cancellationToken = default);
|
|
Task UpdateNotificationListAsync(NotificationList list, CancellationToken cancellationToken = default);
|
|
Task DeleteNotificationListAsync(int id, CancellationToken cancellationToken = default);
|
|
|
|
// NotificationRecipient
|
|
Task<NotificationRecipient?> GetRecipientByIdAsync(int id, CancellationToken cancellationToken = default);
|
|
Task<IReadOnlyList<NotificationRecipient>> GetRecipientsByListIdAsync(int notificationListId, CancellationToken cancellationToken = default);
|
|
Task AddRecipientAsync(NotificationRecipient recipient, CancellationToken cancellationToken = default);
|
|
Task UpdateRecipientAsync(NotificationRecipient recipient, CancellationToken cancellationToken = default);
|
|
Task DeleteRecipientAsync(int id, CancellationToken cancellationToken = default);
|
|
|
|
// SmtpConfiguration
|
|
Task<SmtpConfiguration?> GetSmtpConfigurationByIdAsync(int id, CancellationToken cancellationToken = default);
|
|
Task<IReadOnlyList<SmtpConfiguration>> GetAllSmtpConfigurationsAsync(CancellationToken cancellationToken = default);
|
|
Task AddSmtpConfigurationAsync(SmtpConfiguration configuration, CancellationToken cancellationToken = default);
|
|
Task UpdateSmtpConfigurationAsync(SmtpConfiguration configuration, CancellationToken cancellationToken = default);
|
|
Task DeleteSmtpConfigurationAsync(int id, CancellationToken cancellationToken = default);
|
|
|
|
Task<int> SaveChangesAsync(CancellationToken cancellationToken = default);
|
|
}
|