Radicade Public Code

This commit is contained in:
JogmansonReal
2026-10-16 23:33:13 -07:00
commit 55175acdf6
832 changed files with 363261 additions and 0 deletions
+67
View File
@@ -0,0 +1,67 @@
using System.ComponentModel.DataAnnotations;
using System.ComponentModel.DataAnnotations.Schema;
namespace RadicadeServer.Admin;
public class AdminUser
{
[Key, DatabaseGenerated(DatabaseGeneratedOption.Identity)]
public long Id { get; set; }
[Required, MaxLength(64)]
public string Username { get; set; } = "";
[Required]
public string PasswordHash { get; set; } = "";
[MaxLength(64)]
public string? TotpSecret { get; set; }
public bool TotpEnabled { get; set; }
public DateTime CreatedAt { get; set; } = DateTime.UtcNow;
public DateTime? LastLoginAt { get; set; }
}
public class AdminSessionRecord
{
[Key, DatabaseGenerated(DatabaseGeneratedOption.Identity)]
public long Id { get; set; }
public long AdminUserId { get; set; }
[Required, MaxLength(64)]
public string TokenHash { get; set; } = "";
[MaxLength(64)]
public string? PreviousTokenHash { get; set; }
public DateTime CreatedAt { get; set; } = DateTime.UtcNow;
public DateTime LastSeenAt { get; set; } = DateTime.UtcNow;
public DateTime ExpiresAt { get; set; }
public DateTime? RevokedAt { get; set; }
}