Test-ERD
Tables (8)
food_categories
- id — BIGINT — Primary key — NOT NULL
- name — VARCHAR(50) — NOT NULL
- created_at — DATETIME(6) — NOT NULL
- updated_at — DATETIME(6) — NOT NULL
missions
- id — BIGINT — Primary key — NOT NULL
- store_id — BIGINT — Foreign key → stores.id — NOT NULL
- title — VARCHAR(255) — NOT NULL
- description — TEXT
- reward_points — INT — NOT NULL
- is_active — BOOLEAN — NOT NULL
- created_at — DATETIME(6) — NOT NULL
- updated_at — DATETIME(6) — NOT NULL
regions
- id — BIGINT — Primary key — NOT NULL
- name — VARCHAR(100) — NOT NULL
- created_at — DATETIME(6) — NOT NULL
- updated_at — DATETIME(6) — NOT NULL
reviews
- id — BIGINT — Primary key — NOT NULL
- user_mission_id — BIGINT — Foreign key → user_missions.id — NOT NULL
- user_id — BIGINT — Foreign key → users.id — NOT NULL
- store_id — BIGINT — Foreign key → stores.id — NOT NULL
- rating — INT — NOT NULL
- content — TEXT — NOT NULL
- created_at — DATETIME(6) — NOT NULL
- updated_at — DATETIME(6) — NOT NULL
stores
- id — BIGINT — Primary key — NOT NULL
- name — VARCHAR(100) — NOT NULL
- address — VARCHAR(255) — NOT NULL
- region_id — BIGINT — Foreign key → regions.id — NOT NULL
- created_at — DATETIME(6) — NOT NULL
- updated_at — DATETIME(6) — NOT NULL
user_food_preferences
- id — BIGINT — Primary key — NOT NULL
- user_id — BIGINT — Foreign key → users.id — NOT NULL
- food_category_id — BIGINT — Foreign key → food_categories.id — NOT NULL
- created_at — DATETIME(6) — NOT NULL
- updated_at — DATETIME(6)
user_missions
- id — BIGINT — Primary key — NOT NULL
- user_id — BIGINT — Foreign key → users.id — NOT NULL
- mission_id — BIGINT — Foreign key → missions.id — NOT NULL
- status — VARCHAR(20) — NOT NULL
- created_at — DATETIME(6) — NOT NULL
- updated_at — DATETIME(6) — NOT NULL
users
- id — BIGINT — Primary key — NOT NULL
- email — VARCHAR(255) — NOT NULL
- password — VARCHAR(255) — NOT NULL
- nickname — VARCHAR(50) — NOT NULL
- gender — VARCHAR(10)
- birth_date — DATE
- address_main — VARCHAR(255)
- total_points — INT — NOT NULL
- status — VARCHAR(15) — NOT NULL
- created_at — DATETIME(6) — NOT NULL
- updated_at — DATETIME(6) — NOT NULL
- deleted_at — DATETIME(6)