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

import com.eactive.eai.data.entity.onl.stdmessage.StandardMessageInfo;
import com.eactive.eai.data.mapper.BaseMapperConfig;
import com.eactive.eai.data.mapper.GenericMapper;
import com.eactive.eai.rms.onl.loader.intf.deploy.StandardMessageInfoDeploy;
import org.mapstruct.InheritInverseConfiguration;
import org.mapstruct.Mapper;
import org.mapstruct.Mapping;

import java.util.List;

@Mapper(config = BaseMapperConfig.class, uses = {StandardMessageItemDeployMapper.class})
public interface StandardMessageInfoDeployMapper extends GenericMapper<StandardMessageInfoDeploy, StandardMessageInfo> {

    @Mapping(source = "standardMessageItems", target = "standardMessageItemDeploys")
    StandardMessageInfoDeploy toVo(StandardMessageInfo standardMessageInfo);

    @InheritInverseConfiguration
    StandardMessageInfo toEntity(StandardMessageInfoDeploy standardMessageInfoDeploy);

    List<StandardMessageInfo> map(List<StandardMessageInfoDeploy> vos);

}
