"""Pydantic models for Grukk message endpoints."""

from __future__ import annotations

from datetime import datetime
from enum import Enum
from typing import Any
from uuid import UUID

from pydantic import BaseModel, Field


class GrukkMessageRole(str, Enum):
    king = "king"
    grukk = "grukk"


class GrukkMessageCreate(BaseModel):
    role: GrukkMessageRole
    content: str
    metadata: dict[str, Any] = Field(default_factory=dict)
    user_id: int | None = None


class GrukkMessageResponse(BaseModel):
    id: UUID
    user_id: int | None = None
    role: GrukkMessageRole
    content: str
    metadata: dict[str, Any]
    created_at: datetime
