Commit Graph

2 Commits

Author SHA1 Message Date
Andrés Eduardo García Márquez 847b494a71 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

Co-Authored-By: Claude Opus 4.5 <noreply@anthropic.com>
2026-01-09 07:42:05 -05:00
Andrés Eduardo García Márquez 7ba94d59e5 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

Co-Authored-By: Claude Opus 4.5 <noreply@anthropic.com>
2026-01-07 23:00:27 -05:00