package org.raddatz.familienarchiv.document.transcription;

import io.swagger.v3.oas.annotations.media.Schema;
import jakarta.persistence.Column;
import jakarta.persistence.Embeddable;
import jakarta.validation.constraints.NotNull;
import jakarta.validation.constraints.Size;
import lombok.AllArgsConstructor;
import lombok.Data;
import lombok.NoArgsConstructor;

import java.util.UUID;

@Embeddable
@Data
@NoArgsConstructor
@AllArgsConstructor
public class PersonMention {

    @NotNull
    @Column(name = "person_id", nullable = false)
    @Schema(requiredMode = Schema.RequiredMode.REQUIRED)
    private UUID personId;

    @NotNull
    @Size(max = 200)
    @Column(name = "display_name", nullable = false, length = 200)
    @Schema(requiredMode = Schema.RequiredMode.REQUIRED)
    // Archival: the text the transcriber typed after @. Never updated on person rename.
    private String displayName;
}
