Compare commits

..

No commits in common. "0d9c3d46ca55409b76c77ceee6156762f4136e49" and "d1bb921b4b5d3b3383cee421f82d21788d297ebe" have entirely different histories.

2 changed files with 0 additions and 25 deletions

View File

@ -10,11 +10,6 @@ public class Student
public string Name { get; private set; } = string.Empty;
public Email Email { get; private set; } = null!;
// Activation fields
public string? ActivationCodeHash { get; private set; }
public DateTime? ActivationExpiresAt { get; private set; }
public bool IsActivated => ActivationCodeHash == null;
private readonly List<Enrollment> _enrollments = [];
public IReadOnlyCollection<Enrollment> Enrollments => _enrollments.AsReadOnly();
@ -58,19 +53,4 @@ public class Student
{
_enrollments.Remove(enrollment);
}
public void SetActivationCode(string codeHash, TimeSpan expiresIn)
{
ActivationCodeHash = codeHash;
ActivationExpiresAt = DateTime.UtcNow.Add(expiresIn);
}
public void ClearActivationCode()
{
ActivationCodeHash = null;
ActivationExpiresAt = null;
}
public bool IsActivationExpired() =>
ActivationExpiresAt.HasValue && DateTime.UtcNow > ActivationExpiresAt.Value;
}

View File

@ -70,11 +70,6 @@ public interface IStudentRepository
int pageSize = 10,
CancellationToken ct = default);
/// <summary>
/// Gets all students with pending activation (not expired).
/// </summary>
Task<IReadOnlyList<Student>> GetPendingActivationAsync(CancellationToken ct = default);
/// <summary>
/// Adds a new student to the context.
/// </summary>