优化关系图,支持不同类的相同名称,通过id区分
大石头 authored at 2022-04-04 21:44:07
1.05 KiB
Stardust
namespace Stardust.Web.Models
{
    public class GraphViewModel
    {
        public String TraceId { get; set; }

        public String Title { get; set; }

        public String Layout { get; set; }

        public GraphCategory[] Categories { get; set; }

        public GraphLink[] Links { get; set; }

        public GraphNode[] Nodes { get; set; }
    }

    public class GraphCategory
    {
        public String Name { get; set; }

        public String Symbol { get; set; }
    }

    public class GraphLink
    {
        public String Source { get; set; }

        public String Target { get; set; }
    }

    public class GraphNode
    {
        public String Id { get; set; }

        public String Name { get; set; }

        public Int32 Category { get; set; }

        public Double SymbolSize { get; set; }

        //public Boolean Draggable { get; set; } = true;

        //public Boolean Fixed { get; set; } = false;

        //public Double X { get; set; }

        //public Double Y { get; set; }

        public Double Value { get; set; }
    }
}