feat(ms-simulado): card 03-04 — rename TipoSimulado→Categoria + fixes getAll de prova - #149
Merged
Merged
Conversation
Pure rename — no schema or behavior change. Route changes from /v1/tipo-simulado to /v1/categoria. MongoDB collection changes from tiposimulados to categorias (migration script pending). Parte do Card 01 da refatoração Categoria (docs/categoria-simulado.md §8).
…rsonalizado Adiciona campos exame, custom, selecionavel e descricao ao schema Categoria; torna quantidadeTotalQuestao nullable. Cria ExameSeedService com OnModuleInit para upsert idempotente do Exame "Personalizado". CategoriaRepository popula exame em getAll e getById. Co-Authored-By: Claude Sonnet 4.6 <noreply@anthropic.com>
…Prova.exame Renomeia Prova.tipo → Prova.categoria e Simulado.tipo → Simulado.categoria em todo o codebase. Remove Prova.exame — exame agora acessado via prova.categoria.exame. Atualiza dispatcher, factories ENEM, repositories e services. createSimuladoArea passa a filtrar por exame para evitar homônimos. historico.repository.ts corrigido no aggregation pipeline. Co-Authored-By: Claude Sonnet 4.6 <noreply@anthropic.com>
…a Categoria Co-Authored-By: Claude Sonnet 4.6 <noreply@anthropic.com>
…e expor nome da categoria - ProvaRepository.getAll sobrescreve BaseRepository para popular categoria→exame e questoes - ProvaService.getAll adiciona campo categoria (nome) no DTO de saída - GetProvaDTOOutout inclui campo categoria Co-Authored-By: Claude Sonnet 4.6 <noreply@anthropic.com>
…updateFiles da Prova Co-Authored-By: Claude Sonnet 4.6 <noreply@anthropic.com>
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Summary
TipoSimulado→Categoriaem todo o ms-simulado (card 03)Categoriacom camposexame,custom,selecionavel,descricao+ seedExame Personalizado(card 02)regrasdaCategoria(código morto) (card 04)getAlldeProva:BaseRepository.getAllnão populavacategoria→exame, causandoTypeError: Cannot read properties of undefined (reading 'nome')ao abrir a tela de provasGetProvaDTOOutoutagora expõe campocategoria(nome da categoria) além doexamejá existenteTest plan
GET /v1/provaretorna sem erro com camposcategoriaeexamepreenchidosGET /v1/categoriaretorna lista com os novos campos (selecionavel,custom,descricao,exame)POST /v1/provae verificar que aparece corretamente nogetAllnpx jest --detectOpenHandles --forceExit🤖 Generated with Claude Code