This commit is contained in:
sam 2024-05-27 15:53:54 +02:00
commit f4c0a40259
Signed by: sam
GPG key ID: B4EF20DDE721CAA1
27 changed files with 2188 additions and 0 deletions

View file

@ -0,0 +1,15 @@
using NodaTime;
namespace Foxnouns.Backend.Database.Models;
public class Token : BaseModel
{
public required Instant ExpiresAt { get; init; }
public required string[] Scopes { get; init; }
public bool ManuallyExpired { get; set; }
public bool IsExpired => ManuallyExpired || ExpiresAt < SystemClock.Instance.GetCurrentInstant();
public Snowflake UserId { get; init; }
public User User { get; init; } = null!;
}