2025-04-26 23:15:54 +00:00
|
|
|
using System.Text.Json.Serialization;
|
2023-02-09 00:53:42 +01:00
|
|
|
|
2025-04-26 23:15:54 +00:00
|
|
|
namespace SharpChat.Flashii;
|
2023-02-09 00:53:42 +01:00
|
|
|
|
2025-04-26 23:15:54 +00:00
|
|
|
public class FlashiiRawBanInfo {
|
|
|
|
[JsonPropertyName("is_ban")]
|
|
|
|
public bool IsBanned { get; set; }
|
2023-02-09 00:53:42 +01:00
|
|
|
|
2025-04-26 23:15:54 +00:00
|
|
|
[JsonPropertyName("user_id")]
|
|
|
|
public string? UserId { get; set; }
|
2025-04-26 19:42:23 +00:00
|
|
|
|
2025-04-26 23:15:54 +00:00
|
|
|
[JsonPropertyName("user_name")]
|
|
|
|
public string? UserName { get; set; }
|
2025-04-26 19:42:23 +00:00
|
|
|
|
2025-04-26 23:15:54 +00:00
|
|
|
[JsonPropertyName("user_colour")]
|
|
|
|
public int UserColourRaw { get; set; }
|
|
|
|
public ColourInheritable UserColour => ColourInheritable.FromMisuzu(UserColourRaw);
|
2023-02-09 00:53:42 +01:00
|
|
|
|
2025-04-26 23:15:54 +00:00
|
|
|
[JsonPropertyName("ip_addr")]
|
|
|
|
public string? RemoteAddress { get; set; }
|
2023-02-09 00:53:42 +01:00
|
|
|
|
2025-04-26 23:15:54 +00:00
|
|
|
[JsonPropertyName("is_perma")]
|
|
|
|
public bool IsPermanent { get; set; }
|
2023-02-09 00:53:42 +01:00
|
|
|
|
2025-04-26 23:15:54 +00:00
|
|
|
[JsonPropertyName("expires")]
|
|
|
|
public DateTimeOffset ExpiresAt { get; set; }
|
|
|
|
|
|
|
|
public bool HasExpired => !IsPermanent && DateTimeOffset.UtcNow >= ExpiresAt;
|
2023-02-09 00:53:42 +01:00
|
|
|
}
|