Tuter
Tables (16)
attendances
- attendance_id (Key) — Primary key — NOT NULL
- attended — BOOLEAN
- checked_at — TIMESTAMP
- lesson_id (Key2) — Foreign key → lessons.lesson_id — NOT NULL
- user_id (Key3) — Foreign key → users.user_id — NOT NULL
chat_channels
- channel_id (Key) — Primary key — NOT NULL
- name — VARCHAR(100)
- created_at — TIMESTAMP
- subject_id (Key2) — Foreign key → subjects.subject_id — NOT NULL
chat_messages
- message_id (Key) — Primary key — NOT NULL
- sender_id — INT
- message — TEXT
- sent_at — TIMESTAMP
- is_read — BOOLEAN
- channel_id (Key2) — Foreign key → chat_channels.channel_id — NOT NULL
chat_participants
- chat_participants_id (Key) — Primary key — NOT NULL
- channel_id (Key2) — Foreign key → chat_channels.channel_id — NOT NULL
- user_id (Key3) — Foreign key → users.user_id — NOT NULL
files
- file_id (Key) — Primary key — NOT NULL
- uploader_id — INT
- file_url — VARCHAR(255)
- file_name — VARCHAR(100)
- uploaded_at — TIMESTAMP
- lesson_id (Key2) — Foreign key → lessons.lesson_id — NOT NULL
lessons
- lesson_id (Key) — Primary key — NOT NULL
- title — VARCHAR(100)
- start_time — TIMESTAMP
- end_time — TIMESTAMP
- location — VARCHAR(100)
- status — VARCHAR(20)
- teacher_id (Key2) — Foreign key → teachers.teacher_id — NOT NULL
- student_id (Key3) — Foreign key → students.student_id — NOT NULL
- subject_id (Key4) — Foreign key → subjects.subject_id — NOT NULL
notifications
- notification_id (Key) — Primary key — NOT NULL
- message — VARCHAR(255)
- type — VARCHAR(50)
- is_read — BOOLEAN
- created_at — TIMESTAMP
- user_id (Key2) — Foreign key → users.user_id — NOT NULL
parent_student_links
- parent_student_links_id (Key) — Primary key — NOT NULL
- student_id (Key3) — Foreign key → students.student_id — NOT NULL
- parent_id (Key2) — Foreign key → parents.parent_id — NOT NULL
parents
- parent_id (Key) — Primary key — NOT NULL
- occupation — VARCHAR(100)
- relation — VARCHAR(20)
payments
- payment_id (Key) — Primary key — NOT NULL
- payer_id — INT
- receiver_id — INT
- amount — DECIMAL(10,2)
- paid_at — TIMESTAMP
- status — VARCHAR(20)
reviews
- review_id (Key) — Primary key — NOT NULL
- reviewer_id — INT
- target_id — INT
- rating — INT
- comment — TEXT — EX
- created_at — TIMESTAMP
- lesson_id (Key2) — Foreign key → lessons.lesson_id — NOT NULL
students
- student_id (Key) — Primary key — NOT NULL
- school_name — VARCHAR(100)
- grade — INT
subjects
- subject_id (Key) — Primary key — NOT NULL
- name — VARCHAR(100)
teachers
- teacher_id (Key) — Primary key — NOT NULL
- university — VARCHAR(100)
- subject_specialty — VARCHAR(100)
- experience_years — INT
todos
- todo_id (Key) — Primary key — NOT NULL
- teacher_id — INT
- title — VARCHAR(100)
- due_date — DATE
- priority — VARCHAR(20)
- completed — BOOLEAN
- created_at — TIMESTAMP
- student_id (Key2) — Foreign key → students.student_id — NOT NULL
- teacher_id (Key3) — Foreign key → teachers.teacher_id — NOT NULL
- subject_id (Key4) — Foreign key → subjects.subject_id — NOT NULL
users
- user_id (Key) — Primary key — NOT NULL
- name — VARCHAR(100)
- email — VARCHAR(100)
- password — VARCHAR(100)
- phone — VARCHAR(20)
- role — VARCHAR(20)
- created_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