Tuter Fin

Tables (19)

assignment_submissions

  • submission_id (Key) — Primary key — NOT NULL
  • submitted_at — DATETIME
  • score — INT
  • feedback — TEXT
  • assignment_id (Key2) — Foreign key → assignments.assignment_id — NOT NULL
  • student_id (Key3) — Foreign key → students.student_id — NOT NULL

assignments

  • assignment_id (Key) — Primary key — NOT NULL
  • title — VARCHAR(100)
  • description — TEXT
  • deadline — DATETIME — NOT NULL
  • evaluation_status — ENUM('PENDING','COMPLETED')
  • created_at — TIMESTAMP
  • lesson_id (Key2) — Foreign key → lessons.lesson_id — NOT NULL
  • teacher_id (Key3) — Foreign key → teachers.teacher_id — NOT NULL

calendar_events

  • event_id (Key) — Primary key — NOT NULL
  • event_type — ENUM('LESSON','ASSIGNMENT_DEADLINE','TUITION_PAYMENT','TODO') — NOT NULL
  • title — VARCHAR(100)
  • start_time — DATETIME — NOT NULL
  • end_time — DATETIME
  • description — TEXT
  • user_id (Key2) — Foreign key → users.user_id — NOT NULL

channel_invites

  • invite_id (Key) — Primary key — NOT NULL
  • invited_email — VARCHAR(100) — NOT NULL
  • invited_role — ENUM('STUDENT','PARENT') — NOT NULL
  • invited_at — TIMESTAMP
  • channel_id (Key2) — Foreign key → channels.channel_id — NOT NULL

channels

  • channel_id (Key) — Primary key — NOT NULL
  • student_name — VARCHAR(50) — NOT NULL
  • school_name — VARCHAR(100)
  • subject_name — VARCHAR(50)
  • tuition_due_date — DATE
  • created_at — TIMESTAMP
  • teacher_id (Key2) — Foreign key → teachers.teacher_id — NOT NULL

chat_message_reads

  • message_id (Key) — Foreign key → chat_messages.message_id — NOT NULL
  • user_id (Key2) — Foreign key → users.user_id — NOT NULL
  • read_at — TIMESTAMP

chat_messages

  • message_id (Key) — Primary key — NOT NULL
  • sender_id (Field)
  • content — TEXT
  • file_path — VARCHAR(255)
  • sent_at — TIMESTAMP
  • room_id (Key2) — Foreign key → chat_rooms.room_id — NOT NULL

chat_participants

  • room_id (Key) — Foreign key → chat_rooms.room_id — NOT NULL
  • user_id (Key2) — Foreign key → users.user_id — NOT NULL

chat_rooms

  • room_id (Key) — Primary key — NOT NULL
  • created_at — TIMESTAMP

lesson_attendance

  • attendance_id (Key) — Primary key — NOT NULL
  • status — ENUM('PRESENT','ABSENT') — NOT NULL
  • marked_at — TIMESTAMP
  • lesson_id (Key2) — Foreign key → lessons.lesson_id — NOT NULL
  • student_id (Key3) — Foreign key → students.student_id — NOT NULL

lesson_materials

  • material_id (Key) — Primary key — NOT NULL
  • uploaded_by_teacher_id — INT — NOT NULL
  • file_path — VARCHAR(255) — NOT NULL
  • uploaded_at — TIMESTAMP
  • lesson_id (Key2) — Foreign key → lessons.lesson_id — NOT NULL

lessons

  • lesson_id (Key) — Primary key — NOT NULL
  • title — VARCHAR(100)
  • lesson_date — DATE — NOT NULL
  • start_time — TIME — NOT NULL
  • end_time — TIME
  • location — VARCHAR(100)
  • channel_id (Key2) — Foreign key → channels.channel_id — NOT NULL
  • student_id (Key3) — Foreign key → students.student_id — NOT NULL

parents

  • parent_id (Key) — Primary key — NOT NULL
  • child_school_level — VARCHAR(50)
  • child_grade — INT

student_scores

  • score_id (Key) — Primary key — NOT NULL
  • subject — VARCHAR(100) — NOT NULL
  • score_value — INT — NOT NULL
  • created_at — TIMESTAMP
  • student_id (Key2) — Foreign key → students.student_id — NOT NULL

students

  • student_id (Key) — Primary key — NOT NULL
  • school_name — VARCHAR(100)
  • grade — INT
  • subjects — VARCHAR(255)

teachers

  • teacher_id (Key) — Primary key — NOT NULL
  • university — VARCHAR(100)
  • subjects — VARCHAR(255)

todos

  • todo_id (Key) — Primary key — NOT NULL
  • content — VARCHAR(255) — NOT NULL
  • tag — VARCHAR(50)
  • status — ENUM('PENDING','COMPLETED')
  • created_at — TIMESTAMP
  • user_id (Key2) — Foreign key → users.user_id — NOT NULL

user_notifications

  • notification_id (Key) — Primary key — NOT NULL
  • type — ENUM('GENERAL','ASSIGNMENT','LESSON','CHAT','PAYMENT') — NOT NULL
  • message — VARCHAR(255) — NOT NULL
  • is_read — BOOLEAN
  • created_at — TIMESTAMP
  • user_id (Key2) — Foreign key → users.user_id — NOT NULL

users

  • user_id (Key) — Primary key — NOT NULL
  • email — VARCHAR(100) — NOT NULL
  • password — VARCHAR(255) — NOT NULL
  • full_name — VARCHAR(50) — NOT NULL
  • role — ENUM('STUDENT','TEACHER','PARENT') — NOT NULL
  • created_at — TIMESTAMP
  • updated_at — TIMESTAMP
  • student_id (Key2) — Foreign key → students.student_id — NOT NULL
  • teacher_id (Key3) — Foreign key → teachers.teacher_id — NOT NULL
  • parent_id (Key4) — Foreign key → parents.parent_id — NOT NULL
  • message_id (Key5) — Foreign key → chat_messages.message_id — NOT NULL