test

Tables (44)

ADMIN_DETAIL

  • user_id — BIGINT — Foreign key → USERS.user_id — NOT NULL
  • nickname — VARCHAR(255)

COUPON

  • coupon_id — BIGINT — Primary key — NOT NULL
  • coupon_name — VARCHAR(100)
  • coupon_type — ENUM('fixed', 'percentage')
  • discount_method — ENUM('amount', 'rate')
  • discount_value — DECIMAL(10,2)
  • min_order_amount — DECIMAL(10,2)
  • max_discount_amount — DECIMAL(10,2)
  • usage_limit — INT
  • used_count — INT
  • available_period — INT
  • coupon_status — ENUM('active', 'inactive', 'expired')
  • start_date — DATETIME
  • end_date — DATETIME
  • created_at — DATETIME
  • created_by — VARCHAR(255)
  • description — TEXT

Cart

  • cart_id — INT(10) — Primary key — NOT NULL
  • user_id — BIGINT — Foreign key → USERS.user_id — NOT NULL
  • created_at — DATETIME
  • updated_at — DATETIME
  • deleted_at — DATETIME

Cart_Item

  • cart_item_id — INT — Primary key — NOT NULL
  • cart_id — INT — Foreign key → Cart.cart_id — NOT NULL
  • product_id — BIGINT — Foreign key → product.product_id — NOT NULL
  • product_variant_id — BIGINT — Foreign key → product_variant.product_variant_id
  • quantity — INT — NOT NULL
  • updated_at — DATETIME

Colors

  • color_id — BIGINT — Primary key — NOT NULL
  • parent_id — BIGINT — Foreign key → Colors.color_id
  • name — VARCHAR(50) — NOT NULL
  • hex_code — VARCHAR(7) — NOT NULL
  • is_active — TINYINT(1)

CopyOfORDER_HISTORY

  • history_id — BIGINT — Primary key — NOT NULL
  • status — VARCHAR(50)
  • comment — TEXT
  • created_at — TIMESTAMP
  • created_by — VARCHAR(255)
  • payment_id — BIGINT — Foreign key → PAYMENT.payment_id — NOT NULL

DELIVERY_EXCEPTION

  • delivery_exception_id — BIGINT — Primary key — NOT NULL
  • shipment_id — VARCHAR(50) — Foreign key → Shipment.shipment_id — NOT NULL
  • exception_type — ENUM('damaged', 'lost', 'stolen', 'delay', 'wrong_address') — NOT NULL
  • status — ENUM('reported', 'investigating', 'resolved', 'rejected')
  • occurred_at — DATETIME
  • customer_claim_desc — TEXT
  • evidence_url — VARCHAR(500)
  • courier_claim_desc — TEXT
  • courier_evidence_url — VARCHAR(500)
  • customer_compensation — VARCHAR(200)
  • internal_memo — TEXT
  • created_at — DATETIME
  • updated_at — DATETIME
  • resolved_at — DATETIME
  • resolved_by — VARCHAR(255)

Delivery_Company_API

  • delivery_company_id — VARCHAR(50) — Primary key — NOT NULL
  • company_name — VARCHAR(100)
  • api_url — VARCHAR(255)
  • api_key — VARCHAR(255)
  • company_code — VARCHAR(20)
  • is_active — TINYINT(1)
  • created_at — DATETIME
  • updated_at — DATETIME

Exchange

  • exchange_id — BIGINT — Primary key — NOT NULL
  • return_id — BIGINT — Foreign key → Return.return_id — NOT NULL
  • original_order_id — BIGINT — Foreign key → ORDERS.order_id — NOT NULL
  • exchange_order_id — BIGINT — Foreign key → ORDERS.order_id
  • delivery_exception_id — BIGINT — Foreign key → DELIVERY_EXCEPTION.delivery_exception_id — NOT NULL
  • status — ENUM('requested', 'approved', 'rejected', 'processing', 'completed')
  • admin_memo — VARCHAR(500)
  • created_at — DATETIME
  • updated_at — DATETIME
  • approved_at — DATETIME
  • completed_at — DATETIME

Inquiry

  • inquiry_id — BIGINT — Primary key — NOT NULL
  • user_id — BIGINT — Foreign key → USERS.user_id — NOT NULL
  • product_id — BIGINT — Foreign key → product.product_id
  • title — VARCHAR(200)
  • content — TEXT
  • inquiry_category — ENUM('product', 'delivery', 'payment', 'refund', 'etc')
  • status — ENUM('pending', 'answered', 'closed')
  • is_secret — TINYINT(1)
  • created_at — DATETIME
  • updated_at — DATETIME
  • deleted_at — DATETIME

LOGIN_HISTORY

  • id — BIGINT — Primary key — NOT NULL
  • user_id — BIGINT — Foreign key → USERS.user_id — NOT NULL
  • ip — VARCHAR(45)
  • browser — VARCHAR(255)
  • nation — VARCHAR(100)
  • region — VARCHAR(100)
  • attempt_result — TINYINT(1)
  • consecutive_failed_login_attempt — INT
  • created_at — DATETIME

ORDERS

  • order_id — BIGINT — Primary key — NOT NULL
  • user_id — BIGINT — Foreign key → USERS.user_id — NOT NULL
  • user_coupon_id — BIGINT — Foreign key → USER_COUPON.user_coupon_id — NOT NULL
  • order_num — VARCHAR(50)
  • total_count — INT
  • total_price — DECIMAL(12,2)
  • order_status — ENUM('pending', 'confirmed', 'processing', 'shipped', 'delivered', 'cancelled', 'refunded')
  • use_mile — DECIMAL(10,2)
  • order_amount — DECIMAL(12,2)
  • shipping_fee — DECIMAL(8,2)
  • discount_amount — DECIMAL(10,2)
  • final_amount — DECIMAL(12,2)
  • created_at — TIMESTAMP
  • updated_at — TIMESTAMP

ORDER_HISTORY

  • history_id — BIGINT — Primary key — NOT NULL
  • order_id — BIGINT — Foreign key → ORDERS.order_id — NOT NULL
  • status — VARCHAR(50)
  • comment — TEXT
  • created_at — TIMESTAMP
  • created_by — VARCHAR(255)

ORDER_ITEM

  • order_item_id — BIGINT — Primary key — NOT NULL
  • order_id — BIGINT — Foreign key → ORDERS.order_id — NOT NULL
  • product_snapshot_id — BIGINT — Foreign key → PRODUCT_SNAPSHOT.product_snapshot_id — NOT NULL
  • created_at — DATETIME

PAYMENT

  • payment_id — BIGINT — Primary key — NOT NULL
  • order_id — BIGINT — Foreign key → ORDERS.order_id — NOT NULL
  • user_id — BIGINT — Foreign key → USERS.user_id
  • order_num — VARCHAR(50)
  • paid_amount — DECIMAL(12,2)
  • pay_type — ENUM('card', 'bank_transfer', 'virtual_account', 'mobile', 'kakao_pay', 'naver_pay', 'payco')
  • payment_status — ENUM('pending', 'completed', 'failed', 'cancelled', 'refunded')
  • pg_id — VARCHAR(50)
  • pg_transaction_id — VARCHAR(100)
  • payment_key — VARCHAR(100)
  • receipt_url — VARCHAR(500)
  • created_at — TIMESTAMP
  • updated_at — TIMESTAMP
  • approved_at — TIMESTAMP
  • cancelled_at — TIMESTAMP
  • Key — VARCHAR(255) — Foreign key → Untitled.Key — NOT NULL

PRODUCT_SNAPSHOT

  • product_snapshot_id — BIGINT — Primary key — NOT NULL
  • product_id — BIGINT — Foreign key → product.product_id — NOT NULL
  • title — VARCHAR(200) — NOT NULL
  • price — DECIMAL(10,2) — NOT NULL
  • discount_price — DECIMAL(10,2)
  • sku — VARCHAR(50)
  • summary — VARCHAR(500)
  • description — TEXT
  • thumbnail — VARCHAR(255)
  • weight — DECIMAL(5,2)
  • dimensions — VARCHAR(50)
  • special — VARCHAR(100)
  • tags — VARCHAR(255)
  • seasons — BIT(4) — NOT NULL
  • is_featured — BIT(1) — NOT NULL
  • average_rating — DECIMAL(3,1)
  • sales_count — INT
  • view_count — INT
  • stock_quantity — INT
  • availability_date — DATETIME
  • enabled — BIT(1) — NOT NULL
  • created_at — DATETIME — NOT NULL
  • updated_at — DATETIME
  • deleted_at — DATETIME
  • is_deleted — DATETIME
  • hex_code — VARCHAR(7)
  • color_name — VARCHAR(50)
  • size — VARCHAR(50)
  • fabric_info — TEXT
  • care_instructions — TEXT

Refund

  • refund_id — BIGINT — Primary key — NOT NULL
  • return_id — BIGINT — Foreign key → Return.return_id — NOT NULL
  • payment_id — BIGINT — Foreign key → PAYMENT.payment_id — NOT NULL
  • refund_type — ENUM('full', 'partial')
  • refund_amount — DECIMAL(12,2)
  • refund_method — ENUM('card', 'bank_transfer', 'mileage')
  • refund_account — VARCHAR(100)
  • status — ENUM('requested', 'processing', 'completed', 'failed')
  • admin_memo — VARCHAR(500)
  • created_at — DATETIME
  • requested_at — DATETIME
  • processed_at — DATETIME
  • completed_at — DATETIME

Return

  • return_id — BIGINT — Primary key — NOT NULL
  • order_id — BIGINT — Foreign key → ORDERS.order_id — NOT NULL — 주문에 고객정보 있음
  • approve_admin_id — BIGINT — Foreign key → ADMIN_DETAIL.user_id — NOT NULL
  • delivery_exception_id — BIGINT — Foreign key → DELIVERY_EXCEPTION.delivery_exception_id — NOT NULL
  • return_judgement — VARCHAR(500)
  • judgment_reason — VARCHAR(500)
  • refund_option — ENUM('refund', 'exchange', )
  • return_reason — ENUM('defective', 'wrong_item', 'size_issue', 'change_of_mind', 'delivery_issue')
  • reason_detail — VARCHAR(500)
  • status — ENUM('requested', 'approved', 'rejected', 'processing', 'completed')
  • created_at — DATETIME
  • requested_at — DATETIME
  • processed_at — DATETIME
  • completed_at — DATETIME

Shipment

  • shipment_id — VARCHAR(50) — Primary key — NOT NULL
  • order_id — BIGINT — Foreign key → ORDERS.order_id
  • handover_id — VARCHAR(50) — Foreign key → handover.handover_id — NOT NULL
  • delivery_company_id — VARCHAR(50) — Foreign key → Delivery_Company_API.delivery_company_id
  • return_id — BIGINT — Foreign key → Return.return_id — NOT NULL
  • exchange_id — BIGINT — Foreign key → Exchange.exchange_id — NOT NULL
  • shipment_type — ENUM('delivery', 'pickup', 'return', 'exchange')
  • shipment_option — ENUM('standard', 'express', 'same_day', 'pickup')
  • shipment_fee — DECIMAL(8,2)
  • status_code — ENUM('pending', 'processing', 'shipped', 'in_transit', 'delivered', 'failed', 'returned')
  • tracking_number — VARCHAR(100)
  • receiver_name — VARCHAR(100)
  • receiver_phone — VARCHAR(20)
  • receiver_address — TEXT
  • receiver_postal_code — VARCHAR(10)
  • receive_method — ENUM('direct', 'parcel_locker', 'security_office', 'safe_place')
  • delivery_memo — TEXT
  • shipped_at — DATETIME
  • delivered_at — DATETIME
  • created_at — DATETIME
  • updated_at — DATETIME

USERS

  • user_id — BIGINT — Primary key — NOT NULL
  • password — VARCHAR(255)
  • is_activate — TINYINT(1)
  • created_at — DATETIME
  • updated_at — DATETIME
  • deleted_at — DATETIME
  • role — ENUM('ADMIN', 'USER')
  • is_deleted — TINYINT(1)

USER_COUPON

  • user_coupon_id — BIGINT — Primary key — NOT NULL
  • user_id — BIGINT — Foreign key → USERS.user_id — NOT NULL
  • coupon_id — BIGINT — Foreign key → COUPON.coupon_id — NOT NULL
  • coupon_code — VARCHAR(50)
  • issued_at — DATETIME
  • used_at — DATETIME
  • is_used — TINYINT(1)
  • expire_at — DATETIME
  • deleted_at — DATETIME

USER_DETAIL

  • user_id — BIGINT — Foreign key → USERS.user_id — NOT NULL
  • email — VARCHAR(255)
  • name — VARCHAR(255)
  • phone_number — VARCHAR(20)
  • birth_date — DATE
  • gender — ENUM('M', 'F')
  • Field — VARCHAR(255)
  • job_code — VARCHAR(255) — Foreign key → global_code.code — NOT NULL

Untitled

  • Key — VARCHAR(255) — Primary key — NOT NULL
  • Field — VARCHAR(255)

WISH_LIST

  • wish_id — BIGINT — Primary key — NOT NULL
  • user_id — BIGINT — Foreign key → USERS.user_id — NOT NULL
  • product_id — BIGINT — Foreign key → product.product_id — NOT NULL
  • added_at — DATETIME

global_code

  • code — VARCHAR(255) — Primary key — NOT NULL

handover

  • handover_id — VARCHAR(50) — Primary key — NOT NULL
  • scheduled_at — DATETIME
  • completed_at — DATETIME
  • notes — TEXT
  • created_at — DATETIME
  • Field — VARCHAR(255)
  • Field3 — VARCHAR(20)
  • Field2 — VARCHAR(255)
  • Field4 — VARCHAR(20)

inquiry_answer

  • inquiry_answer_id — BIGINT — Primary key — NOT NULL
  • inquiry_id — BIGINT — Foreign key → Inquiry.inquiry_id — NOT NULL
  • admin_id — BIGINT — Foreign key → ADMIN_DETAIL.user_id — NOT NULL
  • content — TEXT
  • created_at — DATETIME
  • updated_at — DATETIME

mileage

  • mileage_id — BIGINT — Primary key — NOT NULL
  • user_id — BIGINT — Foreign key → USERS.user_id — NOT NULL
  • current_amount — DECIMAL(10,2)
  • total_earned — DECIMAL(10,2)
  • total_used — DECIMAL(10,2)
  • updated_at — DATETIME

mileage_code

  • reason_code — VARCHAR(255) — Primary key — NOT NULL
  • reason_name — VARCHAR(100)
  • amount — DECIMAL(10,2)
  • description — TEXT
  • modify_type — ENUM('earn', 'use', 'expire', 'cancel')
  • is_active — TINYINT(1)
  • Field — DATETIME

mileage_history

  • history_id — BIGINT — Primary key — NOT NULL
  • user_id — BIGINT — Foreign key → USERS.user_id — NOT NULL
  • mileage_id — BIGINT — Foreign key → mileage.mileage_id — NOT NULL
  • reason_code — VARCHAR(255) — Foreign key → mileage_code.reason_code — NOT NULL
  • balance_after — DECIMAL(10,2)
  • related_order_id — BIGINT — Foreign key → ORDERS.order_id
  • product_id — BIGINT — Foreign key → product.product_id
  • review_id — BIGINT — Foreign key → review.review_id
  • expire_date — DATETIME
  • created_at — DATETIME — NOT NULL
  • Field — VARCHAR(100)
  • Field2 — VARCHAR(255)

model

  • model_id — BIGINT — Primary key — NOT NULL
  • name — VARCHAR(100)
  • height — INT
  • weight — INT
  • gender — ENUM('M', 'F', 'O')
  • age — INT
  • is_active — TINYINT(1)

notice

  • notice_id — INT(10) — Primary key — NOT NULL
  • title — VARCHAR(200) — NOT NULL
  • content — TEXT — NOT NULL
  • category — ENUM('general', 'event', 'system', 'delivery')
  • is_pinned — TINYINT(1)
  • is_active — TINYINT(1)
  • view_count — INT(10)
  • created_at — DATETIME
  • updated_at — DATETIME
  • deleted_at — DATETIME
  • created_by — BIGINT — Foreign key → ADMIN_DETAIL.user_id

product

  • product_id — BIGINT — Primary key — NOT NULL
  • category_id — BIGINT — Foreign key → product_category.category_id — NOT NULL
  • title — VARCHAR(200) — NOT NULL
  • price — DECIMAL(10,2) — NOT NULL
  • discount_price — DECIMAL(10,2)
  • summary — VARCHAR(500)
  • description — TEXT
  • thumbnail — VARCHAR(255)
  • weight — DECIMAL(5,2)
  • dimensions — VARCHAR(50)
  • tags — VARCHAR(255)
  • seasons — BIT(4) — NOT NULL
  • is_featured — BIT(1) — NOT NULL
  • average_rating — DECIMAL(3,1)
  • sales_count — INT
  • view_count — INT
  • stock_quantity — INT
  • availability_date — DATETIME
  • enabled — BIT(1) — NOT NULL
  • created_at — DATETIME — NOT NULL
  • updated_at — DATETIME
  • deleted_at — DATETIME
  • is_deleted — DATETIME
  • is_best — TINYINT(1)

product_category

  • category_id — BIGINT — Primary key — NOT NULL
  • parent_id — BIGINT — Foreign key → product_category.category_id
  • name — VARCHAR(100) — NOT NULL
  • description — TEXT
  • sort_order — INT
  • is_active — TINYINT(1)

product_description_image

  • image_id — BIGINT — Primary key — NOT NULL
  • product_id — BIGINT — Foreign key → product.product_id — NOT NULL
  • url — VARCHAR(255) — NOT NULL
  • format — ENUM('jpg', 'png', 'webp') — NOT NULL
  • min_width — INT
  • max_width — INT
  • render_priority — INT
  • created_at — DATETIME — NOT NULL

product_variant

  • product_variant_id — BIGINT — Primary key — NOT NULL
  • product_id — BIGINT — Foreign key → product.product_id — NOT NULL
  • color_id — INT — Foreign key → Colors.color_id — NOT NULL
  • sku — VARCHAR(50) — NOT NULL
  • size — VARCHAR(50) — NOT NULL
  • remaining_stock — INT — NOT NULL
  • stock_status — ENUM('in_stock', 'out_of_stock', 'low_stock') — NOT NULL
  • price_modifier — DECIMAL(10,2)
  • image_url — VARCHAR(255)
  • created_at — DATETIME — NOT NULL
  • updated_at — DATETIME
  • extra_charge — INT

product_variant_image

  • image_id — BIGINT — Primary key — NOT NULL
  • variant_id — BIGINT — Foreign key → product_variant.product_variant_id — NOT NULL
  • url — VARCHAR(255) — NOT NULL
  • format — ENUM('jpg', 'png', 'webp') — NOT NULL
  • image_type — ENUM('main', 'front', 'back', 'side', 'zoom')
  • min_width — INT
  • max_width — INT
  • render_priority — INT
  • created_at — DATETIME — NOT NULL

product_varient_detail

  • product_detail_id — BIGINT(20) — Primary key — NOT NULL
  • product_variant_id — BIGINT — Foreign key → product_variant.product_variant_id — NOT NULL
  • model_id — BIGINT — Foreign key → model.model_id — NOT NULL
  • related_item_id — VARCHAR(50)
  • qna — LONGTEXT
  • delivery_option — VARCHAR(100)
  • model_specific — VARCHAR(100)
  • fabric_info — TEXT
  • care_instructions — TEXT

report

  • report_id — VARCHAR(255) — Primary key — NOT NULL
  • user_id — VARCHAR(255) — Foreign key → USERS.user_id — NOT NULL
  • target_type — ENUM('review', 'comment') — NOT NULL
  • target_id — VARCHAR(255) — NOT NULL
  • reason — TEXT — NOT NULL
  • state — ENUM('pending', 'approved', 'rejected') — NOT NULL
  • approved_at — DATETIME
  • approved_by — VARCHAR(255)
  • is_deleted — TINYINT(1)
  • created_at — DATETIME — NOT NULL

review

  • review_id — BIGINT — Primary key — NOT NULL
  • user_id — BIGINT — Foreign key → USERS.user_id — NOT NULL
  • product_id — BIGINT — Foreign key → product.product_id — NOT NULL
  • purchase_id — VARCHAR(255) — NOT NULL
  • rating — TINYINT(1) — NOT NULL
  • title — VARCHAR(200)
  • content — TEXT
  • img_url — TEXT
  • like_count — INT(10) — NOT NULL
  • state — ENUM('auto', 'pending', 'approved', 'rejected') — NOT NULL
  • approved_at — DATETIME
  • is_deleted — TINYINT(1)
  • created_at — DATETIME — NOT NULL
  • updated_at — DATETIME
  • deleted_at — DATETIME

review_comment

  • comment_id — INT — Primary key — NOT NULL
  • review_id — BIGINT — Foreign key → review.review_id — NOT NULL
  • user_id — BIGINT — Foreign key → USERS.user_id
  • content — TEXT — NOT NULL
  • is_deleted — TINYINT(1) — NOT NULL
  • created_at — DATETIME — NOT NULL
  • updated_at — DATETIME
  • deleted_at — DATETIME

review_like

  • like_id — BIGINT — Primary key — NOT NULL
  • review_id — BIGINT — Foreign key → review.review_id — NOT NULL
  • user_id — BIGINT — Foreign key → USERS.user_id — NOT NULL
  • created_at — DATETIME — NOT NULL

terms

  • terms_id — BIGINT — Primary key — NOT NULL
  • title — VARCHAR(200)
  • code — VARCHAR(50)
  • content — TEXT
  • version — VARCHAR(20)
  • is_required — TINYINT(1)
  • is_active — TINYINT(1)
  • created_at — DATETIME
  • effective_from — DATETIME
  • effective_to — DATETIME

user_terms_agreement

  • agreement_id — BIGINT — Primary key — NOT NULL
  • user_id — BIGINT — Foreign key → USERS.user_id — NOT NULL
  • terms_id — BIGINT — Foreign key → terms.terms_id — NOT NULL
  • agreed_at — DATETIME
  • ip_address — VARCHAR(45)