package com.eactive.eai.rms.onl.manage.serviceinfo.addqueue;

import com.eactive.eai.data.mapper.BaseMapperConfig;
import com.eactive.eai.data.mapper.GenericMapper;
import com.eactive.eai.rms.data.entity.onl.chnlInfoIntegration.ChnlInfoIntegrationEntity;
import org.mapstruct.InheritInverseConfiguration;
import org.mapstruct.Mapper;
import org.mapstruct.Mapping;

@Mapper(config = BaseMapperConfig.class)
public abstract class AddQueueUIMapper implements GenericMapper<AddQueueUI, ChnlInfoIntegrationEntity> {

   @Mapping(source = "chnlInfoIntegrationId.datadstcd", target = "dataDstcd")
   @Mapping(source = "chnlInfoIntegrationId.servicetype", target = "serviceType")
   @Mapping(source = "chnlInfoIntegrationId.codename", target = "codeName")
   @Mapping(source = "nodename", target = "nodeName")
   @Mapping(source = "queuename", target = "queueName")

   @Override
   public abstract AddQueueUI toVo(ChnlInfoIntegrationEntity entity);

   @InheritInverseConfiguration(name = "toVo")
   @Override
   public abstract ChnlInfoIntegrationEntity toEntity(AddQueueUI vo);

//   @InheritConfiguration
//   @Mapping(target = "cmLogDetail2Entities", ignore = true)
//   public abstract AddQueueUI toVoWithoutChildren(ChnlInfoIntegrationEntity entity);

//   @InheritConfiguration
//   @BeanMapping(nullValuePropertyMappingStrategy = NullValuePropertyMappingStrategy.IGNORE)
//   public abstract void updateEntity(CmLogUI cmLogUI, @MappingTarget CmLog2Entity cmLog2Entity);

}