package com.ruoyi.system.domain.neo4j;

import org.springframework.data.neo4j.core.schema.Id;
import org.springframework.data.neo4j.core.schema.RelationshipProperties;
import org.springframework.data.neo4j.core.schema.TargetNode;

/**
 * 知识图谱关系实体
 *
 * @author jackeyhuang
 * @version 1.0.0
 * @date 2025-01-27
 */
@RelationshipProperties
public class GraphRelationship
{
    @Id
    private Long id;

    @TargetNode
    private GraphNode target;

    private String relation;

    private Double weight;

    public GraphRelationship()
    {
    }

    public GraphRelationship(GraphNode target, String relation, Double weight)
    {
        this.target = target;
        this.relation = relation;
        this.weight = weight;
    }

    public Long getId()
    {
        return id;
    }

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

    public GraphNode getTarget()
    {
        return target;
    }

    public void setTarget(GraphNode target)
    {
        this.target = target;
    }

    public String getRelation()
    {
        return relation;
    }

    public void setRelation(String relation)
    {
        this.relation = relation;
    }

    public Double getWeight()
    {
        return weight;
    }

    public void setWeight(Double weight)
    {
        this.weight = weight;
    }
}
