Skip to content

Refactor/entities and controllers#34

Merged
luislh-dev merged 13 commits intomasterfrom
refactor/entities-and-controllers
Jul 12, 2025
Merged

Refactor/entities and controllers#34
luislh-dev merged 13 commits intomasterfrom
refactor/entities-and-controllers

Conversation

@luislh-dev
Copy link
Owner

No description provided.

Copilot AI review requested due to automatic review settings July 12, 2025 19:08

This comment was marked as outdated.

luislh-dev and others added 2 commits July 12, 2025 14:14
Copy link
Owner Author

@luislh-dev luislh-dev left a comment

Choose a reason for hiding this comment

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

🛠️

@luislh-dev luislh-dev requested a review from Copilot July 12, 2025 19:22
Copy link
Contributor

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 enum/constant package names, introduces a TimeUtils helper for timezone-aware timestamps, and updates the file upload API to use a DTO-based create/save flow.

  • Moved enums from common.constants to common.enums and updated all imports.
  • Added TimeUtils to standardize timezone-based LocalDateTime and Instant retrieval and replaced direct ZonedDateTime usage.
  • Refactored file upload endpoints and service to accept FilesCreateDto and return FilesResponseDto.

Reviewed Changes

Copilot reviewed 92 out of 92 changed files in this pull request and generated no comments.

Show a summary per file
File Description
src/main/java/com/historialplus/historialplus/common/enums/... Updated package for all enums and fixed imports.
src/main/java/com/historialplus/historialplus/util/TimeUtils.java Added TimeUtils for centralized timezone logic.
src/main/java/com/historialplus/historialplus/internal/file/service/FileServiceImpl.java Changed save to accept FilesCreateDto and map entity → DTO.
src/main/java/com/historialplus/historialplus/internal/file/controller/FileController.java Updated controller to delegate record-detail lookup to service.
src/main/java/com/historialplus/historialplus/auth/filter/JwtAuthenticationFilter.java Replaced manual ZonedDateTime with TimeUtils.getCurrentTime().
src/main/java/com/historialplus/historialplus/audit/context/RequestContextExtractorImpl.java Switched to TimeUtils.getCurrentInstant() for timestamp.
Comments suppressed due to low confidence (1)

src/main/java/com/historialplus/historialplus/util/TimeUtils.java:13

  • ZonedDateTime is not imported in this class, causing a compilation error. Please add import java.time.ZonedDateTime; at the top.
 		return ZonedDateTime.now(ZoneId.of(TimeZoneConstants.LIMA)).toLocalDateTime();

@sonarqubecloud
Copy link

@luislh-dev luislh-dev merged commit e434b47 into master Jul 12, 2025
5 checks passed
@luislh-dev luislh-dev deleted the refactor/entities-and-controllers branch July 12, 2025 19:34
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants