from __future__ import annotations

from datetime import datetime
from enum import Enum

from pydantic import BaseModel, Field


class ClientEventType(str, Enum):
    SYSTEM = "system"
    STATUS = "status"
    USER = "user"


class ClientEvent(BaseModel):
    event_id: str = Field(min_length=1)
    request_id: str = Field(min_length=1)
    type: ClientEventType
    source: str = Field(min_length=1)
    text: str = ""
    payload: dict = Field(default_factory=dict)
    created_at: datetime
