Web_Attendance
Tables (14)
appeals
- id — BIGINT
- attendance_id — BIGINT — NOT NULL
- student_id — BIGINT — NOT NULL
- reason — TEXT — NOT NULL
- status — ENUM('PENDING', 'APPROVED', 'REJECTED') — NOT NULL
- reviewer_id — BIGINT
- response — TEXT
- created_at — DATETIME — NOT NULL
- updated_at — DATETIME
- INDEX — idx_student_status
- INDEX — idx_attendance
- INDEX — idx_status
attendances
- id — BIGINT
- session_id — BIGINT — NOT NULL
- student_id — BIGINT — NOT NULL
- status — ENUM('PENDING', 'PRESENT', 'LATE', 'ABSENT', 'EXCUSED') — NOT NULL
- checked_at — DATETIME
- note — VARCHAR(500)
- is_modified — BOOLEAN — NOT NULL
- created_at — DATETIME — NOT NULL
- updated_at — DATETIME
- INDEX — idx_student_status
- INDEX — idx_session_status
- INDEX — idx_checked_at
audit_logs
- id — BIGINT
- actor_id — BIGINT — NOT NULL
- action — VARCHAR(50) — NOT NULL
- target_type — VARCHAR(50) — NOT NULL
- target_id — BIGINT — NOT NULL
- before_value — TEXT
- after_value — TEXT
- description — TEXT
- ip_address — VARCHAR(50)
- user_agent — VARCHAR(500)
- created_at — DATETIME — NOT NULL
- updated_at — DATETIME
- INDEX — idx_target
- INDEX — idx_actor
- INDEX — idx_created
class_sessions
- id — BIGINT
- course_id — BIGINT — NOT NULL
- week_number — INT — NOT NULL
- session_number — INT — NOT NULL
- start_at — DATETIME — NOT NULL
- end_at — DATETIME — NOT NULL
- room — VARCHAR(50)
- attendance_method — ENUM('ELECTRONIC', 'PIN_CODE', 'ROLL_CALL') — NOT NULL
- status — ENUM('SCHEDULED', 'OPEN', 'PAUSED', 'CLOSED') — NOT NULL
- pin_code — VARCHAR(10)
- opened_at — DATETIME
- closed_at — DATETIME
- created_at — DATETIME — NOT NULL
- updated_at — DATETIME
- INDEX — idx_course_week
- INDEX — idx_course_status
- INDEX — idx_start_at
course_notices
- id — BIGINT
- course_id — BIGINT — NOT NULL
- author_id — BIGINT — NOT NULL
- title — VARCHAR(200) — NOT NULL
- content — TEXT — NOT NULL
- is_pinned — BOOLEAN — NOT NULL
- created_at — DATETIME — NOT NULL
- updated_at — DATETIME
- INDEX — idx_course_pinned
- INDEX — idx_author
courses
- id — BIGINT
- code — VARCHAR(20) — NOT NULL
- title — VARCHAR(100) — NOT NULL
- section — VARCHAR(20)
- instructor_id — BIGINT — NOT NULL
- semester_id — BIGINT — NOT NULL
- department — VARCHAR(50)
- credits — INT — NOT NULL
- room — VARCHAR(50)
- schedule — VARCHAR(100)
- description — TEXT
- created_at — DATETIME — NOT NULL
- updated_at — DATETIME
- INDEX — idx_instructor_semester
- INDEX — idx_semester
- INDEX — idx_code
enrollments
- id — BIGINT
- student_id — BIGINT — NOT NULL
- course_id — BIGINT — NOT NULL
- is_active — BOOLEAN — NOT NULL
- created_at — DATETIME — NOT NULL
- updated_at — DATETIME
- INDEX — idx_student
- INDEX — idx_course
excuse_requests
- id — BIGINT
- session_id — BIGINT — NOT NULL
- student_id — BIGINT — NOT NULL
- reason_code — VARCHAR(50) — NOT NULL
- reason_detail — TEXT — NOT NULL
- status — ENUM('PENDING', 'APPROVED', 'REJECTED') — NOT NULL
- reviewer_id — BIGINT
- review_comment — TEXT — EX
- created_at — DATETIME — NOT NULL
- updated_at — DATETIME
- INDEX — idx_student_status
- INDEX — idx_session
- INDEX — idx_status
file_attachments
- id — BIGINT
- original_filename — VARCHAR(255) — NOT NULL
- stored_filename — VARCHAR(255) — NOT NULL
- file_path — VARCHAR(500) — NOT NULL
- file_size — BIGINT — NOT NULL
- content_type — VARCHAR(100) — NOT NULL
- excuse_request_id — BIGINT
- uploaded_by — BIGINT — NOT NULL
- created_at — DATETIME — NOT NULL
- updated_at — DATETIME
- INDEX — idx_excuse_request
- INDEX — idx_uploaded_by
notifications
- id — BIGINT
- user_id — BIGINT — NOT NULL
- type — ENUM('SESSION_OPEN', 'SESSION_CLOSE', 'EXCUSE_RESULT', 'APPEAL_RESULT', 'COURSE_NOTICE', 'POLL_CREATED', 'ABSENCE_WARNING') — NOT NULL
- title — VARCHAR(200) — NOT NULL
- message — TEXT — NOT NULL
- url — VARCHAR(500)
- is_read — BOOLEAN — NOT NULL
- read_at — DATETIME
- created_at — DATETIME — NOT NULL
- updated_at — DATETIME
- INDEX — idx_user_read
- INDEX — idx_created
poll_votes
- id — BIGINT
- poll_id — BIGINT — NOT NULL
- voter_id — BIGINT — NOT NULL
- approve — BOOLEAN — NOT NULL
- comment — VARCHAR(500) — ARCHAR(500
- created_at — DATETIME — NOT NULL
- updated_at — DATETIME
- INDEX — idx_poll
- INDEX — idx_voter
polls
- id — BIGINT
- course_id — BIGINT — NOT NULL
- creator_id — BIGINT — NOT NULL
- title — VARCHAR(200) — NOT NULL
- description — TEXT
- start_at — DATETIME — NOT NULL
- end_at — DATETIME — NOT NULL
- is_active — BOOLEAN — NOT NULL
- created_at — DATETIME — NOT NULL
- updated_at — DATETIME
- INDEX — idx_course
- INDEX — idx_creator
- INDEX — idx_active
semesters
- id — BIGINT
- name — VARCHAR(50) — NOT NULL
- academic_year — INT — NOT NULL
- semester_number — INT — NOT NULL
- start_date — DATE — NOT NULL
- end_date — DATE — NOT NULL
- created_at — DATETIME — NOT NULL
- updated_at — DATETIME
- INDEX — idx_year_semester
users
- id — BIGINT
- username — VARCHAR(50) — NOT NULL
- password — VARCHAR(255) — NOT NULL
- name — VARCHAR(100) — NOT NULL
- email — VARCHAR(100) — NOT NULL
- role — ENUM('ADMIN', 'INSTRUCTOR', 'STUDENT') — NOT NULL
- student_id — VARCHAR(50)
- department — VARCHAR(50)
- phone_number — VARCHAR(20)
- is_active — BOOLEAN — NOT NULL
- created_at — DATETIME — NOT NULL
- updated_at — DATETIME
- INDEX — idx_role
- INDEX — idx_department