btcpayserver/BTCPayServer/Services/Notifications/NotificationScopes.cs

31 lines
755 B
C#
Raw Normal View History

2020-06-28 21:44:35 -05:00
using System;
using System.Collections.Generic;
using BTCPayServer.Services.Stores;
namespace BTCPayServer.Services.Notifications;
public class AdminScope : INotificationScope;
public class StoreScope : INotificationScope
{
public StoreScope(string storeId, IEnumerable<StoreRoleId> roles = null)
{
ArgumentNullException.ThrowIfNull(storeId);
StoreId = storeId;
Roles = roles;
}
public string StoreId { get; }
public IEnumerable<StoreRoleId> Roles { get; set; }
}
public class UserScope : INotificationScope
{
public UserScope(string userId)
{
ArgumentNullException.ThrowIfNull(userId);
UserId = userId;
}
public string UserId { get; }
}
public interface INotificationScope;