Spaces:
Build error
Build error
da-autocompliance-dev
/
src
/main
/java
/com
/dalab
/autocompliance
/model
/mapper
/ControlEvaluationJobMapper.java
| package com.dalab.autocompliance.model.mapper; | |
| import java.time.LocalDateTime; | |
| import java.util.UUID; | |
| import org.mapstruct.Mapper; | |
| import org.mapstruct.Mapping; | |
| import org.mapstruct.factory.Mappers; | |
| import com.dalab.autocompliance.dto.ControlEvaluationRequestDTO; | |
| import com.dalab.autocompliance.dto.ControlEvaluationResponseDTO; | |
| import com.dalab.autocompliance.model.entity.ControlEvaluationJobEntity; | |
| /** | |
| * Mapper interface for converting between ControlEvaluationJobEntity and DTOs. | |
| */ | |
| public interface ControlEvaluationJobMapper { | |
| ControlEvaluationJobMapper INSTANCE = Mappers.getMapper(ControlEvaluationJobMapper.class); | |
| // To DTO (ControlEvaluationResponseDTO is simpler, doesn't carry all entity details by default) | |
| ControlEvaluationResponseDTO toResponseDto(ControlEvaluationJobEntity entity); | |
| // From Request DTO to Entity | |
| ControlEvaluationJobEntity fromRequestDto(ControlEvaluationRequestDTO requestDto, String controlId); | |
| // If you need a more detailed DTO for job status (like ReportJobStatusDTO), you'd create another one. | |
| // For now, the response DTO is used for the immediate POST response. | |
| } |