package cn.com.poc.writing.convert;	

import cn.com.poc.writing.model.BizExaminationModel;
import cn.com.poc.writing.entity.BizExaminationEntity;
import cn.com.poc.writing.dto.BizExaminationDto;


public class BizExaminationConvert {

    public static BizExaminationEntity modelToEntity(BizExaminationModel model){
        BizExaminationEntity entity = new BizExaminationEntity();
        entity.setId(model.getId());
        entity.setExaminationId(model.getExaminationId());
        entity.setMemberId(model.getMemberId());
        entity.setTitle(model.getTitle());
        entity.setQuestionType(model.getQuestionType());
        entity.setTotalScore(model.getTotalScore());
        entity.setN(model.getN());
        entity.setLevel(model.getLevel());
        entity.setLanguage(model.getLanguage());
        entity.setPositions(model.getPositions());
        entity.setExaminationDetail(model.getExaminationDetail());
        entity.setFileUrl(model.getFileUrl());
        entity.setContent(model.getContent());
        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 BizExaminationModel entityToModel(BizExaminationEntity entity){
        BizExaminationModel model = new BizExaminationModel();
        model.setId(entity.getId());
        model.setExaminationId(entity.getExaminationId());
        model.setMemberId(entity.getMemberId());
        model.setTitle(entity.getTitle());
        model.setQuestionType(entity.getQuestionType());
        model.setTotalScore(entity.getTotalScore());
        model.setN(entity.getN());
        model.setLevel(entity.getLevel());
        model.setLanguage(entity.getLanguage());
        model.setPositions(entity.getPositions());
        model.setExaminationDetail(entity.getExaminationDetail());
        model.setFileUrl(entity.getFileUrl());
        model.setContent(entity.getContent());
        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 BizExaminationDto entityToDto(BizExaminationEntity entity){
        BizExaminationDto dto = new BizExaminationDto();
        dto.setId(entity.getId());
        dto.setExaminationId(entity.getExaminationId());
        dto.setMemberId(entity.getMemberId());
        dto.setTitle(entity.getTitle());
        dto.setQuestionType(entity.getQuestionType());
        dto.setTotalScore(entity.getTotalScore());
        dto.setN(entity.getN());
        dto.setLevel(entity.getLevel());
        dto.setLanguage(entity.getLanguage());
        dto.setPositions(entity.getPositions());
        dto.setExaminationDetail(entity.getExaminationDetail());
        dto.setFileUrl(entity.getFileUrl());
        dto.setContent(entity.getContent());
        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 BizExaminationEntity dtoToEntity(BizExaminationDto dto){
        BizExaminationEntity entity = new BizExaminationEntity();
        entity.setId(dto.getId());
        entity.setExaminationId(dto.getExaminationId());
        entity.setMemberId(dto.getMemberId());
        entity.setTitle(dto.getTitle());
        entity.setQuestionType(dto.getQuestionType());
        entity.setTotalScore(dto.getTotalScore());
        entity.setN(dto.getN());
        entity.setLevel(dto.getLevel());
        entity.setLanguage(dto.getLanguage());
        entity.setPositions(dto.getPositions());
        entity.setExaminationDetail(dto.getExaminationDetail());
        entity.setFileUrl(dto.getFileUrl());
        entity.setContent(dto.getContent());
        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;
    }
}