package com.cameleer.server.core.search;

import java.time.Instant;
import java.util.Map;

/**
 * Lightweight summary of a route execution for search result listings.
 * <p>
 * Contains only the fields needed for the list view -- not the full processor
 * arrays or exchange snapshot data.
 *
 * @param executionId        unique execution identifier
 * @param routeId            Camel route ID
 * @param instanceId         agent instance that reported the execution
 * @param status             execution status (COMPLETED, FAILED, RUNNING)
 * @param startTime          execution start time
 * @param endTime            execution end time (may be null for RUNNING)
 * @param durationMs         execution duration in milliseconds
 * @param correlationId      correlation ID for cross-instance tracing
 * @param errorMessage       error message (empty string if no error)
 * @param diagramContentHash content hash linking to the active route diagram version
 */
public record ExecutionSummary(
        String executionId,
        String routeId,
        String instanceId,
        String applicationId,
        String status,
        Instant startTime,
        Instant endTime,
        long durationMs,
        String correlationId,
        String errorMessage,
        String diagramContentHash,
        String highlight,
        Map<String, String> attributes,
        boolean hasTraceData,
        boolean isReplay
) {
}
