"""Pydantic schemas for Evidence endpoints."""

# Import uuid
import uuid

# Import datetime from datetime
from datetime import datetime

# Import BaseModel, ConfigDict from pydantic
from pydantic import BaseModel, ConfigDict

# Import TeamSide from app.models.enums
from app.models.enums import TeamSide


# Define class EvidenceOut
class EvidenceOut(BaseModel):
    """Representation of an evidence record returned by the API.

    ``download_url`` is a presigned URL generated at response time.
    """

    # id: uuid.UUID
    id: uuid.UUID
    # test_id: uuid.UUID
    test_id: uuid.UUID
    # file_name: str
    file_name: str
    # sha256_hash: str
    sha256_hash: str
    # Assign uploaded_by = None
    uploaded_by: uuid.UUID | None = None
    # Assign uploaded_at = None
    uploaded_at: datetime | None = None
    # Assign team = TeamSide.red
    team: TeamSide = TeamSide.red
    # Assign notes = None
    notes: str | None = None
    # Assign download_url = None
    download_url: str | None = None

    # Assign model_config = ConfigDict(from_attributes=True)
    model_config = ConfigDict(from_attributes=True)


# Define class EvidenceUpload
class EvidenceUpload(BaseModel):
    """Metadata sent alongside an evidence file upload."""

    # team: TeamSide
    team: TeamSide
    # Assign notes = None
    notes: str | None = None
