통합
테이블 (17)
attendances
- attendance_id — BIGINT — NOT NULL
- session_id — BIGINT — 외래 키 → course_sessions.session_id — NOT NULL
- user_id — BIGINT — 외래 키 → users.user_id — NOT NULL
- status — ENUM('PRESENT', 'LATE', 'ABSENT')
- tagged_at — TIMESTAMP
- qr_code_value — VARCHAR(255)
bookings
- booking_id — BIGINT — NOT NULL
- user_id — BIGINT — 외래 키 → users.user_id — NOT NULL
- session_id — BIGINT — 외래 키 → course_sessions.session_id — NOT NULL
- status — ENUM('PENDING_PAYMENT', 'CONFIRMED', 'CANCELLED', 'REFUNDED')
- payment_deadline — TIMESTAMP
- created_at — TIMESTAMP
categories
- category_id — BIGINT — NOT NULL
- name — VARCHAR(50) — NOT NULL
chat_rooms
- room_id — BIGINT — NOT NULL
- course_id — BIGINT — 외래 키 → courses.course_id — NOT NULL
- student_id — BIGINT — 외래 키 → users.user_id — NOT NULL
- instructor_id — BIGINT — 외래 키 → users.user_id — NOT NULL
- created_at — TIMESTAMP
course_logs
- log_id — BIGINT — NOT NULL
- user_id — BIGINT — 외래 키 → users.user_id — NOT NULL
- course_id — BIGINT — 외래 키 → courses.course_id — NOT NULL
- total_sessions — INT
- attended_sessions — INT
- progress_rate — INT
- last_accessed_at — TIMESTAMP
course_sessions
- session_id — BIGINT — NOT NULL
- course_id — BIGINT — 외래 키 → courses.course_id — NOT NULL
- start_at — TIMESTAMP — NOT NULL
- end_at — TIMESTAMP — NOT NULL
- max_capacity — INT — NOT NULL
- current_count — INT
courses
- course_id — BIGINT — NOT NULL
- instructor_id — BIGINT — 외래 키 → users.user_id — NOT NULL
- category_id — BIGINT — 외래 키 → categories.category_id — NOT NULL
- title — VARCHAR(200) — NOT NULL
- description — TEXT
- price — DECIMAL(10, 2) — NOT NULL
- open_at — TIMESTAMP — NOT NULL
- status — ENUM('PREPARING', 'OPEN', 'CLOSED')
- created_at — TIMESTAMP
follows
- follow_id — BIGINT — NOT NULL
- student_id — BIGINT — 외래 키 → users.user_id — NOT NULL
- instructor_id — BIGINT — 외래 키 → users.user_id — NOT NULL
- created_at — TIMESTAMP
memberships
- membership_id — BIGINT — NOT NULL
- user_id — BIGINT — 외래 키 → users.user_id — NOT NULL
- type — VARCHAR(50)
- status — ENUM('ACTIVE', 'EXPIRED')
- expired_at — TIMESTAMP
notifications
- notice_id — BIGINT — NOT NULL
- user_id — BIGINT — 외래 키 → users.user_id — NOT NULL
- type — ENUM('RESERVATION', 'WAITING', 'REMIND', 'CANCEL', 'PROMOTION') — NOT NULL
- message — TEXT — NOT NULL
- is_read — BOOLEAN
- created_at — TIMESTAMP
onboarding
- onboarding_id — BIGINT — NOT NULL
- user_id — BIGINT — 외래 키 → users.user_id — NOT NULL
- goal — TEXT
- level — ENUM('BEGINNER', 'INTERMEDIATE', 'ADVANCED')
- interest_category_id — BIGINT
- updated_at — TIMESTAMP
payments
- payment_id — BIGINT — NOT NULL
- booking_id — BIGINT — 외래 키 → bookings.booking_id — NOT NULL
- imp_uid — VARCHAR(100) — NOT NULL
- merchant_uid — VARCHAR(100) — NOT NULL
- amount — DECIMAL(10, 2) — NOT NULL
- status — ENUM('READY', 'PAID', 'CANCELLED', 'FAILED')
- paid_at — TIMESTAMP
qna
- qna_id — BIGINT — NOT NULL
- course_id — BIGINT — 외래 키 → courses.course_id — NOT NULL
- user_id — BIGINT — 외래 키 → users.user_id — NOT NULL
- question — TEXT — NOT NULL
- answer — TEXT
- is_answered — BOOLEAN
- created_at — TIMESTAMP
refunds
- refund_id — BIGINT — NOT NULL
- payment_id — BIGINT — 외래 키 → payments.payment_id — NOT NULL
- reason — TEXT
- refund_amount — DECIMAL(10, 2) — NOT NULL
- refunded_at — TIMESTAMP
- status — ENUM('PENDING', 'COMPLETED', 'REJECTED')
reviews
- review_id — BIGINT — NOT NULL
- course_id — BIGINT — 외래 키 → courses.course_id — NOT NULL
- user_id — BIGINT — 외래 키 → users.user_id — NOT NULL
- rating — INT — NOT NULL
- content — TEXT
- summary — TEXT
- created_at — TIMESTAMP
users
- user_id — BIGINT — NOT NULL
- email — VARCHAR(100) — NOT NULL
- password — VARCHAR(255)
- name — VARCHAR(50) — NOT NULL
- role — ENUM('STUDENT', 'INSTRUCTOR', 'ADMIN') — NOT NULL
- social_provider — ENUM('LOCAL', 'GOOGLE', 'KAKAO')
- social_id — VARCHAR(255)
- created_at — TIMESTAMP
waiting_lines
- waiting_id — BIGINT — NOT NULL
- user_id — BIGINT — 외래 키 → users.user_id — NOT NULL
- session_id — BIGINT — 외래 키 → course_sessions.session_id — NOT NULL
- waiting_number — INT — NOT NULL
- status — ENUM('WAITING', 'PROMOTED', 'EXPIRED')
- created_at — TIMESTAMP