Skip to content

Add mapper layer for DTO to model conversion #19

@NikosPoly

Description

@NikosPoly

Currently DTO to model conversion is done manually inside the service layer,
mixing conversion logic with business logic.

A dedicated mapper layer would improve separation of concerns and make the
code cleaner and easier to maintain.

Tasks

  • Create mapper classes for each resource:
    • BookMapper
    • CustomerMapper
    • EmployeeMapper
    • LoanMapper
    • SectionMapper
  • Move all DTO to model and model to DTO conversion logic out of services into mappers
  • Consider using MapStruct library to auto-generate mapper implementations

Metadata

Metadata

Assignees

No one assigned

    Labels

    code qualityMake the code cleaner without changing behavior

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions