Create node graph page
This commit is contained in:
@@ -0,0 +1,17 @@
|
||||
namespace Media.JoshHeaps.Net.Models;
|
||||
|
||||
public class Graph
|
||||
{
|
||||
public long Id { get; set; }
|
||||
public long UserId { get; set; }
|
||||
public string Name { get; set; } = string.Empty;
|
||||
public string? Description { get; set; }
|
||||
public DateTime CreatedAt { get; set; }
|
||||
public DateTime UpdatedAt { get; set; }
|
||||
}
|
||||
|
||||
public class GraphWithCounts : Graph
|
||||
{
|
||||
public int NodeCount { get; set; }
|
||||
public int EdgeCount { get; set; }
|
||||
}
|
||||
@@ -0,0 +1,17 @@
|
||||
namespace Media.JoshHeaps.Net.Models;
|
||||
|
||||
public class GraphEdge
|
||||
{
|
||||
public long Id { get; set; }
|
||||
public long GraphId { get; set; }
|
||||
public long SourceNodeId { get; set; }
|
||||
public long TargetNodeId { get; set; }
|
||||
public DateTime CreatedAt { get; set; }
|
||||
}
|
||||
|
||||
public class GraphData
|
||||
{
|
||||
public Graph Graph { get; set; } = new();
|
||||
public List<GraphNodeWithConnections> Nodes { get; set; } = [];
|
||||
public List<GraphEdge> Edges { get; set; } = [];
|
||||
}
|
||||
@@ -0,0 +1,16 @@
|
||||
namespace Media.JoshHeaps.Net.Models;
|
||||
|
||||
public class GraphNode
|
||||
{
|
||||
public long Id { get; set; }
|
||||
public long GraphId { get; set; }
|
||||
public string Label { get; set; } = string.Empty;
|
||||
public string? Notes { get; set; }
|
||||
public DateTime CreatedAt { get; set; }
|
||||
public DateTime UpdatedAt { get; set; }
|
||||
}
|
||||
|
||||
public class GraphNodeWithConnections : GraphNode
|
||||
{
|
||||
public int ConnectionCount { get; set; }
|
||||
}
|
||||
Reference in New Issue
Block a user