shoppingmall
Tables (29)
cart
- cart_id — BIGINT — Primary key — NOT NULL
- created_at — DATETIME — NOT NULL
- user_id (user_id2) — BIGINT — Foreign key → user.user_id — NOT NULL
cart_item
- cart_item_id — BIGINT — Primary key — NOT NULL
- cart_id — BIGINT — Foreign key — NOT NULL
- sku_id (sku_id2) — BIGINT — Foreign key → sku.sku_id — NOT NULL
- quantity — INT — NOT NULL
claim
- claim_id — BIGINT — Primary key — NOT NULL
- claim_type — VARCHAR(30) — NOT NULL
- status — VARCHAR(30) — NOT NULL
- description — TEXT
- created_at — DATETIME — NOT NULL
- order_item_id — BIGINT — Foreign key → order_item.order_item_id — NOT NULL
coupon
- coupon_id — BIGINT — Primary key — NOT NULL
- coupon_type — VARCHAR(30) — NOT NULL
- discount_type — VARCHAR(20) — NOT NULL
- discount_value — INT — NOT NULL
- max_discount_amount — INT
- seller_id — BIGINT
- valid_from — DATETIME — NOT NULL
- valid_to — DATETIME — NOT NULL
- created_at — DATETIME — NOT NULL
coupon_issue
- coupon_issue_id — BIGINT — Primary key — NOT NULL
- coupon_id — BIGINT — Foreign key — NOT NULL
- user_id — BIGINT — NOT NULL
- issued_at — DATETIME — NOT NULL
- used_at — DATETIME
coupon_usage
- coupon_usage_id — BIGINT — Primary key — NOT NULL
- coupon_issue_id — BIGINT — Foreign key — NOT NULL
- discount_amount — INT — NOT NULL
- discount_payer_id — BIGINT — Foreign key — NOT NULL
- order_item_id (order_item_id2) — BIGINT — Foreign key → order_item.order_item_id — NOT NULL
discount_payer
- discount_payer_id — BIGINT — Primary key — NOT NULL
- payer_type — VARCHAR(20) — NOT NULL
- seller_id (seller_id2) — BIGINT — Foreign key → seller.seller_id — NOT NULL
exchange
- exchange_id — BIGINT — Primary key — NOT NULL
- exchange_status — VARCHAR(30) — NOT NULL
- reason — VARCHAR(255)
- requested_at — DATETIME — NOT NULL
- completed_at — DATETIME
- order_item_id (order_item_id2) — BIGINT — Foreign key → order_item.order_item_id — NOT NULL
option_group
- option_group_id — BIGINT — Primary key — NOT NULL
- name — VARCHAR(50) — NOT NULL
- sort_order — INT — NOT NULL
- product_id — BIGINT — Foreign key → product.product_id — NOT NULL
option_value
- option_value_id — BIGINT — Primary key — NOT NULL
- option_group_id — BIGINT — Foreign key — NOT NULL
- value — VARCHAR(50) — NOT NULL
order
- order_id — BIGINT — Primary key — NOT NULL
- user_id — BIGINT — NOT NULL
- order_status — VARCHAR(30) — NOT NULL
- total_amount — INT — NOT NULL
- created_at — DATETIME — NOT NULL
- updated_at — DATETIME — NOT NULL
- user_id (user_id2) — BIGINT — Foreign key → user.user_id — NOT NULL
order_item
- order_item_id — BIGINT — Primary key — NOT NULL
- order_id — BIGINT — Foreign key — NOT NULL
- price_snapshot — INT — NOT NULL
- option_snapshot — VARCHAR(255) — NOT NULL
- quantity — INT — NOT NULL
- order_item_status — VARCHAR(30) — NOT NULL
- created_at — DATETIME — NOT NULL
- sku_id (sku_id2) — BIGINT — Foreign key → sku.sku_id — NOT NULL
- seller_id (seller_id2) — BIGINT — Foreign key → seller.seller_id — NOT NULL
payment
- payment_id — BIGINT — Primary key — NOT NULL
- payment_method — VARCHAR(30) — NOT NULL
- payment_status — VARCHAR(30) — NOT NULL
- paid_amount — INT — NOT NULL
- payment_key — VARCHAR(100)
- approved_at — DATETIME
- created_at — DATETIME — NOT NULL
- order_id (order_id2) — BIGINT — Foreign key → order.order_id — NOT NULL
product
- product_id — BIGINT — Primary key — NOT NULL
- seller_id — BIGINT — NOT NULL
- name — VARCHAR(255) — NOT NULL
- description — TEXT
- base_price — INT — NOT NULL
- status — VARCHAR(20) — NOT NULL
- created_at — DATETIME — NOT NULL
- updated_at — DATETIME — NOT NULL
- seller_id (seller_id2) — BIGINT — Foreign key → seller.seller_id — NOT NULL
refund
- refund_id — BIGINT — Primary key — NOT NULL
- refund_amount — INT — NOT NULL
- refund_status — VARCHAR(30) — NOT NULL
- reason — VARCHAR(255)
- requested_at — DATETIME — NOT NULL
- completed_at — DATETIME
- order_item_id (order_item_id2) — BIGINT — Foreign key → order_item.order_item_id — NOT NULL
review
- review_id — BIGINT — Primary key — NOT NULL
- user_id — BIGINT — NOT NULL
- rating — INT — NOT NULL
- content — TEXT — NOT NULL
- created_at — DATETIME — NOT NULL
- order_item_id (order_item_id2) — BIGINT — Foreign key → order_item.order_item_id — NOT NULL
- user_id (user_id2) — BIGINT — Foreign key → user.user_id — NOT NULL
review_image
- review_image_id — BIGINT — Primary key — NOT NULL
- review_id — BIGINT — Foreign key — NOT NULL
- image_url — VARCHAR(255) — NOT NULL
review_reward
- review_reward_id — BIGINT — Primary key — NOT NULL
- review_id — BIGINT — Foreign key — NOT NULL
- reward_amount — INT — NOT NULL
- reward_status — VARCHAR(30) — NOT NULL
- granted_at — DATETIME
- user_id (user_id2) — BIGINT — Foreign key → user.user_id — NOT NULL
role
- role_id — BIGINT — Primary key — NOT NULL
- role_name — VARCHAR(50) — NOT NULL
seller
- seller_id — BIGINT — Primary key — NOT NULL
- user_id — BIGINT — Foreign key → user.user_id — NOT NULL
- brand_name — VARCHAR(255) — NOT NULL
- business_number — VARCHAR(50) — NOT NULL
- status — VARCHAR(20) — NOT NULL
- created_at — DATETIME — NOT NULL
settlement
- settlement_id — BIGINT — Primary key — NOT NULL
- period_start — DATE — NOT NULL
- period_end — DATE — NOT NULL
- total_amount — INT — NOT NULL
- settlement_status — VARCHAR(30) — NOT NULL
- settled_at — DATETIME
- created_at — DATETIME — NOT NULL
- seller_id (seller_id2) — BIGINT — Foreign key → seller.seller_id — NOT NULL
settlement_item
- settlement_item_id — BIGINT — Primary key — NOT NULL
- settlement_id — BIGINT — Foreign key — NOT NULL
- base_amount — INT — NOT NULL
- discount_amount — INT — NOT NULL
- commission_amount — INT — NOT NULL
- settled_amount — INT — NOT NULL
- created_at — DATETIME — NOT NULL
- order_item_id (order_item_id2) — BIGINT — Foreign key → order_item.order_item_id — NOT NULL
shipment
- shipment_id — BIGINT — Primary key — NOT NULL
- carrier — VARCHAR(50) — NOT NULL
- tracking_no — VARCHAR(100)
- shipment_status — VARCHAR(30) — NOT NULL
- shipped_at — DATETIME
- delivered_at — DATETIME
- created_at — DATETIME — NOT NULL
- order_item_id (order_item_id2) — BIGINT — Foreign key → order_item.order_item_id — NOT NULL
sku
- sku_id — BIGINT — Primary key — NOT NULL
- product_id — BIGINT — Foreign key — NOT NULL
- sku_code — VARCHAR(100) — NOT NULL
- price — INT — NOT NULL
- stock — INT — NOT NULL
- status — VARCHAR(20) — NOT NULL
- size — VARCHAR(20)
sku_option
- sku_id — BIGINT — Foreign key — NOT NULL
- option_value_id — BIGINT — Foreign key — NOT NULL
stock_history
- stock_history_id — BIGINT — Primary key — NOT NULL
- sku_id — BIGINT — Foreign key — NOT NULL
- change_amount — INT — NOT NULL
- reason — VARCHAR(50) — NOT NULL
- created_at — DATETIME — NOT NULL
user
- user_id — BIGINT — Primary key — NOT NULL
- email — VARCHAR(255) — NOT NULL
- password — VARCHAR(255) — NOT NULL
- name — VARCHAR(100) — NOT NULL
- status — VARCHAR(20) — NOT NULL
- created_at — DATETIME — NOT NULL
- updated_at — DATETIME — NOT NULL
user_role
- user_role_id — BIGINT — Primary key — NOT NULL
- user_id (user_id2) — BIGINT — Foreign key → user.user_id — NOT NULL
- role_id — BIGINT — Foreign key → role.role_id — NOT NULL
적립금 원장 (point ledger)
- point_ledger_id — BIGINT — Primary key — NOT NULL
- amount — INT — NOT NULL
- reason_type — VARCHAR(30) — NOT NULL
- ref_id — BIGINT
- created_at — DATETIME — NOT NULL
- user_id (user_id2) — BIGINT — Foreign key → user.user_id — NOT NULL