package org.raddatz.familienarchiv.geschichte.journeyitem;

import io.swagger.v3.oas.annotations.media.Schema;
import org.raddatz.familienarchiv.document.DatePrecision;

import java.time.LocalDate;
import java.util.UUID;

/**
 * Lean read-model view of a Document for embedding in JourneyItemView.
 * Built by JourneyItemService.toSummary(Document) — never serialised from
 * a JPA entity to avoid LazyInitializationException and tag-color overhead.
 */
public record DocumentSummary(
        @Schema(requiredMode = Schema.RequiredMode.REQUIRED) UUID id,
        @Schema(requiredMode = Schema.RequiredMode.REQUIRED) String title,
        LocalDate documentDate,
        LocalDate documentDateEnd,
        @Schema(requiredMode = Schema.RequiredMode.REQUIRED) DatePrecision datePrecision,
        String senderName,
        String receiverName,
        @Schema(requiredMode = Schema.RequiredMode.REQUIRED) Integer receiverCount
) {}
