package com.ruoyi.execution.produce.dispersed.enetity;

import org.apache.commons.lang3.builder.ToStringBuilder;
import org.apache.commons.lang3.builder.ToStringStyle;
import com.ruoyi.common.annotation.Excel;
import com.ruoyi.common.core.domain.BaseEntity;

/**
 * 流程执行任务对象 bpm_execute_process
 *
 * @author hzh
 * @date 2023-11-01
 */
public class BpmExecuteProcess extends BaseEntity {
    private static final long serialVersionUID = 1L;

    /**
     * 主键
     */
    private Long id;

    /**
     * 流程任务执行别名
     */
    @Excel(name = "流程任务执行别名")
    private String taskKey;

    /**
     * 任务名称
     */
    @Excel(name = "任务计划key")
    private String taskPlanKey;

    /**
     * 任务名称
     */
    @Excel(name = "任务名称")
    private String taskName;

    /**
     * 任务节点别名（记录当前流程执行过的最后一个节点id）
     */
    @Excel(name = "任务节点别名", readConverterExp = "记=录当前流程执行过的最后一个节点id")
    private String taskNodeKey;

    /**
     * 定义的流程别名
     */
    @Excel(name = "定义的流程别名")
    private String taskProcessKey;

    /**
     * xml标签内容
     */
    @Excel(name = "xml标签内容")
    private String taskProcessXmlContent;

    /**
     * 任务流程状态
     */
    @Excel(name = "任务流程状态")
    private Long taskProcessState;

    /**
     * 版本注释
     */
    @Excel(name = "版本注释")
    private String taskProcessNote;

    /**
     * 删除标志（0代表存在 2代表删除）
     */
    private String delFlag;

    /**
     * 流程类型
     */
    @Excel(name = "流程类型")
    private String taskProcessType;

    public Long getId() {
        return id;
    }

    public void setId(Long id) {
        this.id = id;
    }

    public String getTaskKey() {
        return taskKey;
    }

    public void setTaskKey(String taskKey) {
        this.taskKey = taskKey;
    }

    public String getTaskPlanKey() {
        return taskPlanKey;
    }

    public void setTaskPlanKey(String taskPlanKey) {
        this.taskPlanKey = taskPlanKey;
    }

    public String getTaskName() {
        return taskName;
    }

    public void setTaskName(String taskName) {
        this.taskName = taskName;
    }

    public String getTaskNodeKey() {
        return taskNodeKey;
    }

    public void setTaskNodeKey(String taskNodeKey) {
        this.taskNodeKey = taskNodeKey;
    }

    public String getTaskProcessKey() {
        return taskProcessKey;
    }

    public void setTaskProcessKey(String taskProcessKey) {
        this.taskProcessKey = taskProcessKey;
    }

    public String getTaskProcessXmlContent() {
        return taskProcessXmlContent;
    }

    public void setTaskProcessXmlContent(String taskProcessXmlContent) {
        this.taskProcessXmlContent = taskProcessXmlContent;
    }

    public Long getTaskProcessState() {
        return taskProcessState;
    }

    public void setTaskProcessState(Long taskProcessState) {
        this.taskProcessState = taskProcessState;
    }

    public String getTaskProcessNote() {
        return taskProcessNote;
    }

    public void setTaskProcessNote(String taskProcessNote) {
        this.taskProcessNote = taskProcessNote;
    }

    public String getDelFlag() {
        return delFlag.isEmpty() ? "0" : delFlag;
    }

    public void setDelFlag(String delFlag) {
        this.delFlag = delFlag;
    }

    public String getTaskProcessType() {
        return taskProcessType;
    }

    public void setTaskProcessType(String taskProcessType) {
        this.taskProcessType = taskProcessType;
    }

    @Override
    public String toString() {
        return new ToStringBuilder(this, ToStringStyle.MULTI_LINE_STYLE)
                .append("id", getId())
                .append("taskKey", getTaskKey())
                .append("taskName", getTaskName())
                .append("taskNodeKey", getTaskNodeKey())
                .append("taskProcessKey", getTaskProcessKey())
                .append("taskProcessXmlContent", getTaskProcessXmlContent())
                .append("taskProcessState", getTaskProcessState())
                .append("taskProcessNote", getTaskProcessNote())
                .append("delFlag", getDelFlag())
                .append("remark", getRemark())
                .append("taskProcessType", getTaskProcessType())
                .toString();
    }
}
