package cn.com.poc.equity.convert;	

import cn.com.poc.equity.model.BizMemberEquityTransactionHistoryModel;
import cn.com.poc.equity.entity.BizMemberEquityTransactionHistoryEntity;
import cn.com.poc.equity.dto.BizMemberEquityTransactionHistoryDto;


public class BizMemberEquityTransactionHistoryConvert {

    public static BizMemberEquityTransactionHistoryEntity modelToEntity(BizMemberEquityTransactionHistoryModel model){
        BizMemberEquityTransactionHistoryEntity entity = new BizMemberEquityTransactionHistoryEntity();
        entity.setId(model.getId());
        entity.setTransactionSn(model.getTransactionSn());
        entity.setMemberId(model.getMemberId());
        entity.setOriginalEquityLevel(model.getOriginalEquityLevel());
        entity.setModifyEquityLevel(model.getModifyEquityLevel());
        entity.setModifyEvent(model.getModifyEvent());
        entity.setModifyEventInfo(model.getModifyEventInfo());
        entity.setTargetEquityId(model.getTargetEquityId());
        entity.setIsDeleted(model.getIsDeleted());
        entity.setCreator(model.getCreator());
        entity.setCreatedTime(model.getCreatedTime());
        entity.setModifier(model.getModifier());
        entity.setModifiedTime(model.getModifiedTime());
        entity.setSysVersion(model.getSysVersion());
        return entity;
    }

    public static BizMemberEquityTransactionHistoryModel entityToModel(BizMemberEquityTransactionHistoryEntity entity){
        BizMemberEquityTransactionHistoryModel model = new BizMemberEquityTransactionHistoryModel();
        model.setId(entity.getId());
        model.setTransactionSn(entity.getTransactionSn());
        model.setMemberId(entity.getMemberId());
        model.setOriginalEquityLevel(entity.getOriginalEquityLevel());
        model.setModifyEquityLevel(entity.getModifyEquityLevel());
        model.setModifyEvent(entity.getModifyEvent());
        model.setModifyEventInfo(entity.getModifyEventInfo());
        model.setTargetEquityId(entity.getTargetEquityId());
        model.setIsDeleted(entity.getIsDeleted());
        model.setCreator(entity.getCreator());
        model.setCreatedTime(entity.getCreatedTime());
        model.setModifier(entity.getModifier());
        model.setModifiedTime(entity.getModifiedTime());
        model.setSysVersion(entity.getSysVersion());
        return model;
    }
    
    public static BizMemberEquityTransactionHistoryDto entityToDto(BizMemberEquityTransactionHistoryEntity entity){
        BizMemberEquityTransactionHistoryDto dto = new BizMemberEquityTransactionHistoryDto();
        dto.setId(entity.getId());
        dto.setTransactionSn(entity.getTransactionSn());
        dto.setMemberId(entity.getMemberId());
        dto.setOriginalEquityLevel(entity.getOriginalEquityLevel());
        dto.setModifyEquityLevel(entity.getModifyEquityLevel());
        dto.setModifyEvent(entity.getModifyEvent());
        dto.setModifyEventInfo(entity.getModifyEventInfo());
        dto.setTargetEquityId(entity.getTargetEquityId());
        dto.setIsDeleted(entity.getIsDeleted());
        dto.setCreator(entity.getCreator());
        dto.setCreatedTime(entity.getCreatedTime());
        dto.setModifier(entity.getModifier());
        dto.setModifiedTime(entity.getModifiedTime());
        dto.setSysVersion(entity.getSysVersion());
        return dto;
    }

    public static BizMemberEquityTransactionHistoryEntity dtoToEntity(BizMemberEquityTransactionHistoryDto dto){
        BizMemberEquityTransactionHistoryEntity entity = new BizMemberEquityTransactionHistoryEntity();
        entity.setId(dto.getId());
        entity.setTransactionSn(dto.getTransactionSn());
        entity.setMemberId(dto.getMemberId());
        entity.setOriginalEquityLevel(dto.getOriginalEquityLevel());
        entity.setModifyEquityLevel(dto.getModifyEquityLevel());
        entity.setModifyEvent(dto.getModifyEvent());
        entity.setModifyEventInfo(dto.getModifyEventInfo());
        entity.setTargetEquityId(dto.getTargetEquityId());
        entity.setIsDeleted(dto.getIsDeleted());
        entity.setCreator(dto.getCreator());
        entity.setCreatedTime(dto.getCreatedTime());
        entity.setModifier(dto.getModifier());
        entity.setModifiedTime(dto.getModifiedTime());
        entity.setSysVersion(dto.getSysVersion());
        return entity;
    }
}