Cards flow
This commit is contained in:
@@ -78,6 +78,44 @@ class StudentProgramAssignment(Base):
|
||||
title: Mapped[str] = mapped_column(String(255))
|
||||
subject: Mapped[str] = mapped_column(String(100))
|
||||
grade: Mapped[str] = mapped_column(String(50), index=True)
|
||||
start_asset_index: Mapped[int] = mapped_column(Integer, default=0)
|
||||
start_section_index: Mapped[int] = mapped_column(Integer, default=0)
|
||||
updated_at: Mapped[datetime] = mapped_column(DateTime, default=datetime.utcnow, onupdate=datetime.utcnow)
|
||||
|
||||
student = relationship("Student")
|
||||
|
||||
|
||||
class LessonSessionLog(Base):
|
||||
__tablename__ = "lesson_session_logs"
|
||||
|
||||
id: Mapped[int] = mapped_column(Integer, primary_key=True)
|
||||
student_id: Mapped[int] = mapped_column(ForeignKey("students.id"), index=True)
|
||||
lesson_id: Mapped[str] = mapped_column(String(500), index=True)
|
||||
lesson_title: Mapped[str] = mapped_column(String(255))
|
||||
started_at: Mapped[datetime] = mapped_column(DateTime, default=datetime.utcnow)
|
||||
ended_at: Mapped[datetime] = mapped_column(DateTime, default=datetime.utcnow)
|
||||
conversation: Mapped[str] = mapped_column(Text)
|
||||
card_results: Mapped[str] = mapped_column(Text)
|
||||
|
||||
student = relationship("Student")
|
||||
|
||||
|
||||
class LessonCardProgress(Base):
|
||||
__tablename__ = "lesson_card_progress"
|
||||
__table_args__ = (
|
||||
UniqueConstraint("student_id", "lesson_id", "asset_path", "section_key", name="uq_student_lesson_card"),
|
||||
)
|
||||
|
||||
id: Mapped[int] = mapped_column(Integer, primary_key=True)
|
||||
student_id: Mapped[int] = mapped_column(ForeignKey("students.id"), index=True)
|
||||
lesson_id: Mapped[str] = mapped_column(String(500), index=True)
|
||||
asset_path: Mapped[str] = mapped_column(String(500), index=True)
|
||||
asset_title: Mapped[str] = mapped_column(String(255))
|
||||
section_key: Mapped[str] = mapped_column(String(120), index=True)
|
||||
section_title: Mapped[str] = mapped_column(String(255))
|
||||
comprehension_score: Mapped[float] = mapped_column(Float, default=0.0)
|
||||
attempts: Mapped[int] = mapped_column(Integer, default=0)
|
||||
validated_at: Mapped[datetime | None] = mapped_column(DateTime, nullable=True)
|
||||
updated_at: Mapped[datetime] = mapped_column(DateTime, default=datetime.utcnow, onupdate=datetime.utcnow)
|
||||
|
||||
student = relationship("Student")
|
||||
|
||||
Reference in New Issue
Block a user