dto

MapStruct for object mapping

MapStruct generates type-safe bean mappers at compile-time, eliminating manual mapping code. I define mapper interfaces with @Mapper annotation—MapStruct generates implementations. @Mapping annotations handle different property names or custom convers

Record types for immutable data

Java Records (JDK 14+) provide concise syntax for immutable data carriers. Records automatically generate constructor, getters, equals, hashCode, and toString. I use records for DTOs, value objects, and API responses. Records are final and all fields