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.constraints.NotNull;

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

    /**
     * 流程实例的编号
     */
    @ApiModelProperty(value = "流程实例编号", example = "11", notes = "与 businessKey 必须二选一")
    private String id;

    /**
     * 流程实例对应的 businessKey
     * <p>
     * modify: businessKey 不是唯一的, flowable 允许 businessKey 相同, 暂时不能通过该属性进行取消流程实例
     */
    @ApiModelProperty(value = "流程实例的 businessKey", example = "businessKey", notes = "与 id 必须二选一", hidden = true)
    @Deprecated
    private String businessKey;

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

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

}
