수업관리
테이블 (23)
class_feedback
- id — bigint — 기본 키 — NOT NULL
- class_session_id — bigint — 외래 키 → class_sessions.id — NOT NULL
- created_at — datetime(6)
- survey_form_id — bigint — 외래 키 → survey_forms.id — NOT NULL
class_sessions
- id — bigint — 기본 키 — NOT NULL
- duration_minutes — int — NOT NULL
- is_settled — tinyint(1) — NOT NULL
- teacher_pay_rate_snapshot — decimal(10,2)
- course_contract_id — bigint — 외래 키 → course_contracts.id — NOT NULL
- session_start_at — datetime(6) — NOT NULL
- settlement_id — bigint — 외래 키 → settlements.id
- teacher_id — bigint — 외래 키 → leaders.user_id — NOT NULL
- status — enum('CANCELED','COMPLETED','PENDING','SCHEDULED')
consultation_logs
- consultation_log_id — bigint — 기본 키 — NOT NULL
- author_user_id — bigint — 외래 키 → users.id
- created_at — timestamp — NOT NULL
- deleted_at — datetime(6)
- subject_user_id — bigint — 외래 키 → users.id — NOT NULL
- updated_at — timestamp — NOT NULL
- content — tinytext — NOT NULL
consultation_requests
- id — bigint — 기본 키 — NOT NULL
- desired_end_date — date
- desired_start_date — date
- desired_total_hours — int
- created_at — datetime(6)
- created_course_contract_id — bigint — 외래 키 → course_contracts.id
- title — varchar(255) — NOT NULL
- status — enum('CANCELED','CONFIRMED','DRAFT','PENDING_STUDENT','PENDING_TEACHERS') — NOT NULL
- student_request_details — longtext
consultation_students
- student_id — bigint — 외래 키 → students.user_id — NOT NULL
- consultation_request_id — bigint — 외래 키 → consultation_requests.id — NOT NULL
contract_leader_rates
- id — bigint — 기본 키 — NOT NULL
- hourly_pay_rate — decimal(10,2) — NOT NULL
- course_contract_id — bigint — 외래 키 → course_contracts.id — NOT NULL
- leader_id — bigint — 외래 키 → leaders.user_id — NOT NULL
contract_students
- student_id — bigint — 외래 키 → students.user_id — NOT NULL
- course_contract_id — bigint — 외래 키 → course_contracts.id — NOT NULL
course_contracts
- id — bigint — 기본 키 — NOT NULL
- bonus_hours — int — NOT NULL
- completed_session_count — int — NOT NULL
- total_contract_price — decimal(10,2)
- total_hours_purchased — int — NOT NULL
- total_sessions — int — NOT NULL
- contracted_at — datetime(6)
- parent_contract_id — bigint — 외래 키 → course_contracts.id
- contract_name — varchar(150) — NOT NULL
feedback_answers
- id — bigint — 기본 키 — NOT NULL
- rating_value — int
- class_feedback_id — bigint — 외래 키 → class_feedback.id — NOT NULL
- survey_question_id — bigint — 외래 키 → survey_questions.id — NOT NULL
- text_value — longtext
jwt_token
- id — bigint — 기본 키 — NOT NULL
- account_id — bigint — NOT NULL
- created_at — datetime(6)
- deleted_at — datetime(6)
- expired_at — datetime(6)
- access_token — varchar(2048)
- agent — text
leader_availability_slots
- day_of_week — enum('FRIDAY','MONDAY','SATURDAY','SUNDAY','THURSDAY','TUESDAY','WEDNESDAY') — 기본 키 — NOT NULL
- hour_of_day — int — 기본 키 — NOT NULL
- leader_id — bigint — 외래 키 → leaders.user_id — NOT NULL
leader_languages
- leader_id — bigint — 외래 키 → leaders.user_id — NOT NULL
- language — enum('CHINESE','ENGLISH','ETC','JAPANESE','KOREAN')
leader_proposals (teacher_proposals)
- id — bigint — 기본 키 — NOT NULL
- proposed_end_date — date
- proposed_hourly_rate — decimal(10,2)
- proposed_start_date — date
- proposed_total_hours — int
- consultation_request_id — bigint — 외래 키 → consultation_requests.id — NOT NULL
- leader_id — bigint — 외래 키 → leaders.user_id — NOT NULL
- status — enum('SENT_TO_TEACHER','STUDENT_APPROVED','STUDENT_REJECTED','TEACHER_ACCEPTED','TEACHER_MODIFIED','TEACHER_REJECTED') — NOT NULL
- teacher_comments — longtext
leader_studies
- leader_id — bigint — 외래 키 → leaders.user_id — NOT NULL
- study_type — enum('APP','BASIC','CONVERSATION','ETC','PRONUNCIATION','TOPIK')
leaders
- user_id — bigint — 외래 키 → users.id — NOT NULL
- availability_end_date — date
- availability_start_date — date
- languages_etc — varchar(500)
- studies_etc — varchar(500)
- account_holder — varchar(255)
- bank_account — varchar(255)
- bank_name — varchar(255)
- detail — varchar(255)
- id_number — varchar(255)
- street — varchar(255)
- zipcode — varchar(255)
- scope — enum('ALL','OFFLINE','ONLINE')
settlements
- id — bigint — 기본 키 — NOT NULL
- total_amount — decimal(12,2) — NOT NULL
- completed_at — datetime(6)
- leader_id — bigint — 외래 키 → leaders.user_id — NOT NULL
- requested_at — datetime(6) — NOT NULL
- status — enum('COMPLETED','PROCESSING','REJECTED','REQUESTED') — NOT NULL
student_difficult_parts
- student_id — bigint — 외래 키 → students.user_id — NOT NULL
- part — enum('ETC','GRAMMAR','LISTENING','PRONUNCIATION','READING','SPEAKING','WRITING')
students
- user_id — bigint — 외래 키 → users.id — NOT NULL
- status — tinyint
- difficult_etc — varchar(500)
- name — varchar(255)
- native_name — varchar(255)
- age_group — enum('EARLY_20S','EARLY_30S','LATE_20S','LATE_30S','MID_20S','MID_30S','OVER_40S','TEENS')
- study_period — enum('BETWEEN_1_2_YEARS','BETWEEN_2_3_YEARS','BETWEEN_3_4_YEARS','OVER_4_YEARS','UNDER_1_YEAR')
- topik_level — enum('INTRO','LEVEL_1','LEVEL_2','LEVEL_3','LEVEL_4','LEVEL_5','LEVEL_6','NONE')
survey_forms
- id — bigint — 기본 키 — NOT NULL
- is_active — bit(1) — NOT NULL
- title — varchar(150) — NOT NULL
survey_question_options
- id — bigint — 기본 키 — NOT NULL
- display_order — int — NOT NULL
- survey_question_id — bigint — 외래 키 → survey_questions.id — NOT NULL
- option_text — varchar(500) — NOT NULL
survey_questions
- id — bigint — 기본 키 — NOT NULL
- display_order — int — NOT NULL
- max_rating — int
- survey_form_id — bigint — 외래 키 → survey_forms.id — NOT NULL
- question_text — varchar(255) — NOT NULL
- question_type — enum('MULTIPLE_CHOICE_SINGLE','RATING','RATING_WITH_OTHER','TEXT') — NOT NULL
user_contact
- id — bigint — 기본 키 — NOT NULL
- user_id — bigint — 외래 키 → users.id
- contact_value — varchar(255) — NOT NULL
- contact_type — enum('EMAIL','KAKAO','LINE','PHONE','WECHAT') — NOT NULL
users
- id — bigint — 기본 키 — NOT NULL
- gender — tinyint
- user_type — tinyint
- created_at — timestamp — NOT NULL
- deleted_at — datetime(6)
- updated_at — timestamp — NOT NULL
- login_id — varchar(255)
- nationality — varchar(255)
- password — varchar(255)