- Backend: FastAPI + SQLAlchemy async, pgvector RAG, RQ workers, OpenAI gpt-5.4-mini structured output - Frontend: React 18 + Vite + TypeScript + TailwindCSS + shadcn/ui, job polling pattern (no WebSocket) - Admin panel: editable SystemPrompt with version history for FCA audit trail - Deploy: idempotent deploy.sh with hash-based cache, Apache Include fragment, alembic migrations - Docker: dev + prod compose configs, port 8010 (API) to avoid OliVAS conflict on host Co-Authored-By: Claude Sonnet 4.6 <noreply@anthropic.com>
19 lines
683 B
Python
19 lines
683 B
Python
import uuid
|
|
from datetime import datetime, timezone
|
|
|
|
from sqlalchemy import String, DateTime, JSON, Text
|
|
from sqlalchemy.dialects.postgresql import UUID
|
|
from sqlalchemy.orm import Mapped, mapped_column
|
|
|
|
from app.database import Base
|
|
|
|
|
|
class DamCache(Base):
|
|
__tablename__ = "dam_cache"
|
|
|
|
id: Mapped[uuid.UUID] = mapped_column(UUID(as_uuid=True), primary_key=True, default=uuid.uuid4)
|
|
query_hash: Mapped[str] = mapped_column(String(64), unique=True, nullable=False, index=True)
|
|
response: Mapped[dict] = mapped_column(JSON, nullable=False)
|
|
cached_at: Mapped[datetime] = mapped_column(
|
|
DateTime(timezone=True), default=lambda: datetime.now(timezone.utc)
|
|
)
|