package com.solution.system.domain;

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

/**
 * 节点连接对象 nodeconnection
 * 
 * @author ruoyi
 * @date 2026-02-05
 */
public class Nodeconnection extends BaseEntity
{
    private static final long serialVersionUID = 1L;

    /** 连接ID (主键) */
    private Long id;

    /** 父节点 (外键: TreeInstanceNode.id) */
    @Excel(name = "父节点 (外键: TreeInstanceNode.id)")
    private Long parentNodeId;

    /** 子节点 (外键: TreeInstanceNode.id) */
    @Excel(name = "子节点 (外键: TreeInstanceNode.id)")
    private Long childNodeId;

    /** 子节点在父节点下的执行顺序 (对于 Sequence/Selector 等很重要) */
    @Excel(name = "子节点在父节点下的执行顺序 (对于 Sequence/Selector 等很重要)")
    private Long orderIndex;

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

    public Long getId() 
    {
        return id;
    }

    public void setParentNodeId(Long parentNodeId) 
    {
        this.parentNodeId = parentNodeId;
    }

    public Long getParentNodeId() 
    {
        return parentNodeId;
    }

    public void setChildNodeId(Long childNodeId) 
    {
        this.childNodeId = childNodeId;
    }

    public Long getChildNodeId() 
    {
        return childNodeId;
    }

    public void setOrderIndex(Long orderIndex) 
    {
        this.orderIndex = orderIndex;
    }

    public Long getOrderIndex() 
    {
        return orderIndex;
    }

    @Override
    public String toString() {
        return new ToStringBuilder(this,ToStringStyle.MULTI_LINE_STYLE)
            .append("id", getId())
            .append("parentNodeId", getParentNodeId())
            .append("childNodeId", getChildNodeId())
            .append("orderIndex", getOrderIndex())
            .toString();
    }
}
