test
Tables (15)
Chats
- chat_id — INT — Primary key — NOT NULL
- user1_id — INT — Foreign key → Users.user_id — NOT NULL
- user2_id — INT — Foreign key → Users.user_id — NOT NULL
- created_at — DATETIME
- updated_at — DATETIME
Comments
- comment_id — INT — Primary key — NOT NULL
- post_id — INT — Foreign key → Posts.post_id — NOT NULL
- user_id — INT — Foreign key → Users.user_id — NOT NULL
- content — TEXT — NOT NULL
- created_at — DATETIME
- updated_at — DATETIME
Messages
- message_id — INT — Primary key — NOT NULL
- chat_id — INT — Foreign key → Chats.chat_id — NOT NULL
- sender_id — INT — Foreign key → Users.user_id — NOT NULL
- message_content — TEXT — NOT NULL
- sent_at — DATETIME
Payments
- payment_id — INT — Primary key — NOT NULL
- reservation_id — INT — NOT NULL
- user_id — INT — NOT NULL
- amount — DECIMAL(10,2) — NOT NULL
- payment_method — VARCHAR(50)
- payment_status — ENUM(\'pending\', \'completed\', \'failed\', \'refunded\') — Foreign key → Reservations.reservation_id — NOT NULL
Posts
- post_id — INT — Primary key — NOT NULL
- user_id — INT — Foreign key → Users.user_id — NOT NULL
- title — VARCHAR(255) — NOT NULL
- content — TEXT — NOT NULL
- category — VARCHAR(50)
- view_count — INT
- created_at — DATETIME
- updated_at — DATETIME
Promotions
- promotion_id — INT — Primary key — NOT NULL
- salon_id — INT — Foreign key → Salons.salon_id
- title — VARCHAR(255) — NOT NULL
- description — TEXT
- start_date — DATE — NOT NULL
- end_date — DATE — NOT NULL
- discount_rate — DECIMAL(5,2)
- coupon_code — VARCHAR(50)
- image_url — VARCHAR(255)
- created_at — DATETIME
- updated_at — DATETIME
Reservations
- reservation_id — INT — Primary key — NOT NULL
- user_id — INT — NOT NULL
- salon_id — INT — NOT NULL
- stylist_id — INT
- service_id — INT — NOT NULL
- reservation_time — DATETIME — NOT NULL
- status — ENUM(\'pending\', \'confirmed\', \'completed\', \'cancelled\') — Foreign key → Users.user_id — NOT NULL
Reviews
- review_id — INT — Primary key — NOT NULL
- user_id — INT — Foreign key → Users.user_id — NOT NULL
- salon_id — INT — Foreign key → Salons.salon_id — NOT NULL
- reservation_id — INT — Foreign key → Reservations.reservation_id — NOT NULL
- rating — INT — NOT NULL
- created_at — DATETIME
- updated_at — DATETIME
Salon_Operating_Hours
- hour_id — INT — Primary key — NOT NULL
- salon_id — INT — NOT NULL
- day_of_week — ENUM(\'월\', \'화\', \'수\', \'목\', \'금\', \'토\', \'일\') — Foreign key → Salons.salon_id — NOT NULL
Salons
- salon_id — INT — Primary key — NOT NULL
- owner_id — INT — Foreign key → Users.user_id — NOT NULL
- name — VARCHAR(255) — NOT NULL
- address — VARCHAR(255) — NOT NULL
- phone_number — VARCHAR(20)
- description — TEXT
- average_rating — DECIMAL(2,1)
- image_url — VARCHAR(255)
- created_at — DATETIME
- updated_at — DATETIME
Services
- service_id — INT — Primary key — NOT NULL
- salon_id — INT — Foreign key → Salons.salon_id — NOT NULL
- name — VARCHAR(255) — NOT NULL
- price — DECIMAL(10,2) — NOT NULL
- duration_minutes — INT
- description — TEXT
- created_at — DATETIME
- updated_at — DATETIME
Stylist_Schedules
- schedule_id — INT — Primary key — NOT NULL
- stylist_id — INT — Foreign key → Stylists.stylist_id — NOT NULL
- date — DATE — NOT NULL
- start_time — TIME — NOT NULL
- end_time — TIME — NOT NULL
- is_available — BOOLEAN
Stylists
- stylist_id — INT — Primary key — NOT NULL
- salon_id — INT — Foreign key → Salons.salon_id — NOT NULL
- name — VARCHAR(100) — NOT NULL
- phone_number — VARCHAR(20)
- description — TEXT
- image_url — VARCHAR(255)
- created_at — DATETIME
- updated_at — DATETIME
Users
- user_id — INT — Primary key — NOT NULL
- email — VARCHAR(255) — NOT NULL
- password — VARCHAR(255) — NOT NULL
- name — VARCHAR(100)
- phone_number — VARCHAR(20)
- user_type — ENUM(\'customer\', \'owner\', \'admin\') — NOT NULL
Wishlists
- wishlist_id — INT — Primary key — NOT NULL
- user_id — INT — Foreign key → Users.user_id — NOT NULL
- salon_id — INT — Foreign key → Salons.salon_id — NOT NULL
- created_at — DATETIME