sharp-chat/SharpChat.DataProvider.Misuzu/Bans/MisuzuBanRecord.cs

21 lines
608 B
C#

using SharpChat.Bans;
using SharpChat.DataProvider.Misuzu.Users;
using System;
using System.Net;
using System.Text.Json.Serialization;
namespace SharpChat.DataProvider.Misuzu.Bans {
public class MisuzuBanRecord : MisuzuUser, IBanRecord {
[JsonIgnore]
public IPAddress UserIP => IPAddress.Parse(UserIPString);
[JsonPropertyName(@"ip")]
public string UserIPString { get; set; }
[JsonPropertyName(@"expires")]
public DateTimeOffset Expires { get; set; }
[JsonPropertyName(@"is_permanent")]
public bool IsPermanent { get; set; }
}
}