feat: 初始功能
This commit is contained in:
14
Models/AdminSession.cs
Normal file
14
Models/AdminSession.cs
Normal file
@@ -0,0 +1,14 @@
|
||||
namespace CloudPrint.Client.Models;
|
||||
|
||||
public sealed class AdminSession
|
||||
{
|
||||
public int AdminId { get; init; }
|
||||
public string Username { get; init; } = string.Empty;
|
||||
public string Nickname { get; init; } = string.Empty;
|
||||
public int Role { get; init; }
|
||||
public string AccessToken { get; init; } = string.Empty;
|
||||
|
||||
public bool IsAuthenticated => !string.IsNullOrWhiteSpace(AccessToken);
|
||||
|
||||
public string DisplayName => string.IsNullOrWhiteSpace(Nickname) ? Username : Nickname;
|
||||
}
|
||||
Reference in New Issue
Block a user