"""Schema for a single personnel row in a surat sprint."""

from __future__ import annotations

from pydantic import BaseModel, Field


class PersonnelEntry(BaseModel):
    """One row from the personnel table."""

    no: int | None = Field(None, description="Row number as printed on the document.")
    pangkat: str | None = Field(None, description="Rank, normalized when possible.")
    nrp: str | None = Field(None, description="8-digit Polri NRP, or blank if not detected.")
    nama: str | None = Field(None, description="Full name.")
    jabatan_dinas: str | None = Field(None, description="Permanent post (jabatan dalam dinas).")
    jabatan_sprint: str | None = Field(None, description="Role within this sprint.")
    keterangan: str | None = None
    confidence: float = Field(0.0, ge=0.0, le=1.0)
