Andrés Eduardo García Márquez
|
1b9918a90c
|
feat(auth): implement account activation backend
Add complete backend support for student account activation:
Persistence layer:
- StudentConfiguration: add IsActive, ActivationCode, ActivationCodeExpiry mappings
- Migration: AddStudentActivation with new columns
- StudentRepository: implement GetByActivationCodeAsync
Application layer:
- ActivateAccountCommand: validates code and activates student account
- RegenerateActivationCodeCommand: generates new code with expiry
- CreateStudentCommand: generates activation code on registration
- StudentDto: expose activation status fields
- Auth Queries: add activation status lookup
API layer:
- Mutation: add activateAccount and regenerateActivationCode endpoints
- Query: add activation status queries
Tests:
- Unit tests for activation commands
- Integration tests for enrollment flow with activation
|
2026-01-09 07:42:05 -05:00 |
Andrés Eduardo García Márquez
|
874b67d07f
|
test: add unit and integration tests
Domain Tests:
- StudentTests: entity creation and validation
- EmailTests: value object validation
- EnrollmentDomainServiceTests: business rules
Application Tests:
- EnrollStudentCommandTests: enrollment scenarios
- Max 3 subjects validation
- Same professor constraint
Uses xUnit, Moq, and FluentAssertions
|
2026-01-07 23:00:27 -05:00 |