package org.raddatz.familienarchiv.person;

import lombok.Builder;

/**
 * Importer → {@link PersonService} command for an idempotent upsert keyed on
 * {@code sourceRef} (the normalizer's stable person_id). Carries only the canonical
 * fields the importer owns; the service applies the human-edit-preserve precedence
 * (see ADR-025): non-blank existing fields are never overwritten, and {@code provisional}
 * never flips back to true once a human has confirmed a person.
 */
@Builder
public record PersonUpsertCommand(
        String sourceRef,
        String firstName,
        String lastName,
        String maidenName,
        String notes,
        Integer birthYear,
        Integer deathYear,
        Integer generation,
        boolean familyMember,
        PersonType personType,
        boolean provisional
) {}
