package com.zkqy.system.entity;

import org.apache.commons.lang3.builder.ToStringBuilder;
import org.apache.commons.lang3.builder.ToStringStyle;
import com.zkqy.common.core.domain.BaseEntity;

import java.io.Serializable;

/**
 * 流程配置对象 bpm_process_configuration
 *
 * @author hzh
 * @date 2023-10-20
 */
public class BpmProcessConfiguration extends BaseEntity implements Serializable {

    private static final long serialVersionUID = 123L;

    /**
     * 编号
     */
    private Long id;

    /**
     * 节点编号
     */
    private String nodeKey;

    /**
     * 节点名称
     */
    private String nodeName;

    /**
     * 表单编号
     */
    private String nodeFormKey;

    /**
     * 节点表单类型
     */
    private String nodeFormType;

    /**
     * 流程编号
     */
    private String nodeProcessKey;

    /**
     * 节点类型
     */
    private String nodeType;

    /**
     * 节点执行类型（0：自动执行；1：手动执行）
     */
    private String nodeExecuteType;

    /**
     * 节点前
     */
    private String nodeBefore;

    /**
     * 节点后
     */
    private String nodeAfter;

    /**
     * 角色权限
     */
    private String nodeRolePermission;

    /**
     * 备用字段1
     */
    private String spare1;

    /**
     * 备用字段2
     */
    private String spare2;

    /**
     * 备用字段3
     */
    private String spare3;

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

    public BpmProcessConfiguration() {
    }

    public BpmProcessConfiguration(String nodeProcessKey) {
        this.nodeProcessKey = nodeProcessKey;
    }

    public BpmProcessConfiguration(Long id, String nodeKey, String nodeName, String nodeFormKey, String nodeFormType, String nodeProcessKey, String nodeType, String nodeExecuteType, String nodeBefore, String nodeAfter, String nodeRolePermission, String spare1, String spare2, String spare3, String delFlag) {
        this.id = id;
        this.nodeKey = nodeKey;
        this.nodeName = nodeName;
        this.nodeFormKey = nodeFormKey;
        this.nodeFormType = nodeFormType;
        this.nodeProcessKey = nodeProcessKey;
        this.nodeType = nodeType;
        this.nodeExecuteType = nodeExecuteType;
        this.nodeBefore = nodeBefore;
        this.nodeAfter = nodeAfter;
        this.nodeRolePermission = nodeRolePermission;
        this.spare1 = spare1;
        this.spare2 = spare2;
        this.spare3 = spare3;
        this.delFlag = delFlag;
    }

    public Long getId() {
        return id;
    }

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

    public String getNodeKey() {
        return nodeKey;
    }

    public void setNodeKey(String nodeKey) {
        this.nodeKey = nodeKey;
    }

    public String getNodeName() {
        return nodeName;
    }

    public void setNodeName(String nodeName) {
        this.nodeName = nodeName;
    }

    public String getNodeFormKey() {
        return nodeFormKey;
    }

    public void setNodeFormKey(String nodeFormKey) {
        this.nodeFormKey = nodeFormKey;
    }

    public String getNodeFormType() {
        return nodeFormType;
    }

    public void setNodeFormType(String nodeFormType) {
        this.nodeFormType = nodeFormType;
    }

    public String getNodeProcessKey() {
        return nodeProcessKey;
    }

    public void setNodeProcessKey(String nodeProcessKey) {
        this.nodeProcessKey = nodeProcessKey;
    }

    public String getNodeType() {
        return nodeType;
    }

    public void setNodeType(String nodeType) {
        this.nodeType = nodeType;
    }

    public String getNodeExecuteType() {
        return nodeExecuteType;
    }

    public void setNodeExecuteType(String nodeExecuteType) {
        this.nodeExecuteType = nodeExecuteType;
    }

    public String getNodeBefore() {
        return nodeBefore;
    }

    public void setNodeBefore(String nodeBefore) {
        this.nodeBefore = nodeBefore;
    }

    public String getNodeAfter() {
        return nodeAfter;
    }

    public void setNodeAfter(String nodeAfter) {
        this.nodeAfter = nodeAfter;
    }

    public String getNodeRolePermission() {
        return nodeRolePermission;
    }

    public void setNodeRolePermission(String nodeRolePermission) {
        this.nodeRolePermission = nodeRolePermission;
    }

    public String getSpare1() {
        return spare1;
    }

    public void setSpare1(String spare1) {
        this.spare1 = spare1;
    }

    public String getSpare2() {
        return spare2;
    }

    public void setSpare2(String spare2) {
        this.spare2 = spare2;
    }

    public String getSpare3() {
        return spare3;
    }

    public void setSpare3(String spare3) {
        this.spare3 = spare3;
    }

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

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

    @Override
    public String toString() {
        return new ToStringBuilder(this, ToStringStyle.MULTI_LINE_STYLE)
                .append("id", getId())
                .append("nodeKey", getNodeKey())
                .append("nodeName", getNodeName())
                .append("nodeFormKey", getNodeFormKey())
                .append("nodeFormType", getNodeFormType())
                .append("nodeProcessKey", getNodeProcessKey())
                .append("nodeType", getNodeType())
                .append("nodeExecuteType",getNodeExecuteType())
                .append("nodeBefore", getNodeBefore())
                .append("nodeAfter", getNodeAfter())
                .append("nodeRolePermission", getNodeRolePermission())
                .append("spare1", getSpare1())
                .append("spare2", getSpare2())
                .append("spare3", getSpare3())
                .append("delFlag", getDelFlag())
                .append("createBy", getCreateBy())
                .append("createTime", getCreateTime())
                .append("updateBy", getUpdateBy())
                .append("updateTime", getUpdateTime())
                .append("remark", getRemark())
                .toString();
    }
}
