package com.oguerreiro.resilient.service.mapper;

import com.oguerreiro.resilient.domain.InputDataUpload;
import com.oguerreiro.resilient.domain.InputDataUploadLog;
import com.oguerreiro.resilient.service.dto.InputDataUploadDTO;
import com.oguerreiro.resilient.service.dto.InputDataUploadLogDTO;
import org.mapstruct.*;

/**
 * Mapper for the entity {@link InputDataUploadLog} and its DTO {@link InputDataUploadLogDTO}.
 */
@Mapper(componentModel = "spring")
public interface InputDataUploadLogMapper extends ResilientEntityMapper<InputDataUploadLogDTO, InputDataUploadLog> {
    @Mapping(target = "inputDataUpload", source = "inputDataUpload", qualifiedByName = "inputDataUploadTitle")
    InputDataUploadLogDTO toDto(InputDataUploadLog s);

    @Named("inputDataUploadTitle")
    @BeanMapping(ignoreByDefault = true)
    @Mapping(target = "id", source = "id")
    @Mapping(target = "title", source = "title")
    InputDataUploadDTO toDtoInputDataUploadTitle(InputDataUpload inputDataUpload);
}
