2023-02-18 08:52:17 +01:00
|
|
|
using MongoDB.Entities;
|
|
|
|
|
|
2023-02-19 00:43:43 +01:00
|
|
|
namespace PrivaPub.Models.User
|
2023-02-18 08:52:17 +01:00
|
|
|
{
|
|
|
|
|
public class EmailRecovery : Entity
|
|
|
|
|
{
|
|
|
|
|
public string RootUserId { get; set; }
|
2026-10-04 03:16:59 +02:00
|
|
|
public string RecoveryCode { get; set; }//plaintext codes before 2026-10-04; migration _011 removed them, never written now
|
|
|
|
|
public string CodeHash { get; set; }//sha-256 of the code, hex; the code itself exists only in the email
|
|
|
|
|
public DateTime ExpiresAt { get; set; }
|
2023-02-18 08:52:17 +01:00
|
|
|
public string RequestIP { get; set; }
|
|
|
|
|
public DateTime CreationDate { get; set; } = DateTime.UtcNow;
|
|
|
|
|
}
|
|
|
|
|
}
|