namespace ClassNotify.Shared.Models; /// /// 凭安全恢复密钥 (Recovery Key) 重置密码请求 DTO (100% 离线自救,无需任何短信或邮件服务) /// public class ResetPasswordByRecoveryKeyDto { public string UsernameOrEmail { get; set; } = string.Empty; public string RecoveryKey { get; set; } = string.Empty; public string NewPassword { get; set; } = string.Empty; } public class ResetPasswordByRecoveryKeyResultDto { public bool Success { get; set; } public string Message { get; set; } = string.Empty; public string? NewRecoveryKey { get; set; } // 旧密钥使用后自动作废,生成新密钥交付用户 } /// /// 请求通过邮箱链接重置密码请求 DTO (免费 SMTP,按需发送) /// public class RequestPasswordResetEmailDto { public string Email { get; set; } = string.Empty; } /// /// 凭邮件/管理员一次性 Ticket 重置密码请求 DTO /// public class ResetPasswordByTokenDto { public string Token { get; set; } = string.Empty; public string NewPassword { get; set; } = string.Empty; } /// /// 管理员签发一次性重置工单 DTO (管理员不接触新密码) /// public class IssueResetTicketDto { public string UserId { get; set; } = string.Empty; } public class ResetTicketResultDto { public bool Success { get; set; } public string? Ticket { get; set; } public string? ResetUrl { get; set; } public DateTimeOffset? ExpiresAtUtc { get; set; } public string? ErrorMessage { get; set; } } /// /// 登录用户轮换安全恢复密钥请求 DTO /// public class RotateRecoveryKeyDto { public string CurrentPassword { get; set; } = string.Empty; }