feat: ESPI 4.0 Schema Compliance - Phase 3: IntervalReading #68
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
This PR implements Phase 3 of ESPI 4.0 schema compliance, updating IntervalReading to match the ESPI 4.0 XSD specification (espi.xsd:1016-1061).
Key Changes
IntervalReadingEntity:
Object, notIdentifiedObjectcost→readingQualities→timePeriod→value→consumptionTier→tou→cpp@GeneratedValueto useIDENTITYstrategyIntervalReadingDto:
currencyfield (not in ESPI 4.0 XSD)@XmlTypepropOrder for correct XML marshallingIntervalReadingMapper:
id,intervalBlock)Flyway Migrations:
meter_readings,interval_blocks, andinterval_readingstables from V3 to V2 vendor-specific filesBIGINT AUTO_INCREMENTBIGSERIALreading_qualities.interval_reading_idfromCHAR(36)toBIGINTto match new FK typeTest Updates:
DtoExportServiceImplTestto use new constructor signatureMigration Strategy
Test Plan
✅ All 550 unit and integration tests passing
Technical Details
XSD Reference: espi.xsd:1016-1061
Files Changed:
IntervalReadingEntity.java- Changed ID type, reordered fieldsIntervalReadingDto.java- Removed currency, reordered fieldsIntervalReadingMapper.java- Simplified mappingsV3__Create_additiional_Base_Tables.sql- Relocated tables, fixed FK typeV2__MySQL_Specific_Tables.sql- Added meter_readings, interval_blocks, interval_readingsV2__PostgreSQL_Specific_Tables.sql- Added meter_readings, interval_blocks, interval_readingsV2__H2_Specific_Tables.sql- Added meter_readings, interval_blocks, interval_readingsDtoExportServiceImplTest.java- Fixed test constructor callsRelated
🤖 Generated with Claude Code