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

22 lines
608 B
C#
Raw Normal View History

2022-08-30 15:05:29 +00:00
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; }
}
}