package com.seer.teach.mp.convert;

import com.seer.teach.mp.entity.MpMessageEntity;
import me.chanjar.weixin.mp.bean.message.WxMpXmlMessage;
import org.mapstruct.Mapper;
import org.mapstruct.Mapping;
import org.mapstruct.factory.Mappers;

@Mapper
public interface MpMessageConvert {

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

    @Mapping(source = "msgType", target = "type")
    @Mapping(source = "createTime", target = "createTime",ignore= true)
    MpMessageEntity convertOne(WxMpXmlMessage wxMpXmlMessage);
}
