package com.diagbot.entity;

import com.baomidou.mybatisplus.annotation.IdType;
import com.baomidou.mybatisplus.annotation.TableId;

import java.io.Serializable;

/**
 * <p>
 * 
 * </p>
 *
 * @author Weixuan Huang
 * @since 2019-01-31
 */
public class Relation implements Serializable {

    private static final long serialVersionUID = 1L;

    @TableId(value = "id", type = IdType.AUTO)
    private Integer id;

    /**
     * 关系起点术语id
     */
    private Integer startId;

    /**
     * 关系id
     */
    private Integer relationId;

    /**
     * 关系终点术语id
     */
    private Integer endId;

    /**
     * 子节点
     */
//    private Relation nextNode;

    /**
     * 父节点
     */
//    private Relation prevNode;


    public Integer getId() {
        return id;
    }

    public void setId(Integer id) {
        this.id = id;
    }
    public Integer getStartId() {
        return startId;
    }

    public void setStartId(Integer startId) {
        this.startId = startId;
    }
    public Integer getRelationId() {
        return relationId;
    }

    public void setRelationId(Integer relationId) {
        this.relationId = relationId;
    }
    public Integer getEndId() {
        return endId;
    }

    public void setEndId(Integer endId) {
        this.endId = endId;
    }
    /*
    public Relation next() {
        return nextNode;
    }
    public void setNext(Relation node) {
        nextNode = node;
    }

    public Relation prev() {
        return prevNode;
    }
    public void setPrev(Relation node) {
        prevNode = node;
    }
    */

    @Override
    public String toString() {
        return "Relation{" +
        "id=" + id +
        ", startId=" + startId +
        ", relationId=" + relationId +
        ", endId=" + endId +
        "}";
    }
}
