feat: implement background ebook indexing with progress tracking and real-time UI updates
This commit is contained in:
@@ -1,9 +1,24 @@
|
||||
using System.Text.Json.Serialization;
|
||||
|
||||
namespace NexusReader.Application.Queries.Graph;
|
||||
|
||||
public record GraphNodeDto(string Id, string Label, string Group, string? Type = null);
|
||||
public record GraphLinkDto(string Source, string Target, string RelationType, int Value = 1);
|
||||
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
|
||||
{
|
||||
public List<GraphNodeDto> Nodes { get; init; } = new();
|
||||
public List<GraphLinkDto> Links { get; init; } = new();
|
||||
[JsonPropertyName("nodes")] public List<GraphNodeDto> Nodes { get; init; } = new();
|
||||
[JsonPropertyName("links")] public List<GraphLinkDto> Links { get; init; } = new();
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user