Full-stack application for predicting where humans look in images using DeepGaze saliency models. Includes heatmap overlays, gaze sequence prediction, hotspot detection, AOI analysis, rule-based insights, optional Claude AI design analysis, and professional PDF report generation. Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>
27 lines
996 B
Python
27 lines
996 B
Python
import uuid
|
|
from datetime import datetime
|
|
|
|
from sqlalchemy import String, Text, func
|
|
from sqlalchemy.orm import Mapped, mapped_column, relationship
|
|
|
|
from app.models.base import Base
|
|
|
|
|
|
class Project(Base):
|
|
__tablename__ = "projects"
|
|
|
|
id: Mapped[str] = mapped_column(
|
|
String(36), primary_key=True, default=lambda: str(uuid.uuid4())
|
|
)
|
|
user_id: Mapped[str] = mapped_column(String(36), index=True)
|
|
name: Mapped[str] = mapped_column(String(255))
|
|
description: Mapped[str | None] = mapped_column(Text, nullable=True)
|
|
created_at: Mapped[datetime] = mapped_column(server_default=func.now())
|
|
updated_at: Mapped[datetime] = mapped_column(server_default=func.now(), onupdate=func.now())
|
|
|
|
analyses: Mapped[list["Analysis"]] = relationship( # noqa: F821
|
|
back_populates="project", cascade="all, delete-orphan"
|
|
)
|
|
comparisons: Mapped[list["Comparison"]] = relationship( # noqa: F821
|
|
back_populates="project", cascade="all, delete-orphan"
|
|
)
|