package cn.com.poc.user.convert;

import cn.com.poc.user.entity.Member3rdPartyRelationEntity;
import cn.com.poc.user.model.BizMember3rdPartyRelationModel;

/**
 * @Author：Roger Wu
 * @name：MemberInfoConvert
 * @Date：2024-07-25 11:15
 */
public class Member3rdPartyRelationConvert {
    public static BizMember3rdPartyRelationModel convertEntity2Model(Member3rdPartyRelationEntity member3rdPartyRelationEntity) {
        if (member3rdPartyRelationEntity == null) {
            return null;
        }
        BizMember3rdPartyRelationModel bizMember3rdPartyRelationModel = new BizMember3rdPartyRelationModel();
        bizMember3rdPartyRelationModel.setId(member3rdPartyRelationEntity.getId());
        bizMember3rdPartyRelationModel.setMemberId(member3rdPartyRelationEntity.getMemberId());
        bizMember3rdPartyRelationModel.setRelationKey(member3rdPartyRelationEntity.getRelationKey());
        bizMember3rdPartyRelationModel.setRelationPlatform(member3rdPartyRelationEntity.getRelationPlatform());
        bizMember3rdPartyRelationModel.setModelState(member3rdPartyRelationEntity.getModelState());
        return bizMember3rdPartyRelationModel;
    }


    public static Member3rdPartyRelationEntity convertModel2Entity(BizMember3rdPartyRelationModel bizMember3rdPartyRelationModel) {
        if (bizMember3rdPartyRelationModel == null) {
            return null;
        }
        Member3rdPartyRelationEntity member3rdPartyRelationEntity = new Member3rdPartyRelationEntity();
        member3rdPartyRelationEntity.setId(bizMember3rdPartyRelationModel.getId());
        member3rdPartyRelationEntity.setMemberId(bizMember3rdPartyRelationModel.getMemberId());
        member3rdPartyRelationEntity.setRelationKey(bizMember3rdPartyRelationModel.getRelationKey());
        member3rdPartyRelationEntity.setRelationPlatform(bizMember3rdPartyRelationModel.getRelationPlatform());
        member3rdPartyRelationEntity.setModelState(bizMember3rdPartyRelationModel.getModelState());
        return member3rdPartyRelationEntity;
    }

}
