using System.Collections.Generic;
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,
    [property: JsonPropertyName("summary")] string? Summary = null,
    [property: JsonPropertyName("key_terms")] List<string>? KeyTerms = 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();
}
