Skip to content

Conversation

femelloffm
Copy link
Contributor

@femelloffm femelloffm commented Sep 21, 2025

📍 Título

Corrigir registro de localizações do usuário e revisa implementações de rotas do intérprete

📌 Descrição

  • Remove localizações das rotas dos usuários empresa
  • Ajusta entidades para que um intérprete seja vinculado a zero ou mais localizações, sendo inicialmente cadastrado sem localizações e depois podendo ficar associado a localizações na rota PATCH
  • Atualiza migrations do banco de dados
    • Atualiza especialidades para que tenham os mesmos nomes que foram passados pelos stakeholders
    • Corrige colunas nullable na tabela location
    • Adiciona novas colunas de endereço em tabelas location e appointment
    • Corrige endereços em registros existentes das tabelas location e appointment
    • Corrige dados de usuários mockados que foram adicionados e estavam com dados incompletos
  • Corrige code smells apontados pelo Sonar
  • Atualiza formato de resposta de rota GET dos intérpretes, para que esteja no formato que foi alinhado com Frontend:
{
  "success": true,
  "message": "Intérprete encontrado com sucesso",
  "data": {
    "id": "374ea903-7472-4025-931e-b99768b1215a",
    "email": "interpreter1@email.com",
    "type": "INTERPRETER",
    "status": "ACTIVE",
    "phone": "11777777777",
    "picture": null,
    "name": "Maria Souza",
    "gender": "FEMALE",
    "birthday": "1985-03-15",
    "cpf": "987.***.***-00",
    "locations": [
      {
        "id": "d1f3c8e2-5f4b-4c2a-9f3e-1a2b3c4d5e6f",
        "city": "São Paulo",
        "state": "SP",
        "neighborhood": "São João"
      }
    ],
    "specialties": [
      {
        "id": "cb90196e-6229-4384-957a-a52587ff67ba",
        "name": "Libras"
      }
    ],
    "professional_info": {
      "cnpj": null,
      "rating": 4.8,
      "modality": "ONLINE",
      "description": "Intérprete de Libras com experiência em conferências.",
      "min_value": 100,
      "max_value": 300,
      "image_rights": true
    }
  }
}

🛠️ O que foi feito?

  • Implementação de nova funcionalidade
  • Correção de bug
  • Refatoração de código
  • Atualização de documentação

🧪 Testes realizados:

Cadastro de um novo intérprete
image

Busca de todos os intérpretes
image

Busca de um intérprete por id
image
image

Atualiza intérprete por id
image

Deleta intérprete por id
image

👀 Problemas conhecidos:

  • Não atinge 80% da cobertura de testes unitários

📷 Anexos

image image

✅ Checklist

  • Testes foram atualizados
  • Documentação foi atualizada (se necessário)
  • O código segue os padrões do projeto

📎 Referências

#96

@Copilot Copilot AI review requested due to automatic review settings September 21, 2025 17:14
@femelloffm femelloffm requested a review from a team as a code owner September 21, 2025 17:14
@femelloffm femelloffm linked an issue Sep 21, 2025 that may be closed by this pull request
Copy link
Contributor

@Copilot Copilot AI left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Pull Request Overview

This PR refactors the interpreter user location registration system to move from a one-to-one relationship to a one-to-many relationship between interpreters and locations. It also reorganizes the DTO structure to improve code organization and updates database migrations.

  • Refactors interpreter-location relationship from OneToOne to OneToMany
  • Consolidates interpreter registration and management into a single service
  • Reorganizes DTOs into proper request/response packages

Reviewed Changes

Copilot reviewed 49 out of 49 changed files in this pull request and generated 4 comments.

Show a summary per file
File Description
Location.java Changes relationship from OneToOne to ManyToOne with interpreter
Interpreter.java Updates to have List instead of single Location
InterpreterService.java New consolidated service replacing InterpreterRegisterService
InterpreterResponseMapper.java Updates mapping logic for multiple locations
Database migrations Updates specialty names, location columns, and user data
DTO reorganization Moves DTOs to proper request/response packages
Test files Updates tests to match new service structure

@femelloffm femelloffm added this to the Sprint 2 milestone Sep 21, 2025
@femelloffm femelloffm added bugfix Something isn't working dívida técnica labels Sep 21, 2025
@femelloffm femelloffm self-assigned this Sep 21, 2025
@femelloffm femelloffm linked an issue Sep 23, 2025 that may be closed by this pull request
Copy link

@MatheusBerwaldt MatheusBerwaldt merged commit 3a042eb into dev Sep 23, 2025
3 checks passed
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

bugfix Something isn't working dívida técnica

Projects

None yet

Development

Successfully merging this pull request may close these issues.

Corrigir registro de localizações do usuário Aumentar cobertura de testes unitários

2 participants