from __future__ import annotations

from datetime import datetime
from typing import Any

from pydantic import BaseModel, ConfigDict


class AuditLogRead(BaseModel):
    model_config = ConfigDict(from_attributes=True)

    id: str
    actor: str
    action: str
    resource_type: str
    resource_id: str
    before_json: dict[str, Any] | None
    after_json: dict[str, Any] | None
    request_id: str
    created_at: datetime
