package com.eactive.eai.rms.common.cm.mapping;

import com.eactive.eai.data.mapper.BaseMapperConfig;
import com.eactive.eai.data.mapper.GenericMapper;
import com.eactive.eai.rms.common.cm.ui.CmLogDetailUI;
import com.eactive.eai.rms.data.entity.man.cm.CmLogDetailEntity;

import org.mapstruct.*;

@Mapper(config = BaseMapperConfig.class)
public abstract class CmLogDetailUIMapper implements GenericMapper<CmLogDetailUI, CmLogDetailEntity> {

   @Override
   @Mapping(source = "id.guid", target = "guid")
   @Mapping(source = "id.resource_path", target = "resource_path")
   @Mapping(source = "id.resource_name", target = "resource_name")
   public abstract CmLogDetailUI toVo(CmLogDetailEntity entity);

   @InheritInverseConfiguration(name = "toVo")
   @Override
   @Mapping(source = "guid", target = "id.guid")
   @Mapping(source = "resource_path", target = "id.resource_path")
   @Mapping(source = "resource_name", target = "id.resource_name")
   public abstract CmLogDetailEntity toEntity(CmLogDetailUI vo);
}