fit mate

Tables (13)

categories

  • category_id — BIGINT
  • category_name — VARCHAR(50) — NOT NULL
  • parent_category_id — BIGINT — Foreign key → categories.category_id

favorites

  • favorite_id — BIGINT
  • user_id — BIGINT — Foreign key → users.user_id — NOT NULL
  • product_id — BIGINT — Foreign key → products.product_id — NOT NULL
  • created_at — DATETIME — NOT NULL

product_images

  • product_image_id — BIGINT
  • product_id — BIGINT — Foreign key → products.product_id — NOT NULL
  • image_url — VARCHAR(500) — NOT NULL
  • is_main — BOOLEAN — NOT NULL
  • created_at — DATETIME — NOT NULL

products

  • product_id — BIGINT
  • category_id — BIGINT — Foreign key → categories.category_id — NOT NULL
  • product_name — VARCHAR(200) — NOT NULL
  • brand — VARCHAR(100)
  • price — INT — NOT NULL
  • gender_target — ENUM('MALE', 'FEMALE', 'UNISEX')
  • color — VARCHAR(50)
  • size_info — VARCHAR(100)
  • product_url — VARCHAR(500) — NOT NULL
  • description — TEXT
  • stock_status — ENUM('ON_SALE', 'SOLD_OUT') — NOT NULL
  • created_at — DATETIME — NOT NULL
  • updated_at — DATETIME — NOT NULL

purchase_click_logs

  • click_log_id — BIGINT
  • user_id — BIGINT — Foreign key — NOT NULL
  • fitting_id — BIGINT — Foreign key
  • product_id — BIGINT — Foreign key — NOT NULL
  • clicked_at — DATETIME — NOT NULL

recommendation_items

  • recommendation_item_id — BIGINT
  • recommendation_id — BIGINT — Foreign key → recommendations.recommendation_id — NOT NULL
  • product_id — BIGINT — Foreign key → products.product_id — NOT NULL
  • rank_no — INT — NOT NULL
  • score — DECIMAL(5,2)
  • reason_text — VARCHAR(255)
  • created_at — DATETIME — NOT NULL

recommendations

  • recommendation_id — BIGINT
  • user_id — BIGINT — Foreign key → users.user_id — NOT NULL
  • user_image_id — BIGINT — Foreign key → user_images.user_image_id — NOT NULL
  • category_id — BIGINT — Foreign key → categories.category_id — NOT NULL
  • min_price — INT
  • max_price — INT
  • style_keyword — VARCHAR(100)
  • prompt_text — TEXT
  • created_at — DATETIME — NOT NULL

token_transactions

  • transaction_id — BIGINT
  • user_id — BIGINT — Foreign key → users.user_id — NOT NULL
  • related_fitting_id — BIGINT — Foreign key → virtual_fittings.fitting_id
  • transaction_type — ENUM('CHARGE', 'USE', 'REFUND') — NOT NULL
  • amount — INT — NOT NULL
  • balance_after — INT — NOT NULL
  • created_at — DATETIME — NOT NULL

user_images

  • user_image_id — BIGINT
  • user_id — BIGINT — Foreign key → users.user_id — NOT NULL
  • image_url — VARCHAR(500) — NOT NULL
  • photo_type — ENUM('FULL', 'TOP', 'BOTTOM') — NOT NULL
  • is_default — BOOLEAN — NOT NULL
  • created_at — DATETIME — NOT NULL

user_tokens

  • user_id — BIGINT — Foreign key → users.user_id
  • balance — INT — NOT NULL
  • updated_at — DATETIME — NOT NULL

users

  • user_id — BIGINT
  • email — VARCHAR(100) — NOT NULL
  • password — VARCHAR(255) — NOT NULL
  • nickname — VARCHAR(50) — NOT NULL
  • profile_image_url — VARCHAR(500)
  • created_at — DATETIME — NOT NULL
  • updated_at — DATETIME — NOT NULL

virtual_fitting_items

  • fitting_item_id — BIGINT
  • fitting_id — BIGINT — Foreign key — NOT NULL
  • product_id — BIGINT — Foreign key — NOT NULL
  • created_at — DATETIME — NOT NULL

virtual_fittings

  • fitting_id — BIGINT
  • user_id — BIGINT — Foreign key → users.user_id — NOT NULL
  • user_image_id — BIGINT — Foreign key → user_images.user_image_id — NOT NULL
  • product_id — BIGINT — Foreign key → products.product_id — NOT NULL
  • recommendation_id — BIGINT — Foreign key → recommendations.recommendation_id
  • result_image_url — VARCHAR(500)
  • status — ENUM('PENDING', 'SUCCESS', 'FAILED') — NOT NULL
  • token_cost — INT — NOT NULL
  • created_at — DATETIME — NOT NULL