nu-02

Tables (7)

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

product_clicks

  • id — BIGINT — Primary key — NOT NULL
  • user_id — BIGINT — Foreign key → users.id — NOT NULL
  • product_id — BIGINT — Foreign key → products.id — NOT NULL
  • recommendation_id — BIGINT — Foreign key → recommendation_requests.id
  • detail_type — ENUM('SELF', 'FRIEND', 'PROPOSED_GIFT') — NOT NULL
  • clicked_url — VARCHAR(2048) — NOT NULL
  • clicked_at — DATETIME(6) — NOT NULL

product_feedbacks

  • user_id — BIGINT — Foreign key → users.id — NOT NULL
  • product_id — BIGINT — Foreign key → products.id — NOT NULL
  • recommendation_id — BIGINT — Foreign key → recommendation_requests.id
  • feedback_type — ENUM('POSITIVE', 'NEGATIVE') — NOT NULL
  • dislike_reason — VARCHAR(500)
  • is_anonymous — BOOLEAN — NOT NULL
  • 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

  • recommendation_id — BIGINT — Foreign key → recommendation_requests.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

recommendation_requests

  • id — BIGINT — Primary key — NOT NULL
  • requester_user_id — BIGINT — Foreign key → users.id — NOT NULL
  • target_user_id — BIGINT — Foreign key → users.id — NOT NULL
  • previous_request_id — BIGINT — Foreign key → recommendation_requests.id — Previous request when asking for different products
  • type — ENUM('SELF', 'FRIEND') — NOT NULL
  • min_price — DECIMAL(12, 2) — NOT NULL
  • max_price — DECIMAL(12, 2) — NOT NULL
  • criteria_snapshot — JSON — Taste and interest conditions at request time
  • status — ENUM('PENDING', 'COMPLETED', 'FAILED') — NOT NULL
  • completed_at — DATETIME(6)
  • created_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', 'UNSPECIFIED') — 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