test

Tables (28)

amenities

  • amenity_id — BIGINT — Primary key — NOT NULL
  • name — VARCHAR(100) — NOT NULL
  • category — VARCHAR(50)
  • icon — VARCHAR(500)

guesthouse_amenities

  • amenity_id — BIGINT — Primary key — NOT NULL
  • guesthouse_id — BIGINT — Foreign key → guesthouses.guesthouse_id — NOT NULL

guesthouse_images

  • image_id — BIGINT — Primary key — NOT NULL
  • guesthouse_id — BIGINT — Foreign key → guesthouses.guesthouse_id — NOT NULL
  • image_url — VARCHAR(500) — NOT NULL
  • image_type — VARCHAR(50)
  • sort_order — INT

guesthouses

  • guesthouse_id — BIGINT — Primary key — NOT NULL
  • name — VARCHAR(255) — NOT NULL
  • description — TEXT
  • address — VARCHAR(255)
  • detail_address — VARCHAR(255)
  • region — VARCHAR(100)
  • latitude — DECIMAL(10, 7)
  • longitude — DECIMAL(11, 7)
  • phone — VARCHAR(30)
  • check_in_time — TIME
  • check_out_time — TIME
  • quiet_hours_start — TIME
  • quiet_hours_end — TIME
  • status — VARCHAR(50)
  • created_at — DATETIME
  • updated_at — DATETIME

inquiries

  • inquiry_id — BIGINT — Primary key — NOT NULL
  • user_id — BIGINT — Foreign key → users.user_id — NOT NULL
  • reservation_id — BIGINT
  • category — VARCHAR(50)
  • title — VARCHAR(255)
  • content — TEXT
  • status — VARCHAR(50)
  • created_at — DATETIME

inquiry_answers

  • answer_id — BIGINT — Primary key — NOT NULL
  • inquiry_id — BIGINT — Foreign key → inquiries.inquiry_id — NOT NULL
  • admin_id — BIGINT — NOT NULL
  • content — TEXT
  • created_at — DATETIME

meditation_programs

  • program_id — BIGINT — Primary key — NOT NULL
  • guesthouse_id — BIGINT — Foreign key → guesthouses.guesthouse_id — NOT NULL
  • title — VARCHAR(255) — NOT NULL
  • description — TEXT
  • program_type — VARCHAR(50)
  • duration_minutes — INT
  • difficulty — VARCHAR(50)
  • image_url — VARCHAR(500)
  • status — VARCHAR(50)

meditation_schedules

  • schedule_id — BIGINT — Primary key — NOT NULL
  • program_id — BIGINT — Foreign key → meditation_programs.program_id — NOT NULL
  • space_id — BIGINT — NOT NULL
  • start_at — DATETIME
  • end_at — DATETIME
  • capacity — INT
  • status — VARCHAR(50)

noise_devices

  • device_id — BIGINT — Primary key — NOT NULL
  • space_id — BIGINT — Foreign key → spaces.space_id — NOT NULL
  • device_code — VARCHAR(100) — NOT NULL
  • device_name — VARCHAR(255)
  • status — VARCHAR(50)
  • installed_at — DATETIME
  • last_connected_at — DATETIME

payments

  • payment_id — BIGINT — Primary key — NOT NULL
  • reservation_id — BIGINT — Foreign key → reservations.reservation_id — NOT NULL
  • payment_method — VARCHAR(50)
  • amount — INT
  • status — VARCHAR(50)
  • payment_key — VARCHAR(255)
  • paid_at — DATETIME
  • canceled_at — DATETIME
  • refund_amount — INT

program_applications

  • application_id — BIGINT — Primary key — NOT NULL
  • schedule_id — BIGINT — Foreign key → meditation_schedules.schedule_id — NOT NULL
  • user_id — BIGINT — NOT NULL
  • reservation_id — BIGINT
  • status — VARCHAR(50)
  • applied_at — DATETIME
  • canceled_at — DATETIME

program_reviews

  • review_id — BIGINT — Primary key — NOT NULL
  • application_id — BIGINT — Foreign key → program_applications.application_id — NOT NULL
  • user_id — BIGINT — NOT NULL
  • program_id — BIGINT — NOT NULL
  • rating — INT
  • content — TEXT
  • status — VARCHAR(50)
  • created_at — DATETIME
  • updated_at — DATETIME

quietness_measurements

  • measurement_id — BIGINT — Primary key — NOT NULL
  • device_id — BIGINT — Foreign key → noise_devices.device_id — NOT NULL
  • space_id — BIGINT — NOT NULL
  • decibel — DECIMAL(6, 2)
  • quiet_score — INT
  • quiet_level — VARCHAR(50)
  • measured_at — DATETIME

quietness_thresholds

  • threshold_id — BIGINT — Primary key — NOT NULL
  • guesthouse_id — BIGINT — Foreign key → guesthouses.guesthouse_id — NOT NULL
  • level — VARCHAR(50)
  • min_db — DECIMAL(6, 2)
  • max_db — DECIMAL(6, 2)
  • label — VARCHAR(100)
  • score_min — INT
  • score_max — INT

reservations

  • reservation_id — BIGINT — Primary key — NOT NULL
  • reservation_number — VARCHAR(100) — NOT NULL
  • user_id — BIGINT — Foreign key → users.user_id — NOT NULL
  • room_id — BIGINT — NOT NULL
  • room_unit_id — BIGINT
  • check_in_date — DATE
  • check_out_date — DATE
  • guest_count — INT
  • guest_name — VARCHAR(100)
  • guest_phone — VARCHAR(30)
  • total_price — INT
  • status — VARCHAR(50)
  • special_request — TEXT
  • created_at — DATETIME
  • canceled_at — DATETIME

room_equipment_mappings

  • equipment_id — BIGINT — Primary key — NOT NULL
  • room_id — BIGINT — Foreign key → rooms.room_id — NOT NULL
  • quantity — INT

room_equipments

  • equipment_id — BIGINT — Primary key — NOT NULL
  • name — VARCHAR(100) — NOT NULL
  • category — VARCHAR(50)
  • icon — VARCHAR(500)

room_images

  • room_image_id — BIGINT — Primary key — NOT NULL
  • room_id — BIGINT — Foreign key → rooms.room_id — NOT NULL
  • image_url — VARCHAR(500) — NOT NULL
  • sort_order — INT

room_units

  • room_unit_id — BIGINT — Primary key — NOT NULL
  • room_id — BIGINT — Foreign key → rooms.room_id — NOT NULL
  • room_number — VARCHAR(50)
  • floor — INT
  • status — VARCHAR(50)

rooms

  • room_id — BIGINT — Primary key — NOT NULL
  • guesthouse_id — BIGINT — Foreign key → guesthouses.guesthouse_id — NOT NULL
  • name — VARCHAR(255) — NOT NULL
  • description — TEXT
  • room_type — VARCHAR(50)
  • gender_type — VARCHAR(50)
  • price_per_night — INT
  • max_guests — INT
  • size_m2 — DECIMAL(6, 2)
  • bed_type — VARCHAR(50)
  • bed_count — INT
  • bathroom_type — VARCHAR(50)
  • has_window — BOOLEAN
  • has_air_conditioner — BOOLEAN
  • has_heating — BOOLEAN
  • status — VARCHAR(50)

spaces

  • space_id — BIGINT — Primary key — NOT NULL
  • guesthouse_id — BIGINT — Foreign key → guesthouses.guesthouse_id — NOT NULL
  • name — VARCHAR(255) — NOT NULL
  • space_type — VARCHAR(50)
  • floor — INT
  • description — TEXT
  • capacity — INT
  • status — VARCHAR(50)

users

  • user_id — BIGINT — Primary key — NOT NULL
  • login_id — VARCHAR(100) — NOT NULL
  • password — VARCHAR(255) — NOT NULL
  • name — VARCHAR(100) — NOT NULL
  • phone — VARCHAR(30)
  • email — VARCHAR(255) — NOT NULL
  • role — VARCHAR(50)
  • status — VARCHAR(50)
  • created_at — DATETIME
  • updated_at — DATETIME
  • withdrawn_at — DATETIME

wellness_answers

  • answer_id — BIGINT — Primary key — NOT NULL
  • record_id — BIGINT — Foreign key → wellness_records.record_id — NOT NULL
  • question_id — BIGINT — NOT NULL
  • option_id — BIGINT
  • score — INT

wellness_content_rules

  • rule_id — BIGINT — Primary key — NOT NULL
  • content_id — BIGINT — Foreign key → wellness_contents.content_id — NOT NULL
  • target_category — VARCHAR(50)
  • min_score — INT
  • max_score — INT
  • priority — INT

wellness_contents

  • content_id — BIGINT — Primary key — NOT NULL
  • title — VARCHAR(255) — NOT NULL
  • description — TEXT
  • content_type — VARCHAR(50)
  • duration_minutes — INT
  • content_url — VARCHAR(500)
  • is_active — BOOLEAN

wellness_options

  • option_id — BIGINT — Primary key — NOT NULL
  • question_id — BIGINT — Foreign key → wellness_questions.question_id — NOT NULL
  • option_text — VARCHAR(500) — NOT NULL
  • score — INT
  • sort_order — INT

wellness_questions

  • question_id — BIGINT — Primary key — NOT NULL
  • question_text — VARCHAR(500) — NOT NULL
  • category — VARCHAR(50)
  • sort_order — INT
  • is_active — BOOLEAN

wellness_records

  • record_id — BIGINT — Primary key — NOT NULL
  • user_id — BIGINT — Foreign key → users.user_id — NOT NULL
  • reservation_id — BIGINT
  • stage — VARCHAR(50)
  • total_score — INT
  • stress_score — INT
  • fatigue_score — INT
  • relaxation_score — INT
  • mood_score — INT
  • result_level — VARCHAR(50)
  • measured_at — DATETIME