package cn.com.poc.equity.convert;

import cn.com.poc.equity.model.BizMemberPointTransactionHistoryModel;
import cn.com.poc.equity.entity.BizMemberPointTransactionHistoryEntity;
import cn.com.poc.equity.dto.BizMemberPointTransactionHistoryDto;


public class BizMemberPointTransactionHistoryConvert {

    public static BizMemberPointTransactionHistoryEntity modelToEntity(BizMemberPointTransactionHistoryModel model) {
        BizMemberPointTransactionHistoryEntity entity = new BizMemberPointTransactionHistoryEntity();
        entity.setId(model.getId());
        entity.setTransactionSn(model.getTransactionSn());
        entity.setMemberId(model.getMemberId());
        entity.setModifyEvent(model.getModifyEvent());
        entity.setModifyEventInfo(model.getModifyEventInfo());
        entity.setModifyTargetId(model.getModifyTargetId());
        entity.setPointChangeNum(model.getPointChangeNum());
        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 BizMemberPointTransactionHistoryModel entityToModel(BizMemberPointTransactionHistoryEntity entity) {
        BizMemberPointTransactionHistoryModel model = new BizMemberPointTransactionHistoryModel();
        model.setId(entity.getId());
        model.setTransactionSn(entity.getTransactionSn());
        model.setMemberId(entity.getMemberId());
        model.setModifyEvent(entity.getModifyEvent());
        model.setModifyEventInfo(entity.getModifyEventInfo());
        model.setModifyTargetId(entity.getModifyTargetId());
        model.setPointChangeNum(entity.getPointChangeNum());
        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 BizMemberPointTransactionHistoryDto entityToDto(BizMemberPointTransactionHistoryEntity entity) {
        BizMemberPointTransactionHistoryDto dto = new BizMemberPointTransactionHistoryDto();
        dto.setId(entity.getId());
        dto.setTransactionSn(entity.getTransactionSn());
        dto.setMemberId(entity.getMemberId());
        dto.setModifyEvent(entity.getModifyEvent());
        dto.setModifyEventInfo(entity.getModifyEventInfo());
        dto.setModifyTargetId(entity.getModifyTargetId());
        dto.setPointChangeNum(entity.getPointChangeNum());
        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 BizMemberPointTransactionHistoryEntity dtoToEntity(BizMemberPointTransactionHistoryDto dto) {
        BizMemberPointTransactionHistoryEntity entity = new BizMemberPointTransactionHistoryEntity();
        entity.setId(dto.getId());
        entity.setTransactionSn(dto.getTransactionSn());
        entity.setMemberId(dto.getMemberId());
        entity.setModifyEvent(dto.getModifyEvent());
        entity.setModifyEventInfo(dto.getModifyEventInfo());
        entity.setModifyTargetId(dto.getModifyTargetId());
        entity.setPointChangeNum(dto.getPointChangeNum());
        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;
    }
}