Class AssignmentMapper

java.lang.Object
com.nicholasalfonso.lato.mapper.AssignmentMapper

@Component public class AssignmentMapper extends Object
Converts Assignment entities into assignment response DTOs.
  • Constructor Details

    • AssignmentMapper

      public AssignmentMapper()
  • Method Details

    • toResponse

      public AssignmentResponse toResponse(Assignment assignment)
      Maps an assignment entity to a summary response including resolved display values.
      Parameters:
      assignment - the assignment entity to map
      Returns:
      summary assignment response for list views
    • toDetail

      public AssignmentDetailResponse toDetail(Assignment assignment, Note note)
      Maps an assignment entity and optional note to a detailed response.
      Parameters:
      assignment - the assignment entity to map
      note - optional note associated with the assignment
      Returns:
      detailed assignment response for single-assignment views