mirror of
https://gitee.com/xiarenalofs/squad-rain-ops-mini.git
synced 2026-08-07 05:45:46 +08:00
49 lines
1.3 KiB
C#
49 lines
1.3 KiB
C#
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;
|
|
|
|
/// <summary>
|
|
/// Original duration string (e.g., "1d", "perm", "1h")
|
|
/// </summary>
|
|
public string DurationString { get; set; } = "perm";
|
|
|
|
public DateTime BanTime { get; set; } = DateTime.UtcNow;
|
|
public long BanTimestamp { get; set; }
|
|
|
|
/// <summary>
|
|
/// When the ban expires. 0 or MaxValue for permanent.
|
|
/// </summary>
|
|
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; }
|
|
|
|
/// <summary>
|
|
/// 0: Active, 1: Expired, 2: Unbanned
|
|
/// </summary>
|
|
public int Status { get; set; } = 0;
|
|
}
|
|
}
|