erd
Tables (25)
attractions
- no — INT — Primary key — NOT NULL
- content_id — INT
- title — VARCHAR(500)
- content_type_id — INT — Foreign key → contenttypes.content_type_id — NOT NULL
- area_code — INT — Foreign key → sidos.no — NOT NULL
- si_gun_gu_code — INT — Foreign key → guguns.key — NOT NULL
- first_image1 — VARCHAR(100)
- first_image2 — VARCHAR(100)
- map_level — INT
- latitude — DECIMAL(20,17)
- longitude — DECIMAL(20,17)
- tel — VARCHAR(20)
- addr1 — VARCHAR(100)
- addr2 — VARCHAR(100)
- homepage — VARCHAR(1000)
- overview — VARCHAR(10000)
- view_cnt — INT
- INDEX — `content_type_id`
- INDEX — `area_code`
- INDEX — `si_gun_gu_code`
board
- post_id — INT — Primary key — NOT NULL
- category_id — INT — Foreign key → board_categories.category_id — NOT NULL
- writer_id — INT — Foreign key → member.mno — NOT NULL
- title — VARCHAR(200) — NOT NULL
- content — TEXT — NOT NULL
- status — ENUM('active', 'inactive', 'deleted') — NOT NULL
- view_count — INT — NOT NULL
- comment_count — INT — NOT NULL
- INDEX — `category_id`
- INDEX — `writer_id`
board_categories
- category_id — INT — Primary key — NOT NULL
- main_category — VARCHAR(10) — NOT NULL
board_details
- post_id — INT — Foreign key → board.post_id — NOT NULL
- created_at — DATETIME — NOT NULL
- updated_at — DATETIME
- deleted_at — DATETIME
- file_path — VARCHAR(255)
chat_rooms
- room_id — INT — Primary key — NOT NULL
- room_name — VARCHAR(30) — NOT NULL
- room_type — ENUM('private', 'group', 'public') — NOT NULL
- created_date — DATETIME — NOT NULL
- mno — INT — Foreign key → member.mno — NOT NULL
- INDEX — `mno`
comments
- comment_id — INT — Primary key — NOT NULL
- post_id — INT — Foreign key → board.post_id — NOT NULL
- writer_id — INT — Foreign key → member.mno — NOT NULL
- content — TEXT — NOT NULL
- created_at — DATETIME — NOT NULL
- updated_at — DATETIME
- status — ENUM('active', 'inactive', 'deleted') — NOT NULL
- INDEX — `post_id`
- INDEX — `writer_id`
contenttypes
- content_type_id — INT — Primary key — NOT NULL
- content_type_name — VARCHAR(45)
curator
- mno — INT — Foreign key → member.mno — NOT NULL
- curator_no — VARCHAR(50)
- curator_img — VARCHAR(255) — NOT NULL
- ad_grade — VARCHAR(255)
- approved_at — DATETIME
group_member
- group_id — INT — Foreign key → travel_group.group_id — NOT NULL
- member_id — INT — Foreign key → member.mno — NOT NULL
- joined_at — DATETIME — NOT NULL
- role — ENUM('member', 'manager') — NOT NULL
- INDEX — `member_id`
group_trip_plan
- plan_id — INT — Primary key — NOT NULL
- group_id — INT — Foreign key → travel_group.group_id — NOT NULL
- title — VARCHAR(50) — NOT NULL
- start_date — DATETIME
- end_date — DATETIME
- info — VARCHAR(255)
- INDEX — `group_id`
guguns
- key — INT — Primary key — NOT NULL
- sido_code — VARCHAR(255)
- gugun_code — INT
- gugun_name — VARCHAR(20)
hotplace_images
- id — BIGINT — Primary key — NOT NULL
- hotplace_id — BIGINT — Foreign key → hotplaces.id — NOT NULL
- image_url — VARCHAR(500) — NOT NULL
- image_order — INT — NOT NULL
- created_at — DATETIME — NOT NULL
- INDEX — `idx_hotplace_id`
hotplaces
- id — BIGINT — Primary key — NOT NULL
- mno — INT — Foreign key → member.mno — NOT NULL
- title — VARCHAR(200) — NOT NULL
- latitude — DECIMAL(20,17) — NOT NULL
- longitude — DECIMAL(20,17) — NOT NULL
- rating — INT — NOT NULL
- content_type_id — INT — Foreign key → contenttypes.content_type_id — NOT NULL
- description — TEXT
- review — TEXT
- recommendation_reason — TEXT
- view_count — INT — NOT NULL
- created_at — DATETIME — NOT NULL
- updated_at — DATETIME — NOT NULL
- INDEX — `content_type_id`
- INDEX — `idx_mno`
- INDEX — `idx_created_at`
- INDEX — `idx_rating`
member
- mno — INT — Primary key — NOT NULL
- id — VARCHAR(20) — NOT NULL
- password — VARCHAR(1000) — NOT NULL
- nickname — VARCHAR(50)
- role — ENUM('USER', 'CURATOR', 'ADMIN') — NOT NULL
- status — ENUM('ACTIVE', 'SUSPENDED', 'PENDING', 'DELETED') — NOT NULL
- points — INT — NOT NULL
member_details
- mno — INT — Foreign key → member.mno — NOT NULL
- email — VARCHAR(100) — NOT NULL
- phone — VARCHAR(13) — NOT NULL
- gender — ENUM('unknown', 'man', 'woman') — NOT NULL
- address — VARCHAR(200)
- postal_code — VARCHAR(20)
- birth_date — DATE
- profile_img_path — VARCHAR(255)
- created_at — DATETIME — NOT NULL
- updated_at — DATETIME — NOT NULL
- last_login — DATETIME
messages
- message_id — INT — Primary key — NOT NULL
- mno — INT — Foreign key → member.mno — NOT NULL
- room_id — INT — Foreign key → chat_rooms.room_id — NOT NULL
- content — VARCHAR(300) — NOT NULL
- message_type — VARCHAR(20)
- created_date — DATETIME
- INDEX — `mno`
- INDEX — `room_id`
post_likes
- post_id — INT — Foreign key → board.post_id — NOT NULL
- mno — INT — Foreign key → member.mno — NOT NULL
- created_at — DATETIME — NOT NULL
- INDEX — `mno`
rating
- rating_id — INT — Primary key — NOT NULL
- post_id — INT — Foreign key → board.post_id — NOT NULL
- mno — INT — Foreign key → member.mno — NOT NULL
- target_type — ENUM('product', 'curator', 'attraction') — NOT NULL
- target_id — INT — NOT NULL
- rating_value — INT — NOT NULL
- created_at — DATETIME — NOT NULL
- updated_at — DATETIME
- status — ENUM('active', 'inactive', 'deleted') — NOT NULL
- INDEX — `post_id`
- INDEX — `mno`
sidos
- no — INT — Primary key — NOT NULL
- sido_code — INT
- sido_name — VARCHAR(20)
tour_booking
- booking_id — INT — Primary key — NOT NULL
- mno — INT — Foreign key → member.mno — NOT NULL
- product_id — INT — Foreign key → tour_product.product_id — NOT NULL
- reserved_at — DATETIME — NOT NULL
- participant_count — INT — NOT NULL
- total_price — INT — NOT NULL
- payment_method — VARCHAR(50) — NOT NULL
- payment_status — ENUM('unpaid', 'paid', 'refunded')
- status — ENUM('reserved', 'cancelled', 'completed') — NOT NULL
- cancelled_at — DATETIME
- INDEX — `mno`
- INDEX — `product_id`
tour_product
- product_id — INT — Primary key — NOT NULL
- mno — INT — Foreign key → member.mno — NOT NULL
- location_name — INT — Foreign key → attractions.no — NOT NULL
- title — VARCHAR(100) — NOT NULL
- description — TEXT
- max_participants — INT — NOT NULL
- min_participants — INT — NOT NULL
- price_type — ENUM('total', 'per_person') — NOT NULL
- price — INT — NOT NULL
- start_date — DATE — NOT NULL
- status — ENUM('draft', 'open', 'closed', 'cancelled')
- thumbnail_img — VARCHAR(255)
- tags — VARCHAR(255)
- meeting_place — VARCHAR(255)
- meeting_time — TIME — NOT NULL
- duration — INT — NOT NULL
- created_at — DATETIME — NOT NULL
- updated_at — DATETIME
- INDEX — `mno`
- INDEX — `location_name`
travel_group
- group_id — INT — Primary key — NOT NULL
- name — VARCHAR(50) — NOT NULL
- info — VARCHAR(255)
- leader_id — INT — Foreign key → member.mno — NOT NULL
- created_at — DATETIME — NOT NULL
- is_public — TINYINT(1) — NOT NULL
- INDEX — `leader_id`
trip_plan_attractions
- id — BIGINT — Primary key — NOT NULL
- trip_plan_id — BIGINT — Foreign key → trip_plans.id — NOT NULL
- attraction_no — INT — Foreign key → attractions.no — NOT NULL
- visit_order — INT — NOT NULL
- attraction_title — VARCHAR(500)
- latitude — DECIMAL(20,17)
- longitude — DECIMAL(20,17)
- sido — VARCHAR(50)
- gugun — VARCHAR(50)
- addr — VARCHAR(200)
- created_at — DATETIME — NOT NULL
- INDEX — `attraction_no`
- INDEX — `idx_trip_plan_order`
trip_plans
- id — BIGINT — Primary key — NOT NULL
- mno — INT — Foreign key → member.mno — NOT NULL
- name — VARCHAR(200) — NOT NULL
- description — TEXT
- start_date — DATE — NOT NULL
- end_date — DATE — NOT NULL
- total_distance — DECIMAL(10,2) — NOT NULL
- total_duration — INT — NOT NULL
- status — ENUM('DRAFT', 'COMPLETED', 'DELETED') — NOT NULL
- created_at — DATETIME — NOT NULL
- updated_at — DATETIME — NOT NULL
- INDEX — `idx_mno_status`
- INDEX — `idx_created_at`
user_rooms
- id — INT — Primary key — NOT NULL
- room_id — INT — Foreign key → chat_rooms.room_id — NOT NULL
- mno — INT — Foreign key → member.mno — NOT NULL
- joined_date — DATETIME — NOT NULL
- role — ENUM('member', 'manager') — NOT NULL
- INDEX — `room_id`
- INDEX — `mno`