2020-10-15 14:28:09 +02:00
|
|
|
using System;
|
|
|
|
|
2020-11-17 13:46:23 +01:00
|
|
|
namespace BTCPayServer.Abstractions.Contracts
|
2020-10-15 14:28:09 +02:00
|
|
|
{
|
2020-10-20 13:09:09 +02:00
|
|
|
public abstract class BaseNotification
|
|
|
|
{
|
|
|
|
public abstract string Identifier { get; }
|
|
|
|
public abstract string NotificationType { get; }
|
|
|
|
}
|
|
|
|
|
2020-10-15 14:28:09 +02:00
|
|
|
public interface INotificationHandler
|
|
|
|
{
|
|
|
|
string NotificationType { get; }
|
|
|
|
Type NotificationBlobType { get; }
|
2020-10-20 13:09:09 +02:00
|
|
|
public (string identifier, string name)[] Meta { get; }
|
2020-10-15 14:28:09 +02:00
|
|
|
void FillViewModel(object notification, NotificationViewModel vm);
|
|
|
|
}
|
|
|
|
|
|
|
|
public class NotificationViewModel
|
|
|
|
{
|
|
|
|
public string Id { get; set; }
|
|
|
|
public DateTimeOffset Created { get; set; }
|
|
|
|
public string Body { get; set; }
|
|
|
|
public string ActionLink { get; set; }
|
|
|
|
public bool Seen { get; set; }
|
|
|
|
}
|
|
|
|
}
|