31 lines
1,016 B
C#
31 lines
1,016 B
C#
using System.Text.Json.Serialization;
|
|
|
|
namespace blazingconsole.Types
|
|
{
|
|
public class LinkedUser(string username, Guid uniqueId, int level, long instant, List<Permission> permissions, long expiresAt)
|
|
{
|
|
[JsonPropertyName("username")]
|
|
public required string Username { get; set; } = username;
|
|
|
|
[JsonPropertyName("uuid")]
|
|
public required Guid UniqueId { get; set; } = uniqueId;
|
|
|
|
[JsonPropertyName("permissions")]
|
|
public required List<Permission> Permissions { get; set; } = permissions;
|
|
|
|
// things to check if access is expired
|
|
|
|
[JsonPropertyName("expiresAt")]
|
|
public required long ExpiresAt { get; set; } = expiresAt;
|
|
|
|
[JsonPropertyName("level")]
|
|
public required int Level { get; set; } = level;
|
|
|
|
[JsonPropertyName("instant")]
|
|
public required long Instant { get; set; } = instant;
|
|
|
|
public string AvatarUrl() {
|
|
return $"https://minotar.net/helm/{UniqueId}.png";
|
|
}
|
|
}
|
|
}
|