wiseup_system_db
Tables (20)
Attendance
- att_id — bigint — Primary key — NOT NULL
- user_id — bigint — Foreign key → Student.user_id — NOT NULL
- student_id — bigint — Foreign key → Student.student_id — NOT NULL
- att_date — date — NOT NULL
- att_status — ENUM — NOT NULL
- att_reason — text
- att_checkin_time — time
- att_checkout_time — time
Class
- class_id — bigint — Primary key — NOT NULL
- subject_id — bigint — Foreign key → Subjects.subject_id — NOT NULL
- class_name — text — NOT NULL
Class_Students
- class_id — bigint — Foreign key → Class.class_id — NOT NULL
- student_id — bigint — Foreign key → Student.student_id — NOT NULL
- enrollment_date — date — NOT NULL
- status — ENUM
Exam
- exam_id — bigint — Primary key — NOT NULL
- user_id — bigint — Foreign key → Student.user_id — NOT NULL
- subject_id — bigint — Foreign key → Subjects.subject_id — NOT NULL
- exam_type_id2 — bigint — Foreign key → Exam_type.exam_type_id — NOT NULL
- student_id — bigint — Foreign key → Student.student_id — NOT NULL
- exam_score — int — NOT NULL
Exam_Results
- exam_id — bigint — Foreign key → Exam.exam_id — NOT NULL
- student_id — bigint — Foreign key → Student.student_id — NOT NULL
- score — int — NOT NULL
- max_score — int — NOT NULL
- exam_date — date — NOT NULL
Exam_type
- exam_type_id — bigint — Primary key — NOT NULL
- exam_type — varchar — NOT NULL
Notification
- noti_target_user_id — bigint — Primary key — NOT NULL
- user_id — bigint — Foreign key → User.user_id — NOT NULL
- noti_channel — varchar — NOT NULL
- noti_message — text — NOT NULL
- noti_status — ENUM — NOT NULL
Parent_student
- parent_id — bigint — Foreign key → Parents.parent_id — NOT NULL
- student_id — bigint — Foreign key → Student.student_id — NOT NULL
Parents
- parent_id — bigint — Primary key — NOT NULL
- user_id — bigint — Foreign key → User.user_id — NOT NULL
Roles
- role_id — varchar — Primary key — NOT NULL
- role_name — varchar — NOT NULL
Rooms
- room_id — varchar — Primary key — NOT NULL
- room_name — varchar — NOT NULL
- capacity — int — NOT NULL
- room_type — ENUM — NOT NULL
Schedules
- schedule_id — bigint — Primary key — NOT NULL
- user_id — bigint — Foreign key → Student.user_id — NOT NULL
- class_id — bigint — Foreign key → Class.class_id — NOT NULL
- subject_id — bigint — Foreign key → Class.subject_id — NOT NULL
- student_id — bigint — Foreign key → Student.student_id — NOT NULL
- start_date — date — NOT NULL
- end_date — date — NOT NULL
- title — varchar — NOT NULL
- description — text
- created_at — timestamp — NOT NULL
Seat_assignments
- seat_id — bigint — Foreign key → Seats.seat_id — NOT NULL
- att_id — bigint — Foreign key → Attendance.att_id — NOT NULL
- user_id — bigint — Foreign key → Attendance.user_id — NOT NULL
- student_id — bigint — NOT NULL
- assign_date — date — NOT NULL
- start_time — time — NOT NULL
- end_time — time — NOT NULL
Seats
- seat_id — bigint — Primary key — NOT NULL
- room_id — varchar — Foreign key → Rooms.room_id — NOT NULL
- pos_x — int — NOT NULL
- pos_y — int — NOT NULL
Student
- student_id — bigint — Primary key — NOT NULL
- user_id — bigint — Foreign key → User.user_id — NOT NULL
- student_name — varchar — NOT NULL
- student_target_univ — varchar
- student_photo — varchar
- student_age — varchar
- student_schoolname — varchar
Subjects
- subject_id — bigint — Primary key — NOT NULL
- subject_name — varchar — NOT NULL
Teacher
- teacher_id — bigint — Primary key — NOT NULL
- user_id — bigint — Foreign key → User.user_id — NOT NULL
- class_id — bigint — Foreign key → Class.class_id — NOT NULL
- teacher_name — varchar — NOT NULL
- teacher_subject — ENUM — NOT NULL
Teacher_Subjects
- teacher_id — bigint — Foreign key → Teacher.teacher_id — NOT NULL
- subject_id — bigint — Foreign key → Subjects.subject_id — NOT NULL
- is_primary — boolean
User
- user_id — bigint — Primary key — NOT NULL
- user_name — varchar — NOT NULL
- user_phone — varchar — NOT NULL
- user_email — varchar — NOT NULL
- user_password_hash — varchar — NOT NULL
- user_status — varchar — NOT NULL
User_roles
- user_id — bigint — Foreign key → User.user_id — NOT NULL
- role_id — varchar — Foreign key → Roles.role_id — NOT NULL