umc
Tables (18)
bookmarks
- bookmark_id — BIGINT — Primary key — NOT NULL
- user_id — BIGINT — Foreign key → users.user_id — NOT NULL
- restaurant_id — BIGINT — Foreign key → restaurants.restaurant_id — NOT NULL
- created_at — DATETIME
check_ins
- check_in_id — BIGINT — Primary key — NOT NULL
- user_id — BIGINT — Foreign key → users.user_id — NOT NULL
- restaurant_id — BIGINT — Foreign key → restaurants.restaurant_id — NOT NULL
- visited_at — DATETIME
- created_at — DATETIME
food_categories
- category_id — BIGINT — Primary key — NOT NULL
- name — VARCHAR(50) — NOT NULL
- parent_id — BIGINT — Foreign key → food_categories.category_id
inquiries
- inquiry_id — BIGINT — Primary key — NOT NULL
- user_id — BIGINT — Foreign key → users.user_id — NOT NULL
- title — VARCHAR(100) — NOT NULL
- content — TEXT — NOT NULL
- status — VARCHAR(20)
- created_at — DATETIME
- updated_at — DATETIME
missions
- mission_id — BIGINT — Primary key — NOT NULL
- title — VARCHAR(100) — NOT NULL
- description — TEXT
- reward_point — INT
- mission_type — VARCHAR(20)
- target_value — INT
- is_active — BOOLEAN
- start_date — DATE
- end_date — DATE
- created_at — DATETIME
- updated_at — DATETIME
notifications
- notification_id — BIGINT — Primary key — NOT NULL
- user_id — BIGINT — Foreign key → users.user_id — NOT NULL
- notification_type — VARCHAR(20)
- title — VARCHAR(100)
- content — TEXT
- is_read — BOOLEAN
- created_at — DATETIME
payments
- payment_id — BIGINT — Primary key — NOT NULL
- user_id — BIGINT — Foreign key → users.user_id — NOT NULL
- product_type — VARCHAR(20)
- product_name — VARCHAR(100)
- amount — INT — NOT NULL
- status — VARCHAR(20)
- payment_method — VARCHAR(20)
- payment_key — VARCHAR(100)
- paid_at — DATETIME
- created_at — DATETIME
point_history
- point_history_id — BIGINT — Primary key — NOT NULL
- user_id — BIGINT — Foreign key → users.user_id — NOT NULL
- transaction_type — VARCHAR(20)
- amount — INT — NOT NULL
- related_type — VARCHAR(20)
- related_id — BIGINT
- description — TEXT
- created_at — DATETIME
regions
- region_id — BIGINT — Primary key — NOT NULL
- name — VARCHAR(50) — NOT NULL
- parent_id — BIGINT — Foreign key → regions.region_id
- region_type — VARCHAR(20)
restaurant_images
- image_id — BIGINT — Primary key — NOT NULL
- restaurant_id — BIGINT — Foreign key → restaurants.restaurant_id — NOT NULL
- image_url — VARCHAR(255) — NOT NULL
- sort_order — INT
- created_at — DATETIME
restaurants
- restaurant_id — BIGINT — Primary key — NOT NULL
- category_id — BIGINT — Foreign key → food_categories.category_id
- name — VARCHAR(100) — NOT NULL
- description — TEXT
- address — VARCHAR(255)
- latitude — DECIMAL(10, 7)
- longitude — DECIMAL(10, 7)
- phone — VARCHAR(20)
- price_range — VARCHAR(20)
- image_url — VARCHAR(255)
- avg_rating — DECIMAL(3, 2)
- review_count — INT
- created_at — DATETIME
- updated_at — DATETIME
review_images
- image_id — BIGINT — Primary key — NOT NULL
- review_id — BIGINT — Foreign key → reviews.review_id — NOT NULL
- image_url — VARCHAR(255) — NOT NULL
- sort_order — INT
- created_at — DATETIME
reviews
- review_id — BIGINT — Primary key — NOT NULL
- user_id — BIGINT — Foreign key → users.user_id — NOT NULL
- restaurant_id — BIGINT — Foreign key → restaurants.restaurant_id — NOT NULL
- rating — INT — NOT NULL
- content — TEXT
- created_at — DATETIME
- updated_at — DATETIME
social_login
- social_login_id — BIGINT — Primary key — NOT NULL
- user_id — BIGINT — Foreign key → users.user_id — NOT NULL
- provider — VARCHAR(20) — NOT NULL
- provider_uid — VARCHAR(100) — NOT NULL
- created_at — DATETIME
subscriptions
- subscription_id — BIGINT — Primary key — NOT NULL
- user_id — BIGINT — Foreign key → users.user_id — NOT NULL
- plan_type — VARCHAR(20)
- start_date — DATE
- end_date — DATE
- status — VARCHAR(20)
- created_at — DATETIME
user_missions
- user_mission_id — BIGINT — Primary key — NOT NULL
- user_id — BIGINT — Foreign key → users.user_id — NOT NULL
- mission_id — BIGINT — Foreign key → missions.mission_id — NOT NULL
- status — VARCHAR(20)
- progress — INT
- completed_at — DATETIME
- created_at — DATETIME
- updated_at — DATETIME
user_preferences
- preference_id — BIGINT — Primary key — NOT NULL
- user_id — BIGINT — Foreign key → users.user_id — NOT NULL
- region_id — BIGINT — Foreign key → regions.region_id
- food_category_id — BIGINT — Foreign key → food_categories.category_id
- budget_min — INT
- budget_max — INT
- created_at — DATETIME
- updated_at — DATETIME
users
- user_id — BIGINT — Primary key — NOT NULL
- email — VARCHAR(100)
- password — VARCHAR(255)
- name — VARCHAR(50) — NOT NULL
- nickname — VARCHAR(50)
- phone — VARCHAR(20)
- profile_image — VARCHAR(255)
- status — VARCHAR(20)
- created_at — DATETIME
- updated_at — DATETIME