SKALA-shopping-mall
테이블 (14)
Cart
- cart_id — BIGINT
- user_id — BIGINT — NOT NULL
- created_at — DATETIME
- updated_at — DATETIME
CartItem
- cart_item_id — BIGINT
- cart_id — BIGINT — NOT NULL
- product_id — BIGINT — NOT NULL
- quantity — INT — NOT NULL
- created_at — DATETIME
- updated_at — DATETIME
Coupon
- coupon_id — BIGINT
- coupon_code — VARCHAR(50) — NOT NULL
- discount_type — ENUM('percentage', 'amount') — NOT NULL
- discount_value — DECIMAL(10,2) — NOT NULL
- valid_from — DATETIME — NOT NULL
- valid_until — DATETIME — NOT NULL
- created_at — DATETIME
- updated_at — DATETIME
OrderCouponUsageHistory
- order_coupon_usage_history_id — BIGINT
- user_coupon_list_coupon_id — BIGINT — NOT NULL
- order_id — BIGINT — NOT NULL
- created_at — DATETIME
- updated_at — DATETIME
OrderItem
- order_item_id — BIGINT
- order_id — BIGINT — NOT NULL
- product_id — BIGINT — NOT NULL
- quantity — INT — NOT NULL
- price — DECIMAL(10,2) — NOT NULL
- discount_rate — DECIMAL(5,2)
- created_at — DATETIME
- updated_at — DATETIME
Orders
- order_id — BIGINT
- user_id — BIGINT — NOT NULL
- total_amount — DECIMAL(10,2) — NOT NULL
- order_status — ENUM('received', 'paid', 'shipping', 'completed', 'cancelled') — NOT NULL
- created_at — DATETIME
- updated_at — DATETIME
Payment
- payment_id — BIGINT
- order_id — BIGINT — NOT NULL
- user_id — BIGINT — NOT NULL
- amount — DECIMAL(10,2) — NOT NULL
- payment_status — ENUM('approved', 'pending', 'failed') — NOT NULL
- created_at — DATETIME
- updated_at — DATETIME
Product
- product_id — BIGINT
- product_name — VARCHAR(255) — NOT NULL
- product_description — TEXT
- price — DECIMAL(10,2) — NOT NULL
- category — VARCHAR(100)
- stock_quantity — INT — NOT NULL
- created_at — DATETIME
- updated_at — DATETIME
ProductImage
- product_image_id — BIGINT
- product_id — BIGINT — NOT NULL
- image_url — VARCHAR(255) — NOT NULL
- created_at — DATETIME
- updated_at — DATETIME
Review
- review_id — BIGINT
- user_id — BIGINT — NOT NULL
- product_id — BIGINT — NOT NULL
- order_id — BIGINT — NOT NULL
- rating — INT — NOT NULL
- review_text — TEXT
- created_at — DATETIME
- updated_at — DATETIME
Shipping
- shipping_id — BIGINT
- order_id — BIGINT — NOT NULL
- shipping_address — VARCHAR(255) — NOT NULL
- shipping_date — DATETIME
- estimated_arrival_date — DATETIME
- arrival_date — DATETIME
- shipping_status — ENUM('preparing', 'in_transit', 'delivered', 'cancelled') — NOT NULL
- created_at — DATETIME
- updated_at — DATETIME
UserCouponList
- user_coupon_list_id — BIGINT
- user_id — BIGINT — NOT NULL
- created_at — DATETIME
- updated_at — DATETIME
UserCouponListCoupon
- user_coupon_list_coupon_id — BIGINT
- user_coupon_list_id — BIGINT — NOT NULL
- coupon_id — BIGINT — NOT NULL
- coupon_status — ENUM('valid', 'expired', 'used') — NOT NULL
- created_at — DATETIME
- updated_at — DATETIME
회원 (User)
- Key — 기본 키 — NOT NULL
- user_id — BIGINT
- email — VARCHAR(255) — NOT NULL
- password — VARCHAR(255) — NOT NULL
- name — VARCHAR(100) — NOT NULL
- phone_number — VARCHAR(20)
- address — VARCHAR(255)
- created_at — DATETIME
- updated_at — DATETIME
- deleted_at — DATETIME