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

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

import com.eactive.eai.common.pushinfo.PushInfoVO;
import com.eactive.eai.data.entity.onl.pushinfo.PushInfo;
import com.eactive.eai.data.mapper.GenericMapper;

@Mapper(componentModel = "spring", unmappedTargetPolicy = ReportingPolicy.IGNORE)
public interface PushInfoMapper extends GenericMapper<PushInfoVO, PushInfo> {
	@Mapping(source = "guid", target = "guid")
	@Mapping(source = "pushDatetime", target = "pushDateTime")
	@Mapping(source = "pushDvsnCd", target = "pushDvsnCode")
	@Mapping(source = "pushTarget", target = "pushTarget")
	@Mapping(source = "pushTargetCount", target = "pushTargetCount")
	@Override
	PushInfoVO toVo(PushInfo entity);

	@InheritInverseConfiguration
	PushInfo toEntity(PushInfoVO vo);
}
