nu-01
Tables (4)
auth_sessions
- id — BIGINT — Primary key — NOT NULL
- user_id — BIGINT — Foreign key → users.id — NOT NULL
- refresh_token_hash — BINARY(32) — NOT NULL
- device_name — VARCHAR(100)
- ip_address — VARBINARY(16) — IPv4 or IPv6 in packed binary form
- refresh_expires_at — DATETIME(6) — NOT NULL
- last_used_at — DATETIME(6)
- revoked_at — DATETIME(6)
- revoke_reason — ENUM('LOGOUT', 'ROTATED', 'WITHDRAWN', 'SECURITY')
- created_at — DATETIME(6) — NOT NULL
- updated_at — DATETIME(6) — NOT NULL
products
- id — BIGINT — Primary key — NOT NULL
- external_id — VARCHAR(255)
- name — VARCHAR(300) — NOT NULL
- category — VARCHAR(100)
- description — TEXT
- price — DECIMAL(12, 2)
- image_url — VARCHAR(2048)
- seller_name — VARCHAR(200)
- purchase_url — VARCHAR(2048)
- status — ENUM('ACTIVE', 'SOLD_OUT', 'UNAVAILABLE') — NOT NULL
- created_at — DATETIME(6) — NOT NULL
- updated_at — DATETIME(6) — NOT NULL
recommendation_products
- user_id — BIGINT — Foreign key → users.id — NOT NULL
- product_id — BIGINT — Foreign key → products.id — NOT NULL
- score — DECIMAL(8, 6) — NOT NULL
- reason — VARCHAR(500)
- taste_keywords — JSON
- recommended_at — DATETIME(6) — NOT NULL
- updated_at — DATETIME(6) — NOT NULL
users
- id — BIGINT — Primary key — NOT NULL
- kakao_id — BIGINT — NOT NULL
- nickname — VARCHAR(50) — NOT NULL
- profile_image_url — VARCHAR(2048)
- gender — ENUM('MALE', 'FEMALE') — NOT NULL
- birth_date — DATE
- onboarding_completed — BOOLEAN — NOT NULL
- status — ENUM('ONBOARDING', 'ACTIVE', 'SUSPENDED', 'WITHDRAWN') — NOT NULL
- theme — ENUM('LIGHT', 'DARK', 'SYSTEM') — NOT NULL
- last_login_at — DATETIME(6)
- created_at — DATETIME(6) — NOT NULL
- updated_at — DATETIME(6) — NOT NULL