Full-stack Amazon AI Transcreation Platform with: - FastAPI backend (async, PostgreSQL, Redis, Celery) with 11 DB tables - JWT auth (SSO-ready abstract provider pattern) - 6-agent pipeline orchestrator with deterministic modules - Next.js 14 frontend with Amazon branding (Ember fonts, orange/dark theme) - Job wizard, monitoring HUD, output review, admin screens - 154 TM/reference files imported, 12 locales configured - Docker Compose for all services Agents 2-5 (TM retrieval, ranker, transcreator, compliance) are stubs pending Phase 3 LLM integration. Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>
43 lines
1.3 KiB
Python
43 lines
1.3 KiB
Python
import enum
|
|
import uuid
|
|
from datetime import datetime
|
|
|
|
from sqlalchemy import DateTime, Enum, ForeignKey, Integer, Text, func
|
|
from sqlalchemy.orm import Mapped, mapped_column, relationship
|
|
|
|
from app.models.base import Base, generate_uuid
|
|
|
|
|
|
class FlagType(str, enum.Enum):
|
|
approved = "approved"
|
|
needs_revision = "needs_revision"
|
|
comment = "comment"
|
|
|
|
|
|
class Feedback(Base):
|
|
__tablename__ = "feedback"
|
|
|
|
id: Mapped[uuid.UUID] = mapped_column(
|
|
primary_key=True, default=generate_uuid
|
|
)
|
|
output_id: Mapped[uuid.UUID] = mapped_column(
|
|
ForeignKey("output_rows.id", ondelete="CASCADE"), nullable=False
|
|
)
|
|
user_id: Mapped[uuid.UUID] = mapped_column(
|
|
ForeignKey("users.id"), nullable=False
|
|
)
|
|
option_column: Mapped[int] = mapped_column(Integer, nullable=False)
|
|
flag_type: Mapped[FlagType] = mapped_column(
|
|
Enum(FlagType, name="flag_type", create_constraint=True),
|
|
nullable=False,
|
|
)
|
|
comment: Mapped[str | None] = mapped_column(Text, nullable=True)
|
|
created_at: Mapped[datetime] = mapped_column(
|
|
DateTime(timezone=True),
|
|
server_default=func.now(),
|
|
nullable=False,
|
|
)
|
|
|
|
# Relationships
|
|
output = relationship("OutputRow", back_populates="feedback")
|
|
user = relationship("User", back_populates="feedback")
|