package cn.com.poc.data_analyze.convert;

import cn.com.poc.data_analyze.model.BizDataAnalyzeDialogueRecordModel;
import cn.com.poc.data_analyze.entity.BizDataAnalyzeDialogueRecordEntity;
import cn.com.poc.data_analyze.dto.BizDataAnalyzeDialogueRecordDto;


public class BizDataAnalyzeDialogueRecordConvert {

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

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

    public static BizDataAnalyzeDialogueRecordDto entityToDto(BizDataAnalyzeDialogueRecordEntity entity) {
        BizDataAnalyzeDialogueRecordDto dto = new BizDataAnalyzeDialogueRecordDto();
        dto.setId(entity.getId());
        dto.setRelationId(entity.getRelationId());
        dto.setType(entity.getType());
        dto.setMemberId(entity.getMemberId());
        dto.setChannel(entity.getChannel());
        dto.setDatetime(entity.getDatetime());
        return dto;
    }

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