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

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

import java.util.Date;
import java.util.List;

/**
 * 历史任务实例响应模型
 *
 * @author wangli
 * @since 2023/7/29 17:57
 */
@ApiModel("历史任务实例响应模型")
@Data
public class BpmnHistoricTaskInstanceVO {

    @ApiModelProperty(value = "任务实例 ID")
    private String taskId;

    @ApiModelProperty(value = "任务定义 KEY")
    private String taskDefinitionKey;

    @ApiModelProperty(value = "任务名称")
    private String name;

    @ApiModelProperty(value = "任务关联的实例 ID")
    private String processInstanceId;

    @ApiModelProperty(value = "任务关联的定义 ID")
    private String processDefinitionId;

    @ApiModelProperty(value = "任务的审批人")
    private String assignee;

    @ApiModelProperty(value = "任务创建时间")
    private Date createTime;

    @ApiModelProperty(value = "任务结束时间")
    private Date endTime;

    @ApiModelProperty(value = "任务持续毫秒数")
    private Long durationInMillis;

    @ApiModelProperty(value = "租户")
    private String tenantId;

    @ApiModelProperty(value = "审核状态(PROCESSING:审核中,APPROVED:已通过,REJECTED:已拒绝,CANCELLED:已取消)", example = "APPROVED")
    private BpmnProcessInstanceResultEnum result;

    @ApiModelProperty(value = "任务审批意见")
    private String advice;

    @ApiModelProperty(value = "当前任务关联评论信息")
    private List<BpmnHistoricCommentVO> comments;

    @ApiModelProperty(value = "删除原因")
    private String deleteReason;

    @ApiModelProperty(value = "审批人的快照信息", notes = "完整的审批人信息,assignee 仅是唯一标识")
    private BpmnTaskDelegateAssigner assigneeSnapshot;

}
