forked from gongxuegit/tiku-backend.net
feat: modularize external providers
This commit is contained in:
26
Tiku.Application/Notifications/INotificationProvider.cs
Normal file
26
Tiku.Application/Notifications/INotificationProvider.cs
Normal file
@@ -0,0 +1,26 @@
|
||||
using System.Text.Json;
|
||||
using Tiku.Domain.Operations;
|
||||
|
||||
namespace Tiku.Application.Notifications;
|
||||
|
||||
public sealed record InAppNotificationRequest(
|
||||
Guid TenantId,
|
||||
Guid UserId,
|
||||
string NotificationType,
|
||||
NotificationSeverity Severity,
|
||||
string Title,
|
||||
string Message,
|
||||
Guid? CreatedBy = null,
|
||||
string? ActionLabel = null,
|
||||
string? ActionPath = null,
|
||||
string? SourceType = null,
|
||||
Guid? SourceId = null,
|
||||
string? DedupeKey = null,
|
||||
JsonElement Metadata = default);
|
||||
|
||||
public interface INotificationProvider
|
||||
{
|
||||
Task<UserNotification> UpsertInAppAsync(
|
||||
InAppNotificationRequest request,
|
||||
CancellationToken cancellationToken = default);
|
||||
}
|
||||
Reference in New Issue
Block a user