wiseup_system_db_gpt
Tables (17)
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
- att_date — date
- att_status — ENUM
- 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
Exam
- 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
- exam_id — bigint
- student_id — bigint — Foreign key → Student.student_id
- exam_score — int
Exam_type
- exam_type_id — bigint — Primary key — NOT NULL
- exam_type — varchar
Notification
- noti_target_user_id — bigint — Primary key — NOT NULL
- user_id — bigint — Foreign key → User.user_id — NOT NULL
- noti_channel — varchar
- noti_message — text
- noti_status — ENUM
Parent_student
- parent_id — bigint — Foreign key → Parents.parent_id — NOT NULL
- student_id — bigint — Foreign key → Student.student_id
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
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
- start_date — date
- end_date — date
- title — varchar
- description — text
- create_at — timestemp
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 — Foreign key → Attendance.student_id
- assign_date — date
- start_time — time
- end_time — time
Seats
- seat_id — bigint — Primary key — NOT NULL
- room_id — varchar
- pos_x — int
- pos_y — int
Student
- user_id — bigint — Foreign key → User.user_id — NOT NULL
- student_id — bigint
- student_name — varchar
- student_target_univ — varchar
- student_photo — varchar
- student_age — varchar
- student_schoolname — varchar
Subjects
- subject_id — bigint — Primary key — NOT NULL
- subject_name — varchar
Teacher
- user_id — bigint — Foreign key → User.user_id — NOT NULL
- class_id — bigint — Foreign key → Class.class_id — NOT NULL
- teacher_id — bigint
- teacher_name — varchar
- teacher_subject — ENUM
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
- user_phone — varchar
- user_email — varchar
- user_password_hash — varchar
- user_status — varchar
User_roles
- user_id — bigint — Foreign key → User.user_id — NOT NULL
- role_id — varchar — Foreign key → Roles.role_id — NOT NULL