swatch

Tables (8)

brand_images

  • brand_image_id — BIGINT — Primary key — NOT NULL
  • brand_id — BIGINT — Foreign key → brands.brand_id — NOT NULL
  • image_url — VARCHAR(500) — NOT NULL
  • sort_order — INT — NOT NULL
  • created_at — DATETIME — NOT NULL

brand_moods

  • brand_id — BIGINT — Foreign key → brands.brand_id — NOT NULL
  • mood_id — BIGINT — Foreign key → moods.mood_id — NOT NULL

brands

  • brand_id — BIGINT — Primary key — NOT NULL
  • name — VARCHAR(100) — NOT NULL
  • one_line_intro — VARCHAR(255)
  • story — TEXT
  • instagram_url — VARCHAR(500)
  • website_url — VARCHAR(500)
  • thumbnail_url — VARCHAR(500)
  • source_type — VARCHAR(20) — NOT NULL
  • visibility — VARCHAR(20) — NOT NULL
  • created_by — BIGINT — Foreign key → users.user_id
  • created_at — DATETIME — NOT NULL
  • updated_at — DATETIME — NOT NULL

moods

  • mood_id — BIGINT — Primary key — NOT NULL
  • name — VARCHAR(50) — NOT NULL
  • display_order — INT — NOT NULL
  • is_active — BOOLEAN — NOT NULL

saved_brand_categories

  • saved_brand_id — BIGINT — Foreign key → saved_brands.saved_brand_id — NOT NULL
  • category_id — BIGINT — Foreign key → user_categories.category_id — NOT NULL
  • added_at — DATETIME — NOT NULL

saved_brands

  • saved_brand_id — BIGINT — Primary key — NOT NULL
  • user_id — BIGINT — Foreign key → users.user_id — NOT NULL
  • brand_id — BIGINT — Foreign key → brands.brand_id — NOT NULL
  • memo — TEXT
  • saved_at — DATETIME — NOT NULL
  • updated_at — DATETIME — NOT NULL

user_categories

  • category_id — BIGINT — Primary key — NOT NULL
  • user_id — BIGINT — Foreign key → users.user_id — NOT NULL
  • name — VARCHAR(50) — NOT NULL
  • is_default — BOOLEAN — NOT NULL
  • created_at — DATETIME — NOT NULL

users

  • user_id — BIGINT — Primary key — NOT NULL
  • email — VARCHAR(255) — NOT NULL
  • password — VARCHAR(255) — NOT NULL
  • nickname — VARCHAR(50) — NOT NULL
  • role — VARCHAR(20) — NOT NULL
  • created_at — DATETIME — NOT NULL
  • updated_at — DATETIME — NOT NULL