package cn.axzo.workflow.common.model.request.bpmn.process;

import cn.axzo.workflow.common.model.request.bpmn.task.BpmnTaskDelegateAssigner;
import io.swagger.annotations.ApiModel;
import io.swagger.annotations.ApiModelProperty;
import lombok.Data;

import javax.validation.Valid;
import javax.validation.constraints.NotBlank;
import javax.validation.constraints.NotNull;

/**
 * 取消流程实例的入参模型
 *
 * @author wangli
 * @since 2023/7/17 09:34
 */
@ApiModel("取消流程实例的入参模型")
@Data
public class BpmnProcessInstanceCancelDTO {

    /**
     * 流程实例的编号
     */
    @ApiModelProperty(value = "流程实例编号", example = "11")
    @NotBlank(message = "流程实例编号不能为空")
    private String processInstanceId;

    /**
     * 工作台 ID
     */
    @ApiModelProperty(value = "工作台 ID")
    private String tenantId;

    /**
     * 取消原因
     */
    @ApiModelProperty(value = "撤回的原因", example = "主动撤回")
    private String reason;

    /**
     * 发起人的信息
     */
    @ApiModelProperty(value = "审批流程发起人信息")
    @Valid
    @NotNull(message = "审批流程的发起人不能为空")
    private BpmnTaskDelegateAssigner initiator;


    /**
     * 是否异步执行
     */
    @ApiModelProperty(value = "是否异步", notes = "异步时,只接收请求便返回数据")
    private Boolean async = false;

}
