package com.qsoft.rs.sincoar.dominio.mapper;

import com.qsoft.rs.sincoar.model.MdRegistry;
import com.qsoft.rs.sincoar.dto.MdRegistryDTO;
import org.mapstruct.Mapper;
import org.mapstruct.Mapping;
import org.mapstruct.factory.Mappers;

@Mapper
public interface MdRegistryMapper {

    MdRegistryMapper INSTANCE = Mappers.getMapper(MdRegistryMapper.class);
    @Mapping(source = "mdRegistryPK", target = "mdRegistryPK.objectName") /** objectName*/
    @Mapping(source = "objectType", target = "mdRegistryPK.objectType")
    MdRegistry getEntidad(MdRegistryDTO mdRegistry);

    @Mapping(target = "mdRegistryPK", source = "mdRegistryPK.objectName")
    @Mapping(target = "objectType", source = "mdRegistryPK.objectType")
    MdRegistryDTO getDto(MdRegistry mdRegistry);

}