package org.raddatz.familienarchiv.geschichte.journeyitem;

import lombok.Data;

import java.util.Optional;

/**
 * Input for PATCH /api/geschichten/{id}/items/{itemId}.
 * Three-way semantics via Optional<String>:
 *   null         → field absent from JSON → leave note unchanged
 *   Optional.empty() → {"note": null} → clear the note
 *   Optional.of("x") → {"note": "x"} → set the note
 *
 * Jackson 3.x maps JSON null to Optional.empty(); absent fields keep the Java default (null).
 */
@Data
public class JourneyItemUpdateDTO {
    private Optional<String> note = null;
}
