//package cn.axzo.workflow.client.model.response.process;
//
//import lombok.Data;
//import org.flowable.engine.history.HistoricProcessInstance;
//import org.springframework.util.CollectionUtils;
//
//import java.util.ArrayList;
//import java.util.Collections;
//import java.util.Date;
//import java.util.List;
//
///**
// * TODO
// *
// * @author wangli
// * @since 2023/7/26 20:32
// */
//@Data
//public class CustomProcInstVO {
//
//    private String businessKey;
//
//    private String name;
//
//    private String category;
//
//    private String startUserId;
//
//    private Date startTime;
//
//    private String businessStatus;
//
//    private Date endTime;
//
//    public static CustomProcInstVO vo(HistoricProcessInstance instance, String category) {
//        CustomProcInstVO vo = new CustomProcInstVO();
//        vo.setName(instance.getName());
//        vo.setCategory(category);
//        vo.setBusinessKey(instance.getBusinessKey());
//        vo.setStartUserId(instance.getStartUserId());
//        vo.setStartTime(instance.getStartTime());
//        vo.setEndTime(instance.getEndTime());
//        vo.setBusinessStatus(instance.getBusinessStatus());
//        return vo;
//    }
//
//    public static List<CustomProcInstVO> vos(List<HistoricProcessInstance> list, String category) {
//        if (CollectionUtils.isEmpty(list)) {
//            return Collections.emptyList();
//        }
//        List<CustomProcInstVO> vos = new ArrayList<>();
//        list.forEach(i -> vos.add(vo(i, category)));
//        return vos;
//    }
//}
