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

import com.eactive.eai.data.entity.onl.submessage.SubMessageInfo;
import com.eactive.eai.data.mapper.BaseMapperConfig;
import com.eactive.eai.data.mapper.GenericMapper;
import com.eactive.eai.rms.onl.loader.intf.deploy.SubMessageInfoDeploy;
import org.mapstruct.InheritInverseConfiguration;
import org.mapstruct.Mapper;
import org.mapstruct.Mapping;

import java.util.List;

@Mapper(config = BaseMapperConfig.class, uses = { SubMessageItemDeployMapper.class })
public interface SubMessageInfoDeployMapper extends GenericMapper<SubMessageInfoDeploy, SubMessageInfo> {

    @Mapping(source = "subMessageItems", target = "subMessageItemDeploys")
    SubMessageInfoDeploy toVo(SubMessageInfo subMessageInfo);

    @InheritInverseConfiguration
    SubMessageInfo toEntity(SubMessageInfoDeploy subMessageInfoDeploy);

    List<SubMessageInfo> map(List<SubMessageInfoDeploy> vos);

}
