25 lines
893 B
C#
25 lines
893 B
C#
using System.Text.Json.Serialization;
|
|
|
|
namespace NexusReader.Application.Queries.Graph;
|
|
|
|
public record GraphNodeDto(
|
|
[property: JsonPropertyName("id")] string Id,
|
|
[property: JsonPropertyName("label")] string Label,
|
|
[property: JsonPropertyName("group")] string Group,
|
|
[property: JsonPropertyName("description")] string? Description = null,
|
|
[property: JsonPropertyName("type")] string? Type = null
|
|
);
|
|
|
|
public record GraphLinkDto(
|
|
[property: JsonPropertyName("source")] string Source,
|
|
[property: JsonPropertyName("target")] string Target,
|
|
[property: JsonPropertyName("type")] string RelationType,
|
|
[property: JsonPropertyName("value")] int Value = 1
|
|
);
|
|
|
|
public record GraphDataDto
|
|
{
|
|
[JsonPropertyName("nodes")] public List<GraphNodeDto> Nodes { get; init; } = new();
|
|
[JsonPropertyName("links")] public List<GraphLinkDto> Links { get; init; } = new();
|
|
}
|