package digital.laboratory.platform.entrustment.convert;

import digital.laboratory.platform.entrustment.dto.UpdateCaseAndEntrustTypeDTO;
import digital.laboratory.platform.entrustment.entity.CaseEvent;

/**
 * 案件实体类信息 转换类
 */
public class CaseEventConvert {

    public static CaseEvent dtoToEntity(UpdateCaseAndEntrustTypeDTO dto) {
        if (dto == null) return null;
        CaseEvent caseEvent = new CaseEvent();
        caseEvent.setId(dto.getId());
        caseEvent.setCaseNo(dto.getCaseNo());
        caseEvent.setThirdPartySysNo(dto.getThirdPartySysNo());
        caseEvent.setCaseName(dto.getCaseName());
        caseEvent.setCaseType(dto.getCaseType());
        caseEvent.setHappenTime(dto.getHappenTime());
        caseEvent.setCaseAddress(dto.getCaseAddress());
        caseEvent.setCaseArea(dto.getCaseArea());
        caseEvent.setCaseOwnOrgId(dto.getCaseOwnOrgId());
        caseEvent.setCaseRank(dto.getCaseRank());
        caseEvent.setCaseBrief(dto.getCaseBrief());
        caseEvent.setComments(dto.getComments());
        caseEvent.setDataSources(dto.getDataSources());
        return caseEvent;
    }

}
