package com.eactive.eai.common.duplication.mapper;

import org.mapstruct.InheritInverseConfiguration;
import org.mapstruct.Mapper;
import org.mapstruct.Mapping;

import com.eactive.eai.common.duplication.DuplicationGuidDataVo;
import com.eactive.eai.data.entity.onl.duplication.DuplicationGuidData;
import com.eactive.eai.data.mapper.BaseMapperConfig;
import com.eactive.eai.data.mapper.GenericMapper;

@Mapper(config = BaseMapperConfig.class, uses = DuplicationGuidLogMapper.class)
public interface DuplicationGuidDataMapper extends GenericMapper<DuplicationGuidDataVo, DuplicationGuidData> {

    @Override
    @Mapping(source = "id.recv_datetime", target = "recvDatetime")
    @Mapping(source = "id.uuid", target = "uuid")
    @Mapping(source = "channel_code", target = "channelCode")
    @Mapping(source = "instance_name", target = "instanceName")    
    @Mapping(source = "biz_data"     , target = "bizData")    
    DuplicationGuidDataVo toVo(DuplicationGuidData entity);

    @Override
    @InheritInverseConfiguration
    DuplicationGuidData toEntity(DuplicationGuidDataVo vo);
    
}