package com.mortals.xhx.busiz;

import com.mortals.xhx.busiz.uploadfile.SubmitDatumReq;
import com.mortals.xhx.busiz.wechat.WechatBaseReq;
import com.mortals.xhx.module.member.model.MemberEntity;
import com.mortals.xhx.module.yth.model.YthOnethingEntity;
import org.mapstruct.Mapper;
import org.mapstruct.Mapping;
import org.mapstruct.factory.Mappers;

/**
 * java bean 映射类
 *
 * @author: zxfei
 * @date: 2021/9/6 14:17
 * @description:
 **/
@Mapper
public interface BaseMapper {

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

//    @Mapping(source = "matterIds", target = "matter_ids")
//    @Mapping(source = "createTime", target = "create_time",dateFormat = "yyyy-MM-dd HH:mm:ss")
//    BaseInfoDetail basicsEntity2Detail(BasicsEntity entity);


    @Mapping(source = "openid", target = "openId")
    @Mapping(source = "idcard", target = "idcardIDCardNo")
    @Mapping(source = "tel", target = "phone")
    @Mapping(source = "name", target = "idcardName")
    @Mapping(source = "file", target = "idcardDataPhotoFileName")
    @Mapping(source = "z_img", target = "ZImg")
    @Mapping(source = "b_img", target = "BImg")
    MemberEntity weChat2Entity(WechatBaseReq req);

    YthOnethingEntity uploadDatumReq2OneThingEntity(SubmitDatumReq req);

}
