- 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>
16 lines
635 B
Python
16 lines
635 B
Python
from sqlalchemy import String, Text
|
|
from sqlalchemy.orm import Mapped, mapped_column
|
|
|
|
from app.db.base import Base
|
|
from app.models.common import TimestampMixin, uuid4_str
|
|
|
|
|
|
class Notification(Base, TimestampMixin):
|
|
__tablename__ = "notifications"
|
|
|
|
id: Mapped[str] = mapped_column(String(36), primary_key=True, default=uuid4_str)
|
|
recipient_user_id: Mapped[str] = mapped_column(String(36), nullable=False, index=True)
|
|
title: Mapped[str] = mapped_column(String(255), nullable=False)
|
|
body: Mapped[str | None] = mapped_column(Text, nullable=True)
|
|
is_read: Mapped[bool] = mapped_column(nullable=False, default=False)
|