- Unify API: lib/api.ts uses /api/v1, inbox uses /api/inbox (rewrites) - Remove localhost refs: openapi, inbox page - Add rewrites: /api/inbox|tmc -> inbox-server, /api/v1 -> FastAPI - Add stub routes: knowledge/insights, recommendations, search, log-error - Transfer from PAPA: prompts (inspection, tmc), scripts, supabase, data/tmc-requests - Fix inbox-server: ORDER BY created_at, package.json - Remove redundant app/api/inbox/files route (rewrites handle it) - knowledge/ in gitignore (large PDFs) Co-authored-by: Cursor <cursoragent@cursor.com>
18 lines
846 B
Python
18 lines
846 B
Python
from sqlalchemy import String, Text, DateTime
|
|
from sqlalchemy.orm import Mapped, mapped_column
|
|
|
|
from app.db.base import Base
|
|
from app.models.common import TimestampMixin, uuid4_str
|
|
|
|
|
|
class IngestJobLog(Base, TimestampMixin):
|
|
__tablename__ = "ingest_job_logs"
|
|
|
|
id: Mapped[str] = mapped_column(String(36), primary_key=True, default=uuid4_str)
|
|
source_system: Mapped[str] = mapped_column(String(128), nullable=False)
|
|
job_name: Mapped[str] = mapped_column(String(128), nullable=False)
|
|
started_at: Mapped[str | None] = mapped_column(DateTime(timezone=True), nullable=True)
|
|
finished_at: Mapped[str | None] = mapped_column(DateTime(timezone=True), nullable=True)
|
|
status: Mapped[str] = mapped_column(String(32), nullable=False, doc="success|failed|partial")
|
|
details: Mapped[str | None] = mapped_column(Text, nullable=True)
|