29 lines
828 B
C#
29 lines
828 B
C#
using System.Text.Json.Serialization;
|
|
|
|
namespace SharpChat.Flashii;
|
|
|
|
public class FlashiiRawBanInfo {
|
|
[JsonPropertyName("is_ban")]
|
|
public bool IsBanned { get; set; }
|
|
|
|
[JsonPropertyName("user_id")]
|
|
public string? UserId { get; set; }
|
|
|
|
[JsonPropertyName("user_name")]
|
|
public string? UserName { get; set; }
|
|
|
|
[JsonPropertyName("user_colour")]
|
|
public int UserColourRaw { get; set; }
|
|
public ColourInheritable UserColour => ColourInheritable.FromMisuzu(UserColourRaw);
|
|
|
|
[JsonPropertyName("ip_addr")]
|
|
public string? RemoteAddress { get; set; }
|
|
|
|
[JsonPropertyName("is_perma")]
|
|
public bool IsPermanent { get; set; }
|
|
|
|
[JsonPropertyName("expires")]
|
|
public DateTimeOffset ExpiresAt { get; set; }
|
|
|
|
public bool HasExpired => !IsPermanent && DateTimeOffset.UtcNow >= ExpiresAt;
|
|
}
|