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

import cn.hutool.core.collection.CollUtil;
import com.google.common.collect.Maps;
import com.ningdatech.pmapi.projectlib.model.dto.ProjectDTO;
import com.wflow.workflow.bean.dto.ProcessInstanceUserDto;
import io.swagger.annotations.ApiModelProperty;
import lombok.AllArgsConstructor;
import lombok.Data;
import lombok.NoArgsConstructor;

import javax.validation.constraints.NotNull;
import java.io.Serializable;
import java.util.Map;

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

    @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;
    }
}
