package com.ruoyi.system.entity;

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_node_script_relevance
 *
 * @author hzh
 * @date 2023-10-26
 */
public class BpmNodeScriptRelevance extends BaseEntity {
    private static final long serialVersionUID = 1L;

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

    /**
     * 节点编码
     */
    @Excel(name = "节点编码")
    private String nodeKey;

    /**
     * 脚本编码
     */
    @Excel(name = "脚本编码")
    private String scriptKey;

    /**
     * 脚本触发机制（0：手动；1：自动）
     */
    @Excel(name = "脚本触发机制", readConverterExp = "0=：手动；1：自动")
    private Long scriptTriggerType;

    public BpmNodeScriptRelevance(String nodeKey) {
        this.nodeKey = nodeKey;
    }

    public BpmNodeScriptRelevance() {
    }

    public BpmNodeScriptRelevance(Long id, String nodeKey, String scriptKey, Long scriptTriggerType) {
        this.id = id;
        this.nodeKey = nodeKey;
        this.scriptKey = scriptKey;
        this.scriptTriggerType = scriptTriggerType;
    }

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

    public Long getId() {
        return id;
    }

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

    public String getNodeKey() {
        return nodeKey;
    }

    public void setScriptKey(String scriptKey) {
        this.scriptKey = scriptKey;
    }

    public String getScriptKey() {
        return scriptKey;
    }

    public void setScriptTriggerType(Long scriptTriggerType) {
        this.scriptTriggerType = scriptTriggerType;
    }

    public Long getScriptTriggerType() {
        return scriptTriggerType;
    }

    @Override
    public String toString() {
        return new ToStringBuilder(this, ToStringStyle.MULTI_LINE_STYLE)
                .append("id", getId())
                .append("nodeKey", getNodeKey())
                .append("scriptKey", getScriptKey())
                .append("scriptTriggerType", getScriptTriggerType())
                .toString();
    }
}
