package org.jeecg.modules.largeScreen.convert;

import org.jeecg.modules.largeScreen.vo.ItdmAlarmNowWSVO;
import org.jeecg.modules.largeScreen.vo.ItdmVoiceWSVO;
import org.mapstruct.Mapper;
import org.mapstruct.Mapping;
import org.mapstruct.ReportingPolicy;
import org.mapstruct.factory.Mappers;
import org.springframework.util.CollectionUtils;

import java.util.stream.Collectors;

@Mapper(unmappedTargetPolicy = ReportingPolicy.IGNORE,imports ={ CollectionUtils.class, Collectors.class})
public interface ItdmVoiceConvert {

    ItdmVoiceConvert INSTANCE = Mappers.getMapper(ItdmVoiceConvert.class);

    @Mapping(target = "voice",source = "alarmNowWSVO.alarmMessage")
    ItdmVoiceWSVO convert(ItdmAlarmNowWSVO alarmNowWSVO);

}
