umc-week1-ver2
Tables (22)
food_categories
- id — BIGINT — Primary key — NOT NULL
- name — VARCHAR(50) — NOT NULL
- display_order — INT — NOT NULL
- is_active — BOOLEAN — NOT NULL
inquiries
- id — BIGINT — Primary key — NOT NULL
- member_id — BIGINT — Foreign key → members.id — NOT NULL
- category — VARCHAR(30) — NOT NULL
- title — VARCHAR(100) — NOT NULL
- content — TEXT — NOT NULL
- status — VARCHAR(20) — NOT NULL
- created_at — DATETIME — NOT NULL
- updated_at — DATETIME — NOT NULL
- deleted_at — DATETIME
inquiry_answers
- id — BIGINT — Primary key — NOT NULL
- inquiry_id — BIGINT — Foreign key → inquiries.id — NOT NULL
- answered_by_member_id — BIGINT — Foreign key → members.id
- content — TEXT — NOT NULL
- answered_at — DATETIME — NOT NULL
- updated_at — DATETIME — NOT NULL
inquiry_images
- id — BIGINT — Primary key — NOT NULL
- inquiry_id — BIGINT — Foreign key → inquiries.id — NOT NULL
- image_url — VARCHAR(500) — NOT NULL
- display_order — INT — NOT NULL
- created_at — DATETIME — NOT NULL
member_food_preferences
- id — BIGINT — Primary key — NOT NULL
- member_id — BIGINT — Foreign key → members.id — NOT NULL
- food_category_id — BIGINT — Foreign key → food_categories.id — NOT NULL
- created_at — DATETIME — NOT NULL
member_missions
- id — BIGINT — Primary key — NOT NULL
- member_id — BIGINT — Foreign key → members.id — NOT NULL
- mission_id — BIGINT — Foreign key → missions.id — NOT NULL
- status — VARCHAR(20) — NOT NULL
- verification_code — VARCHAR(100)
- assigned_at — DATETIME — NOT NULL
- started_at — DATETIME
- completed_at — DATETIME
- expired_at — DATETIME
member_settings
- id — BIGINT — Primary key — NOT NULL
- member_id — BIGINT — Foreign key → members.id — NOT NULL
- is_service_notification_enabled — BOOLEAN — NOT NULL
- is_marketing_notification_enabled — BOOLEAN — NOT NULL
- is_mission_notification_enabled — BOOLEAN — NOT NULL
- updated_at — DATETIME — NOT NULL
member_term_agreements
- id — BIGINT — Primary key — NOT NULL
- member_id — BIGINT — Foreign key → members.id — NOT NULL
- term_id — BIGINT — Foreign key → terms.id — NOT NULL
- is_agreed — BOOLEAN — NOT NULL
- agreed_at — DATETIME — NOT NULL
members
- id — BIGINT — Primary key — NOT NULL
- name — VARCHAR(50) — NOT NULL
- nickname — VARCHAR(50) — NOT NULL
- email — VARCHAR(255)
- gender — VARCHAR(20)
- birth_date — DATE
- address — VARCHAR(255)
- profile_image_url — VARCHAR(500)
- status — VARCHAR(20) — NOT NULL
- created_at — DATETIME — NOT NULL
- updated_at — DATETIME — NOT NULL
- deleted_at — DATETIME
missions
- id — BIGINT — Primary key — NOT NULL
- store_id — BIGINT — Foreign key → stores.id — NOT NULL
- title — VARCHAR(100) — NOT NULL
- description — TEXT
- mission_type — VARCHAR(30) — NOT NULL
- minimum_amount — DECIMAL(12, 2)
- reward_point — INT — NOT NULL
- available_from — DATETIME — NOT NULL
- available_until — DATETIME — NOT NULL
- status — VARCHAR(20) — NOT NULL
- created_at — DATETIME — NOT NULL
- updated_at — DATETIME — NOT NULL
- deleted_at — DATETIME
notifications
- id — BIGINT — Primary key — NOT NULL
- member_id — BIGINT — Foreign key → members.id — NOT NULL
- member_mission_id — BIGINT — Foreign key → member_missions.id
- notification_type — VARCHAR(30) — NOT NULL
- title — VARCHAR(100) — NOT NULL
- content — VARCHAR(500) — NOT NULL
- read_at — DATETIME
- created_at — DATETIME — NOT NULL
point_transactions
- id — BIGINT — Primary key — NOT NULL
- member_id — BIGINT — Foreign key → members.id — NOT NULL
- member_mission_id — BIGINT — Foreign key → member_missions.id
- transaction_type — VARCHAR(30) — NOT NULL
- point_amount — INT — NOT NULL
- description — VARCHAR(255)
- created_at — DATETIME — NOT NULL
review_images
- id — BIGINT — Primary key — NOT NULL
- review_id — BIGINT — Foreign key → reviews.id — NOT NULL
- image_url — VARCHAR(500) — NOT NULL
- display_order — INT — NOT NULL
- created_at — DATETIME — NOT NULL
reviews
- id — BIGINT — Primary key — NOT NULL
- member_mission_id (id2) — BIGINT — Foreign key → member_missions.id — NOT NULL
- rating — TINYINT — NOT NULL
- content — TEXT
- status — VARCHAR(20) — NOT NULL
- created_at — DATETIME — NOT NULL
- updated_at — DATETIME — NOT NULL
- deleted_at — DATETIME
search_histories
- id — BIGINT — Primary key — NOT NULL
- member_id — BIGINT — Foreign key → members.id — NOT NULL
- keyword — VARCHAR(100) — NOT NULL
- searched_at — DATETIME — NOT NULL
social_accounts
- id — BIGINT — Primary key — NOT NULL
- member_id — BIGINT — Foreign key → members.id — NOT NULL
- provider — VARCHAR(20) — NOT NULL
- provider_user_id — VARCHAR(255) — NOT NULL
- created_at — DATETIME — NOT NULL
store_business_hours
- id — BIGINT — Primary key — NOT NULL
- store_id — BIGINT — Foreign key → stores.id — NOT NULL
- day_of_week — TINYINT — NOT NULL
- open_time — TIME
- close_time — TIME
- break_start_time — TIME
- break_end_time — TIME
- is_closed — BOOLEAN — NOT NULL
store_food_categories
- id — BIGINT — Primary key — NOT NULL
- store_id — BIGINT — Foreign key → stores.id — NOT NULL
- food_category_id — BIGINT — Foreign key → food_categories.id — NOT NULL
store_images
- id — BIGINT — Primary key — NOT NULL
- store_id — BIGINT — Foreign key → stores.id — NOT NULL
- image_url — VARCHAR(500) — NOT NULL
- display_order — INT — NOT NULL
- is_representative — BOOLEAN — NOT NULL
- created_at — DATETIME — NOT NULL
store_managers
- id — BIGINT — Primary key — NOT NULL
- store_id — BIGINT — Foreign key → stores.id — NOT NULL
- member_id — BIGINT — Foreign key → members.id — NOT NULL
- manager_role — VARCHAR(20) — NOT NULL
- is_active — BOOLEAN — NOT NULL
- created_at — DATETIME — NOT NULL
stores
- id — BIGINT — Primary key — NOT NULL
- name — VARCHAR(100) — NOT NULL
- description — TEXT
- phone — VARCHAR(30)
- address — VARCHAR(255) — NOT NULL
- detail_address — VARCHAR(255)
- latitude — DECIMAL(10, 7) — NOT NULL
- longitude — DECIMAL(10, 7) — NOT NULL
- status — VARCHAR(20) — NOT NULL
- created_at — DATETIME — NOT NULL
- updated_at — DATETIME — NOT NULL
- deleted_at — DATETIME
terms
- id — BIGINT — Primary key — NOT NULL
- title — VARCHAR(100) — NOT NULL
- version — VARCHAR(20) — NOT NULL
- content — TEXT — NOT NULL
- is_required — BOOLEAN — NOT NULL
- effective_at — DATETIME — NOT NULL
- created_at — DATETIME — NOT NULL