hwabunShop

Tables (35)

admin_account

  • admin_account_id — VARCHAR(64) — Primary key — NOT NULL
  • email — VARCHAR(320) — NOT NULL
  • password_hash — VARCHAR(255) — NOT NULL
  • name — VARCHAR(100) — NOT NULL
  • status — ENUM('ACTIVE','INACTIVE','LOCKED') — NOT NULL
  • created_at — DATETIME(6) — NOT NULL

brand

  • brand_id — VARCHAR(64) — Primary key — NOT NULL
  • seller_account_id — VARCHAR(64) — Foreign key → seller_account.seller_account_id — NOT NULL
  • name — VARCHAR(200) — NOT NULL
  • description — TEXT
  • logo_url — VARCHAR(1000)
  • status — ENUM('ACTIVE','INACTIVE') — NOT NULL
  • created_at — DATETIME(6) — NOT NULL
  • updated_at — DATETIME(6) — NOT NULL

cart

  • cart_id — VARCHAR(64) — Primary key — NOT NULL
  • member_id — VARCHAR(64) — Foreign key → member.member_id — NOT NULL
  • created_at — DATETIME(6) — NOT NULL
  • updated_at — DATETIME(6) — NOT NULL

cart_item

  • cart_item_id — VARCHAR(64) — Primary key — NOT NULL
  • cart_id — VARCHAR(64) — Foreign key → cart.cart_id — NOT NULL
  • variant_id — VARCHAR(64) — Foreign key → product_variant.variant_id — NOT NULL
  • quantity — INT — NOT NULL
  • CHECK(quantity — >

category

  • category_id — VARCHAR(64) — Primary key — NOT NULL
  • parent_id — VARCHAR(64) — Foreign key → category.category_id
  • code — VARCHAR(100) — NOT NULL
  • name — VARCHAR(200) — NOT NULL
  • depth — TINYINT — NOT NULL
  • sort_order — INT — NOT NULL
  • is_active — BOOLEAN — NOT NULL

clean_feature

  • code — VARCHAR(64) — Primary key — NOT NULL
  • label_ko — VARCHAR(100) — NOT NULL
  • is_active — BOOLEAN — NOT NULL

concern

  • code — VARCHAR(64) — Primary key — NOT NULL
  • label_ko — VARCHAR(100) — NOT NULL
  • is_active — BOOLEAN — NOT NULL

eye_color

  • code — VARCHAR(32) — Primary key — NOT NULL
  • label_ko — VARCHAR(50) — NOT NULL
  • is_active — BOOLEAN — NOT NULL

feedback

  • feedback_id — VARCHAR(64) — Primary key — NOT NULL
  • member_id — VARCHAR(64) — Foreign key → member.member_id — NOT NULL
  • product_id — VARCHAR(64) — Foreign key → product.product_id — NOT NULL
  • axis_id — VARCHAR(32) — NOT NULL
  • order_item_id — VARCHAR(64) — Foreign key → order_item.order_item_id — NOT NULL
  • body — TEXT — NOT NULL
  • status — ENUM('VISIBLE','HIDDEN','DELETED') — NOT NULL
  • created_at — DATETIME(6) — NOT NULL
  • updated_at — DATETIME(6) — NOT NULL

feedback_classification

  • feedback_id — VARCHAR(64) — Foreign key → feedback.feedback_id — NOT NULL
  • classifier — VARCHAR(100)
  • vocab_version — VARCHAR(32)
  • primary_axis_id — VARCHAR(32)
  • primary_category_id — VARCHAR(64)
  • off_axis_hint — VARCHAR(32)
  • classification_status — ENUM('PENDING','COMPLETED','FAILED') — NOT NULL
  • classified_at — DATETIME(6)
  • banned_terms_json — JSON
  • hidden_by_default — BOOLEAN — NOT NULL

feedback_classification_label

  • axis_id — VARCHAR(32) — Primary key — NOT NULL
  • category_id — VARCHAR(64) — Primary key — NOT NULL
  • feedback_id — VARCHAR(64) — Foreign key → feedback.feedback_id — NOT NULL

hair_color

  • code — VARCHAR(32) — Primary key — NOT NULL
  • label_ko — VARCHAR(50) — NOT NULL
  • is_active — BOOLEAN — NOT NULL

ingredient

  • ingredient_code — VARCHAR(64) — Primary key — NOT NULL
  • label_ko — TEXT — NOT NULL
  • is_active — BOOLEAN — NOT NULL

member

  • member_id — VARCHAR(64) — Primary key — NOT NULL
  • email — VARCHAR(320) — NOT NULL
  • password_hash — VARCHAR(255) — NOT NULL
  • nickname — VARCHAR(100) — NOT NULL
  • status — ENUM('ACTIVE','INACTIVE','LOCKED') — NOT NULL
  • skin_type_code — VARCHAR(32) — Foreign key → skin_type.code
  • skin_tone_code — VARCHAR(32) — Foreign key → skin_tone.code
  • hair_color_code — VARCHAR(32) — Foreign key → hair_color.code
  • eye_color_code — VARCHAR(32) — Foreign key → eye_color.code
  • created_at — DATETIME(6) — NOT NULL
  • updated_at — DATETIME(6) — NOT NULL

order_item

  • order_item_id — VARCHAR(64) — Primary key — NOT NULL
  • order_id — VARCHAR(64) — Foreign key → shop_order.order_id — NOT NULL
  • variant_id — VARCHAR(64) — Foreign key → product_variant.variant_id — NOT NULL
  • product_id — VARCHAR(64) — Foreign key → product.product_id — NOT NULL
  • brand_id — VARCHAR(64) — Foreign key → product.brand_id — NOT NULL
  • product_name_snapshot — VARCHAR(300) — NOT NULL
  • brand_name_snapshot — VARCHAR(200) — NOT NULL
  • sku_snapshot — VARCHAR(64) — NOT NULL
  • variant_label_snapshot — VARCHAR(200) — NOT NULL
  • unit_price — DECIMAL(18,0) — NOT NULL
  • quantity — INT — NOT NULL
  • line_amount — DECIMAL(18,0) — NOT NULL
  • CHECK(quantity — >
  • CHECK(unit_price — >
  • CHECK(line_amount — =

price_bin

  • code — VARCHAR(16) — Primary key — NOT NULL
  • label_ko — VARCHAR(50) — NOT NULL
  • is_active — BOOLEAN — NOT NULL

product

  • product_id — VARCHAR(64) — Primary key — NOT NULL
  • brand_id — VARCHAR(64) — Foreign key → brand.brand_id — NOT NULL
  • category_id — VARCHAR(64) — Foreign key → category.category_id — NOT NULL
  • product_name — VARCHAR(300) — NOT NULL
  • product_source — ENUM('seed_catalog','brand_registered') — NOT NULL
  • status — ENUM('DRAFT','PENDING_APPROVAL','ACTIVE','INACTIVE','REJECTED') — NOT NULL
  • secondary_category — VARCHAR(64) — Foreign key → secondary_category.code — NOT NULL
  • tertiary_category — VARCHAR(64) — Foreign key → tertiary_category.code — NOT NULL
  • price_bin — VARCHAR(16) — Foreign key → price_bin.code — NOT NULL
  • rating — DECIMAL(4,2)
  • rating_source — ENUM('observed','injected') — NOT NULL
  • loves_count — INT
  • primary_image_url — VARCHAR(1000)
  • description_json — JSON
  • ingredients_text — TEXT
  • clean_json — JSON
  • texture_json — JSON
  • source_price_usd — DECIMAL(12,2)
  • source_rating — DECIMAL(4,2)
  • source_review_count — INT
  • source_loves_count — INT
  • source_rank — INT
  • created_at — DATETIME(6) — NOT NULL
  • updated_at — DATETIME(6) — NOT NULL

product_clean

  • product_id — VARCHAR(64) — Foreign key → product.product_id — NOT NULL
  • clean_code — VARCHAR(64) — Foreign key → clean_feature.code — NOT NULL

product_concern

  • product_id — VARCHAR(64) — Foreign key → product.product_id — NOT NULL
  • concern_code — VARCHAR(64) — Foreign key → concern.code — NOT NULL

product_image

  • image_id — VARCHAR(64) — Primary key — NOT NULL
  • product_id — VARCHAR(64) — Foreign key → product.product_id — NOT NULL
  • url — VARCHAR(1000) — NOT NULL
  • sort_order — INT — NOT NULL

product_ingredient

  • product_id — VARCHAR(64) — Foreign key → product.product_id — NOT NULL
  • ingredient_code — VARCHAR(64) — Foreign key → ingredient.ingredient_code — NOT NULL
  • first_position — INT
  • weight — DECIMAL(8,6)
  • parser_version — VARCHAR(32) — NOT NULL

product_skin_type

  • product_id — VARCHAR(64) — Foreign key → product.product_id — NOT NULL
  • skin_type_code — VARCHAR(32) — Foreign key → skin_type.code — NOT NULL

product_texture

  • product_id — VARCHAR(64) — Foreign key → product.product_id — NOT NULL
  • texture_code — VARCHAR(64) — Foreign key → texture_feature.code — NOT NULL

product_unmapped_value

  • unmapped_id — VARCHAR(64) — Primary key — NOT NULL
  • product_id — VARCHAR(64) — Foreign key → product.product_id — NOT NULL
  • field_name — VARCHAR(64) — NOT NULL
  • raw_value — VARCHAR(255) — NOT NULL
  • created_at — DATETIME(6) — NOT NULL

product_variant

  • variant_id — VARCHAR(64) — Primary key — NOT NULL
  • product_id — VARCHAR(64) — Foreign key → product.product_id — NOT NULL
  • sku_id — VARCHAR(64) — NOT NULL
  • label — VARCHAR(200) — NOT NULL
  • size — VARCHAR(100)
  • price_krw — DECIMAL(18,2) — NOT NULL
  • sale_price_krw — DECIMAL(18,2)
  • image_url — VARCHAR(1000)
  • swatch_url — VARCHAR(1000)
  • status — ENUM('ACTIVE','INACTIVE') — NOT NULL
  • sort_order — INT — NOT NULL
  • CHECK(price_krw — >
  • CHECK(sale_price_krw — IS

review

  • review_id — VARCHAR(64) — Primary key — NOT NULL
  • order_item_id — VARCHAR(64) — Foreign key → order_item.order_item_id — NOT NULL
  • rating — TINYINT — NOT NULL
  • is_recommended — BOOLEAN
  • title — VARCHAR(300)
  • body — TEXT
  • status — ENUM('PUBLISHED','HIDDEN','DELETED') — NOT NULL
  • skin_type_snapshot — VARCHAR(32)
  • skin_tone_snapshot — VARCHAR(32)
  • hair_color_snapshot — VARCHAR(32)
  • concerns_snapshot_json — JSON
  • created_at — DATETIME(6) — NOT NULL
  • updated_at — DATETIME(6) — NOT NULL
  • CHECK(rating — BETWEEN

secondary_category

  • code — VARCHAR(64) — Primary key — NOT NULL
  • label_ko — VARCHAR(100) — NOT NULL
  • is_active — BOOLEAN — NOT NULL

seller_account

  • seller_account_id — VARCHAR(64) — Primary key — NOT NULL
  • email — VARCHAR(320) — NOT NULL
  • password_hash — VARCHAR(255) — NOT NULL
  • name — VARCHAR(100) — NOT NULL
  • status — ENUM('ACTIVE','INACTIVE','LOCKED') — NOT NULL
  • created_at — DATETIME(6) — NOT NULL
  • updated_at — DATETIME(6) — NOT NULL

settlement

  • settlement_id — VARCHAR(64) — Primary key — NOT NULL
  • brand_id — VARCHAR(64) — Foreign key → brand.brand_id — NOT NULL
  • settlement_month — DATE — NOT NULL
  • currency — CHAR(3) — NOT NULL
  • gross_amount — DECIMAL(18,0) — NOT NULL
  • fee_amount — DECIMAL(18,0) — NOT NULL
  • net_amount — DECIMAL(18,0) — NOT NULL
  • status — ENUM('PENDING','COMPLETED') — NOT NULL
  • completed_at — DATETIME(6)
  • completed_by — VARCHAR(64) — Foreign key → admin_account.admin_account_id
  • CHECK(fee_amount — =
  • CHECK(net_amount — =

settlement_item

  • settlement_item_id — VARCHAR(64) — Primary key — NOT NULL
  • settlement_id — VARCHAR(64) — Foreign key → settlement.settlement_id — NOT NULL
  • brand_id — VARCHAR(64) — Foreign key → order_item.brand_id — NOT NULL
  • order_item_id — VARCHAR(64) — Foreign key → order_item.order_item_id — NOT NULL
  • gross_amount — DECIMAL(18,0) — NOT NULL
  • fee_amount — DECIMAL(18,0) — NOT NULL
  • net_amount — DECIMAL(18,0) — NOT NULL
  • CHECK(fee_amount — =
  • CHECK(net_amount — =

shop_order

  • order_id — VARCHAR(64) — Primary key — NOT NULL
  • member_id — VARCHAR(64) — Foreign key → member.member_id — NOT NULL
  • idempotency_key — VARCHAR(128) — NOT NULL
  • request_hash — CHAR(64) — NOT NULL
  • status — ENUM('CREATED','PAID','CANCELLED','REFUNDED') — NOT NULL
  • currency — CHAR(3) — NOT NULL
  • total_amount — DECIMAL(18,0) — NOT NULL
  • paid_at — DATETIME(6)
  • created_at — DATETIME(6) — NOT NULL
  • updated_at — DATETIME(6) — NOT NULL
  • CHECK(total_amount — >=

skin_tone

  • code — VARCHAR(32) — Primary key — NOT NULL
  • label_ko — VARCHAR(50) — NOT NULL
  • is_active — BOOLEAN — NOT NULL

skin_type

  • code — VARCHAR(32) — Primary key — NOT NULL
  • label_ko — VARCHAR(50) — NOT NULL
  • is_active — BOOLEAN — NOT NULL

tertiary_category

  • code — VARCHAR(64) — Primary key — NOT NULL
  • label_ko — VARCHAR(100) — NOT NULL
  • is_active — BOOLEAN — NOT NULL

texture_feature

  • code — VARCHAR(64) — Primary key — NOT NULL
  • label_ko — VARCHAR(100) — NOT NULL
  • is_active — BOOLEAN — NOT NULL