IA-1008 : refactor: migrate userId to String and enrich assistant model with subject resolution
Summary
This MR migrates userId from Long to String across all layers of the
assistant-japprends microservice, enriches the ChildExerciseAssistant model
with subject/chapter/exercise metadata resolved at mapping time, and adds minor
infrastructure improvements.
Changes
Dependency
- Bump
brainboost-common0.0.103-RELEASE→0.0.104-SNAPSHOT
Infrastructure
- Add
@EnableJpaAuditingtoApplicationto enable JPA audit timestamps - Expose
RestTemplateas a Spring bean (required by the new mapper) - Add
subject-management.urlproperty toapplication.yml
Breaking refactor — userId: Long → String
All layers updated consistently:
-
DTOs:
ChildExerciseAssistantDTO,InteractionExerciceDTO,ResponseHistoryDTO,ProcessingTaskDTO,RagQueryRequest -
Service interfaces & impls:
RAGService,OCRService,SpeechService,ChildExerciseAssistantService,InteractionExerciceService,MultimediaProcessingServiceand all their implementations -
Controllers:
ChildExerciseAssistantController,InteractionExerciceController
Assistant model enrichment
-
ChildExerciseAssistantDTOgains:uuid,name,description,subjectId,chapterId,exerciseId,subjectName,chapterName,exerciseName -
ChildExerciseAssistantMapperrewritten to resolve human-readable names fromsubject-managementservice viaRestTemplateat mapping time - Added
SubjectServiceClientinterface +SubjectNameDTO,ChapterNameDTO,ExerciseNameDTOclient DTOs
Repository
-
ChildExerciseAssistantRepository:findByUserIdmigrated toString, in-memory search replaced with a proper JPQL@QueryonuserId / educationLevel / status -
ResponseHistoryRepository: simplified to a singlefindByUserIdOrderByDateResponseDesc(String)method
Interaction service
-
save()andevaluateWithMedia()annotated with@Transactional -
evaluate()simplified (status management only, no direct RAG call)