using System;
using SqlSugar;
namespace RainOpsMini.Models
{
[SugarTable("BanRecords")]
public class BanRecord
{
[SugarColumn(IsPrimaryKey = true, IsIdentity = true)]
public int Id { get; set; }
[SugarColumn(Length = 64)]
public string SteamId { get; set; } = null!;
[SugarColumn(IsNullable = true)]
public string SteamName { get; set; }
[SugarColumn(Length = 512)]
public string Reason { get; set; } = string.Empty;
///
/// Original duration string (e.g., "1d", "perm", "1h")
///
public string DurationString { get; set; } = "perm";
public DateTime BanTime { get; set; } = DateTime.UtcNow;
public long BanTimestamp { get; set; }
///
/// When the ban expires. 0 or MaxValue for permanent.
///
public long ExpiryTimestamp { get; set; }
[SugarColumn(Length = 128)]
public string Operator { get; set; } = "System";
[SugarColumn(IsNullable = true)]
public DateTime? UnbanTime { get; set; }
[SugarColumn(IsNullable = true, Length = 128)]
public string UnbanOperator { get; set; }
///
/// 0: Active, 1: Expired, 2: Unbanned
///
public int Status { get; set; } = 0;
}
}