package cn.ey.biz.module.system.api.bpm.dto;

import io.swagger.annotations.ApiModel;
import io.swagger.annotations.ApiModelProperty;
import lombok.Data;
import javax.validation.constraints.NotEmpty;
import java.util.List;
import java.util.Map;

@ApiModel("流程管理 - 流程实例的创建 DTO")
@Data
public class BpmProcessInstanceCreateDTO extends BpmWeaverDTO {

    @ApiModelProperty(value = "用户Code", required = true, example = "100")
    private String userCode;

    @ApiModelProperty(value = "流程分类", required = true, example = "timesheet")
    @NotEmpty(message = "流程分类不能为空")
    private String category;

    /**
     * 业务的唯一标识
     *
     * 例如说，请假申请的编号。通过它，可以查询到对应的实例
     */
    @ApiModelProperty(value = "业务的唯一标识", required = true, example = "123")
    @NotEmpty(message = "业务的唯一标识不能为空")
    private String businessKey;

    /**
     * 流程实例的名字
     *
     */
    @ApiModelProperty(value = "流程实例的名字", required = true, example = "test")
    @NotEmpty(message = "流程实例的名字不能为空")
    private String name;

    @ApiModelProperty(value = "流程定义的编号", required = true, example = "1024")
    @NotEmpty(message = "流程定义编号不能为空")
    private String processDefinitionId;

    @ApiModelProperty(value = "附加参数")
    private Integer isnextflow ;

    @ApiModelProperty(value = "变量实例")
    private Map<String, Object> variables;

    @ApiModelProperty(value = "主表数据")
    private List<BpmProcessInstanceMainDataDTO>  mainData;

    @ApiModelProperty(value = "泛微回调url")
    private String eyredirecturl;

    @ApiModelProperty(value = "签字意见")
    private String remark;

}
