Skip to content

Backend/temperatureunits#29

Merged
SindreJB merged 11 commits intomainfrom
backend/temperatureunits
Apr 7, 2026
Merged

Backend/temperatureunits#29
SindreJB merged 11 commits intomainfrom
backend/temperatureunits

Conversation

@SindreJB
Copy link
Copy Markdown
Collaborator

@SindreJB SindreJB commented Apr 7, 2026

No description provided.

@github-actions
Copy link
Copy Markdown

github-actions bot commented Apr 7, 2026

Backend Test Results

49 tests   49 ✅  3s ⏱️
15 suites   0 💤
15 files     0 ❌

Results for commit 7955926.

♻️ This comment has been updated with latest results.

Copy link
Copy Markdown
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

Introduces backend support for recording and querying temperature readings, including persistence, API endpoints, DTO mapping, and associated unit/service/controller tests.

Changes:

  • Adds temperature_readings persistence (Flyway migration, JPA entity, Spring Data repository queries).
  • Implements service + REST controller for creating and listing readings with filtering and role guards.
  • Adds tests for service behavior, controller security annotations, and request validation.

Reviewed changes

Copilot reviewed 12 out of 12 changed files in this pull request and generated 3 comments.

Show a summary per file
File Description
backend/src/main/resources/db/migration/V3__create_temperature_readings_table.sql Creates the temperature_readings table and indexes.
backend/src/main/java/backend/fullstack/temperature/domain/TemperatureReading.java Adds the TemperatureReading JPA entity, validation, and deviation evaluation.
backend/src/main/java/backend/fullstack/temperature/infrastructure/TemperatureReadingRepository.java Adds repository methods for filtered paging and unit-scoped listing.
backend/src/main/java/backend/fullstack/temperature/application/TemperatureReadingService.java Implements listing/get/create logic with scoped unit/user resolution and deviation evaluation.
backend/src/main/java/backend/fullstack/temperature/api/TemperatureReadingController.java Adds endpoints for unit readings, global readings, and create reading with role guards.
backend/src/main/java/backend/fullstack/temperature/api/dto/TemperatureReadingRequest.java Adds request DTO with bean validation constraints.
backend/src/main/java/backend/fullstack/temperature/api/dto/TemperatureReadingResponse.java Adds response DTO (record) for reading details.
backend/src/main/java/backend/fullstack/temperature/api/dto/RecordedByResponse.java Adds nested DTO for “recorded by” user display.
backend/src/main/java/backend/fullstack/temperature/api/dto/TemperatureReadingMapper.java Adds MapStruct mappings between entity and DTOs.
backend/src/test/java/backend/fullstack/temperature/application/TemperatureReadingServiceTest.java Adds unit tests for service create/list/get behavior.
backend/src/test/java/backend/fullstack/temperature/api/TemperatureReadingControllerSecurityAnnotationsTest.java Adds reflection-based tests ensuring expected @PreAuthorize guards.
backend/src/test/java/backend/fullstack/temperature/api/dto/TemperatureReadingRequestValidationTest.java Adds validation tests for request DTO constraints.

💡 Add Copilot custom instructions for smarter, more guided reviews. Learn how to get started.

@SindreJB SindreJB merged commit ab0f0b5 into main Apr 7, 2026
2 of 3 checks passed
@SindreJB SindreJB deleted the backend/temperatureunits branch April 10, 2026 11:37
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