add a bunch of stuff copied from Foxchat.NET
This commit is contained in:
parent
f4c0a40259
commit
6114f384a0
21 changed files with 1216 additions and 35 deletions
|
@ -4,12 +4,14 @@ namespace Foxnouns.Backend.Database.Models;
|
|||
|
||||
public class Token : BaseModel
|
||||
{
|
||||
public required byte[] Hash { get; init; }
|
||||
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!;
|
||||
|
||||
public Snowflake ApplicationId { get; set; }
|
||||
public Application Application { get; set; } = null!;
|
||||
}
|
Loading…
Add table
Add a link
Reference in a new issue