package com.eactive.eai.rms.onl.loader.intf.mapper;

import com.eactive.eai.data.entity.onl.bizkey.BizKey;
import com.eactive.eai.data.mapper.BaseMapperConfig;
import com.eactive.eai.data.mapper.GenericMapper;
import com.eactive.eai.rms.onl.loader.intf.deploy.BizKeyDeploy;
import org.mapstruct.InheritInverseConfiguration;
import org.mapstruct.Mapper;
import org.mapstruct.Mapping;

import java.util.List;

@Mapper(config = BaseMapperConfig.class)
public interface BizKeyDeployMapper extends GenericMapper<BizKeyDeploy, BizKey> {

    @Mapping(source = "id.eaisvcname", target = "eaisvcname")
    @Mapping(source = "id.etractdstcd", target = "etractdstcd")
    @Mapping(source = "id.fldprcssno", target = "fldprcssno")
    BizKeyDeploy toVo(BizKey bizKey);

    @InheritInverseConfiguration
    BizKey toEntity(BizKeyDeploy bizKeyDeploy);

    List<BizKey> map(List<BizKeyDeploy> vos);

}
