from datetime import datetime from typing import Any, Protocol, runtime_checkable from uuid import UUID @runtime_checkable class AuditableProtocol(Protocol): pk: Any usuario_creacion: Any | None fecha_creacion: datetime | None usuario_actualizacion: Any | None fecha_actualizacion: datetime | None @runtime_checkable class EventProtocol(Protocol): event_name: str payload: dict timestamp: str @runtime_checkable class TenantProtocol(Protocol): """Contract of every tenant-owned model. ``tenant_id`` is non-null on tenant-owned rows; a model with a null ``tenant_id`` is a global row and does not satisfy this protocol. """ tenant_id: UUID