UMC ERD2
Tables (18)
food_categories
- food_category_id — BIGINT — Primary key — NOT NULL
- name — VARCHAR(50) — NOT NULL
inquiries
- inquiry_id — BIGINT — Primary key — NOT NULL
- user_id — BIGINT — Foreign key → users.user_id — NOT NULL
- title — VARCHAR(150) — NOT NULL
- content — TEXT — NOT NULL
- status — VARCHAR(20) — NOT NULL
- created_at — DATETIME — NOT NULL
- answered_at — DATETIME
inquiry_answers
- inquiry_answer_id — BIGINT — Primary key — NOT NULL
- inquiry_id — BIGINT — Foreign key → inquiries.inquiry_id — NOT NULL
- content — TEXT — NOT NULL
- created_at — DATETIME — NOT NULL
inquiry_images
- inquiry_image_id — BIGINT — Primary key — NOT NULL
- inquiry_id — BIGINT — Foreign key → inquiries.inquiry_id — NOT NULL
- image_url — VARCHAR(500) — NOT NULL
- display_order — INT — NOT NULL
- created_at — DATETIME — NOT NULL
missions
- mission_id — BIGINT — Primary key — NOT NULL
- store_id — BIGINT — Foreign key → stores.store_id — NOT NULL
- title — VARCHAR(150) — NOT NULL
- description — TEXT
- minimum_amount — DECIMAL(12, 2) — NOT NULL
- reward_points — INT — NOT NULL
- started_at — DATETIME
- ended_at — DATETIME
- status — VARCHAR(20) — NOT NULL
- created_at — DATETIME — NOT NULL
- updated_at — DATETIME — NOT NULL
notification_settings
- user_id — BIGINT — Foreign key → users.user_id — NOT NULL
- new_mission_enabled — BOOLEAN — NOT NULL
- review_reminder_enabled — BOOLEAN — NOT NULL
- marketing_enabled — BOOLEAN — NOT NULL
- updated_at — DATETIME — NOT NULL
notifications
- notification_id — BIGINT — Primary key — NOT NULL
- user_id — BIGINT — Foreign key → users.user_id — NOT NULL
- mission_id — BIGINT — Foreign key → missions.mission_id
- review_id — BIGINT — Foreign key → reviews.review_id
- notification_type — VARCHAR(30) — NOT NULL
- title — VARCHAR(150) — NOT NULL
- content — TEXT — NOT NULL
- created_at — DATETIME — NOT NULL
- read_at — DATETIME
point_transactions
- point_transaction_id — BIGINT — Primary key — NOT NULL
- user_id — BIGINT — Foreign key → users.user_id — NOT NULL
- user_mission_id — BIGINT — Foreign key → user_missions.user_mission_id
- transaction_type — VARCHAR(20) — NOT NULL
- amount — BIGINT — NOT NULL
- balance_after — BIGINT — NOT NULL
- description — VARCHAR(255)
- created_at — DATETIME — NOT NULL
review_images
- review_image_id — BIGINT — Primary key — NOT NULL
- review_id — BIGINT — Foreign key → reviews.review_id — NOT NULL
- image_url — VARCHAR(500) — NOT NULL
- display_order — INT — NOT NULL
- created_at — DATETIME — NOT NULL
reviews
- review_id — BIGINT — Primary key — NOT NULL
- user_id — BIGINT — Foreign key → users.user_id — NOT NULL
- store_id — BIGINT — Foreign key → stores.store_id — NOT NULL
- user_mission_id — BIGINT — Foreign key → user_missions.user_mission_id — NOT NULL
- content — TEXT
- rating — DECIMAL(2, 1) — NOT NULL
- created_at — DATETIME — NOT NULL
- updated_at — DATETIME — NOT NULL
social_accounts
- social_account_id — BIGINT — Primary key — NOT NULL
- user_id — BIGINT — Foreign key → users.user_id — NOT NULL
- provider — VARCHAR(20) — NOT NULL
- provider_user_id — VARCHAR(100) — NOT NULL
- created_at — DATETIME — NOT NULL
store_images
- store_image_id — BIGINT — Primary key — NOT NULL
- store_id — BIGINT — Foreign key → stores.store_id — NOT NULL
- image_url — VARCHAR(500) — NOT NULL
- display_order — INT — NOT NULL
- created_at — DATETIME — NOT NULL
stores
- store_id — BIGINT — Primary key — NOT NULL
- food_category_id — BIGINT — Foreign key → food_categories.food_category_id — NOT NULL
- name — VARCHAR(100) — NOT NULL
- description — TEXT
- address — VARCHAR(255) — NOT NULL
- latitude — DECIMAL(10, 7) — NOT NULL
- longitude — DECIMAL(10, 7) — NOT NULL
- phone_number — VARCHAR(20)
- created_at — DATETIME — NOT NULL
- updated_at — DATETIME — NOT NULL
terms
- term_id — BIGINT — Primary key — NOT NULL
- term_type — VARCHAR(30) — NOT NULL
- title — VARCHAR(100) — NOT NULL
- version — VARCHAR(20) — NOT NULL
- is_required — BOOLEAN — NOT NULL
- content — TEXT
- created_at — DATETIME — NOT NULL
user_food_preferences
- user_id — BIGINT — Foreign key → users.user_id — NOT NULL
- food_category_id — BIGINT — Foreign key → food_categories.food_category_id — NOT NULL
- created_at — DATETIME — NOT NULL
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) — NOT NULL
- accepted_at — DATETIME — NOT NULL
- completed_at — DATETIME
- verified_at — DATETIME
user_terms
- user_id — BIGINT — Foreign key → users.user_id — NOT NULL
- term_id — BIGINT — Foreign key → terms.term_id — NOT NULL
- is_agreed — BOOLEAN — NOT NULL
- agreed_at — DATETIME
users
- user_id — BIGINT — Primary key — NOT NULL
- name — VARCHAR(50) — NOT NULL
- nickname — VARCHAR(50) — NOT NULL
- gender — VARCHAR(20)
- birth_date — DATE
- phone_number — VARCHAR(20)
- phone_verified_at — DATETIME
- address — VARCHAR(255)
- latitude — DECIMAL(10, 7)
- longitude — DECIMAL(10, 7)
- point_balance — BIGINT — NOT NULL
- status — VARCHAR(20) — NOT NULL
- created_at — DATETIME — NOT NULL
- updated_at — DATETIME — NOT NULL
- deleted_at — DATETIME