Skip to content

DB Schema

Renuka edited this page Jul 1, 2025 · 36 revisions

1. assignment

Purpose

Holds homework or tasks assigned to classes.

Key Fields

id — Unique ID

created_by — FK to user; the assigner of the assignment (e.g., teacher)

class_id, school_id — FK to class and school

lesson_id, chapter_id, course_id — FK to lesson, chapter, and course (related learning units)

starts_at, ends_at — Assignment start and end time

is_class_wise — Indicates if the assignment is for the whole class

type — Type of assignment; can be assignment or liveQuiz

source — Indicates the source, e.g., chatbot or null

firebase_id — Firebase document ID

is_firebase — Marks whether this record is from Firebase (true or false)

created_at, updated_at — Record timestamps (UTC)

is_deleted — Delete flag

2. assignment_cart

Purpose

Stores temporary lesson selections for a user before creating or saving an assignment.

Key Fields

id — Unique ID (also FK to user; ties the cart to the user)

lessons — Lessons saved in the cart (text list or JSON string)

created_at, updated_at — Record timestamps (timestamps are in UTC)

is_deleted — Delete flag

is_firebase — Marks whether this record is from Firebase (true or false)

Clone this wiki locally