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

import cn.axzo.workflow.common.model.request.bpmn.BpmnJsonModel;
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.NotEmpty;
import java.util.Date;

@ApiModel("流程定义响应模型")
@Data
public class BpmnProcessDefinitionVO {

    /**
     * 流程定义ID
     */
    @ApiModelProperty(value = "编号", required = true, example = "1024")
    private String id;

    /**
     * 流程定义版本
     */
    @ApiModelProperty(value = "版本", required = true, example = "1")
    private Integer version;

    /**
     * 流程名称
     */
    @ApiModelProperty(value = "流程名称", required = true, example = "芋道")
    @NotEmpty(message = "流程名称不能为空")
    private String name;

    /**
     * 流程标识
     */
    @ApiModelProperty(value = "流程标识")
    private String key;

    /**
     * 描述
     */
    @ApiModelProperty(value = "流程描述", example = "我是描述")
    private String description;

    /**
     * 流程分类
     */
    @ApiModelProperty(value = "流程分类", example = "1")
    @NotEmpty(message = "流程分类不能为空")
    private String category;

    /**
     * 状态 1:生效中(激活) 2:历史(挂起)
     */
    @ApiModelProperty(value = "状态 1:生效中(激活) 2:历史(挂起)", required = true, example = "1", notes = "参见 SuspensionState 枚举")
    private Integer suspensionState;

    /**
     * 流程模型 JSON 数据
     */
    @ApiModelProperty(value = "流程模型 JSON 数据")
    private BpmnJsonModel jsonModel;

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

    /**
     * 创建时间
     */
    @ApiModelProperty(value = "创建时间", example = "2023-11-18 22:00:00")
    private Date createTime;

    /**
     * 操作定义的人员信息
     */
    @ApiModelProperty(value = "操作人信息")
    private BpmnTaskDelegateAssigner operator;

}
