using System; using System.Collections.Generic; using System.ComponentModel.DataAnnotations; using System.Linq; using System.Text; using System.Threading.Tasks; namespace Data.SeaHavenIndustries { public class ForgetPasswordCode { public int Id { get; set; } public string UserId { get; set; } public string Email { get; set; } /// /// Legacy plaintext column. It is always written empty; only /// is compared. /// public string Code { get; set; } = string.Empty; /// Lowercase hex SHA-256 of ":code". [MaxLength(64)] public string CodeHash { get; set; } = string.Empty; [MaxLength(32)] public string CodeSalt { get; set; } = string.Empty; public DateTime ExpiresAtUtc { get; set; } /// Checks consumed against this code, including concurrent ones still in flight. public int FailedAttempts { get; set; } } }