namespace NadekoBot.Modules.Patronage;
public readonly struct Patron
{
///
/// Unique id assigned to this patron by the payment platform
///
public string UniquePlatformUserId { get; init; }
///
/// Discord UserId to which this is connected to
///
public ulong UserId { get; init; }
///
/// Amount the Patron is currently pledging or paid
///
public int Amount { get; init; }
///
/// Current Tier of the patron
/// (do not question it in consumer classes, as the calculation should be always internal and may change)
///
public PatronTier Tier { get; init; }
///
/// When was the last time this was paid
///
public DateTime PaidAt { get; init; }
///
/// After which date does the user's Patronage benefit end
///
public DateTime ValidThru { get; init; }
public bool IsActive
=> !ValidThru.IsBeforeToday();
}