package com.ningdatech.pmapi.todocenter.model.dto;

import java.io.Serializable;
import java.util.Map;

import javax.validation.constraints.NotNull;

import com.google.common.collect.Maps;
import com.ningdatech.pmapi.projectlib.model.dto.ProjectDTO;
import com.wflow.workflow.bean.process.ProcessComment;
import com.wflow.workflow.enums.ProcessHandlerEnum;

import cn.hutool.core.collection.CollUtil;
import io.swagger.annotations.ApiModelProperty;
import lombok.AllArgsConstructor;
import lombok.Data;
import lombok.NoArgsConstructor;

/**
 * @Classname DefaultDeclaredDTO
 * @Description
 * @Date 2023/2/14 17:16
 * @Author PoffyZhang
 */
@Data
@NoArgsConstructor
@AllArgsConstructor
public class AdjustHandleDTO implements Serializable {

    private static final long serialVersionUID = 1L;

    @NotNull
    @ApiModelProperty("项目信息")
    private ProjectDTO projectInfo;

    @ApiModelProperty("表单信息 新增模块")
    private Map<String,Object> formData;

    public Map<String,Object> getFormData(){
        if(CollUtil.isEmpty(this.formData)){
            this.formData = Maps.newHashMap();
            return this.formData;
        }
        return this.formData;
    }
    @ApiModelProperty("项目ID")
    @NotNull(message = "要处理的项目ID不能为空!")
    private Long projectId;

    @NotNull(message = "流程实例ID不能为空!")
    private String instanceId;

    @ApiModelProperty("任务ID")
    @NotNull(message = "任务ID不能为空!")
    private String taskId;
}
