package cn.com.poc.data_analyze.convert;	

import cn.com.poc.data_analyze.model.BizDataAnalyzePointRecordModel;
import cn.com.poc.data_analyze.entity.BizDataAnalyzePointRecordEntity;
import cn.com.poc.data_analyze.dto.BizDataAnalyzePointRecordDto;


public class BizDataAnalyzePointRecordConvert {

    public static BizDataAnalyzePointRecordEntity modelToEntity(BizDataAnalyzePointRecordModel model){
        BizDataAnalyzePointRecordEntity entity = new BizDataAnalyzePointRecordEntity();
        entity.setId(model.getId());
        entity.setRelationId(model.getRelationId());
        entity.setType(model.getType());
        entity.setMemberId(model.getMemberId());
        entity.setPointNum(model.getPointNum());
        entity.setChannel(model.getChannel());
        entity.setDatetime(model.getDatetime());
        return entity;
    }

    public static BizDataAnalyzePointRecordModel entityToModel(BizDataAnalyzePointRecordEntity entity){
        BizDataAnalyzePointRecordModel model = new BizDataAnalyzePointRecordModel();
        model.setId(entity.getId());
        model.setRelationId(entity.getRelationId());
        model.setType(entity.getType());
        model.setMemberId(entity.getMemberId());
        model.setPointNum(entity.getPointNum());
        model.setChannel(entity.getChannel());
        model.setDatetime(entity.getDatetime());
        return model;
    }
    
    public static BizDataAnalyzePointRecordDto entityToDto(BizDataAnalyzePointRecordEntity entity){
        BizDataAnalyzePointRecordDto dto = new BizDataAnalyzePointRecordDto();
        dto.setId(entity.getId());
        dto.setRelationId(entity.getRelationId());
        dto.setType(entity.getType());
        dto.setMemberId(entity.getMemberId());
        dto.setPointNum(entity.getPointNum());
        dto.setChannel(entity.getChannel());
        dto.setDatetime(entity.getDatetime());
        return dto;
    }

    public static BizDataAnalyzePointRecordEntity dtoToEntity(BizDataAnalyzePointRecordDto dto){
        BizDataAnalyzePointRecordEntity entity = new BizDataAnalyzePointRecordEntity();
        entity.setId(dto.getId());
        entity.setRelationId(dto.getRelationId());
        entity.setType(dto.getType());
        entity.setMemberId(dto.getMemberId());
        entity.setPointNum(dto.getPointNum());
        entity.setChannel(dto.getChannel());
        entity.setDatetime(dto.getDatetime());
        return entity;
    }
}