31 lines
892 B
C#
31 lines
892 B
C#
using SharpChat.Auth;
|
|
using System.Text.Json.Serialization;
|
|
|
|
namespace SharpChat.Flashii;
|
|
|
|
public class FlashiiAuthResult : AuthResult {
|
|
public string UserId => UserIdRaw.ToString();
|
|
public string UserName => UserNameRaw ?? string.Empty;
|
|
public ColourInheritable UserColour => ColourInheritable.FromMisuzu(UserColourRaw);
|
|
|
|
[JsonPropertyName("success")]
|
|
public bool Success { get; init; }
|
|
|
|
[JsonPropertyName("reason")]
|
|
public string? Reason { get; init; }
|
|
|
|
[JsonPropertyName("user_id")]
|
|
public long UserIdRaw { get; init; }
|
|
|
|
[JsonPropertyName("username")]
|
|
public string? UserNameRaw { get; init; }
|
|
|
|
[JsonPropertyName("colour_raw")]
|
|
public int UserColourRaw { get; init; }
|
|
|
|
[JsonPropertyName("hierarchy")]
|
|
public int UserRank { get; init; }
|
|
|
|
[JsonPropertyName("perms")]
|
|
public UserPermissions UserPermissions { get; init; }
|
|
}
|