sdf
테이블 (12)
USERS (유저 테이블)
- user_id — bigint
- email — varchar(255) — NOT NULL
- password — varchar(255) — NOT NULL
- name — varchar(255) — NOT NULL
- phone — varchar(255)
- created_at — timestamp — NOT NULL
- updated_at — timestamp — NOT NULL
- is_active — boolean — NOT NULL
결제
- payment_id — bigint
- order_id — bigint — NOT NULL
- amount — decimal(10,2) — NOT NULL
- payment_method — varchar(255) — NOT NULL
- status — varchar(255) — NOT NULL
- payment_date — timestamp — NOT NULL
사용자_쿠폰
- user_coupon_id — bigint
- user_id — bigint — NOT NULL
- coupon_id — bigint — NOT NULL
- is_used — boolean — NOT NULL
- used_at — timestamp
- issued_at — timestamp — NOT NULL
상품
- product_id — bigint
- name — varchar(255) — NOT NULL
- description — text
- price — decimal(10,2) — NOT NULL
- category — varchar(255)
- created_at — timestamp — NOT NULL
- updated_at — timestamp — NOT NULL
- is_active — boolean — NOT NULL
상품_분석
- analytics_id — bigint
- product_id — bigint — NOT NULL
- view_count — int — NOT NULL
- purchase_count — int — NOT NULL
- conversion_rate — decimal(5,2) — NOT NULL
- recorded_at — timestamp — NOT NULL
상품_재고
- inventory_id — bigint
- product_id — bigint — NOT NULL
- quantity — int — NOT NULL
- last_updated — timestamp — NOT NULL
선착순_쿠폰
- coupon_id — bigint
- code — varchar(255) — NOT NULL
- type — varchar(255) — NOT NULL
- value — decimal(10,2) — NOT NULL
- total_quantity — int — NOT NULL
- used_quantity — int — NOT NULL
- valid_from — timestamp — NOT NULL
- valid_until — timestamp — NOT NULL
- is_active — boolean — NOT NULL
장바구니
- cart_item_id — bigint
- user_id — bigint — NOT NULL
- product_id — bigint — NOT NULL
- quantity — int — NOT NULL
- added_at — timestamp — NOT NULL
주문
- order_id — bigint
- user_id — bigint — NOT NULL
- total_amount — decimal(10,2) — NOT NULL
- status — varchar(255) — NOT NULL
- order_date — timestamp — NOT NULL
- coupon_id — bigint
- shipping_address — text — NOT NULL
주문_아이템
- order_item_id — bigint
- order_id — bigint — NOT NULL
- product_id — bigint — NOT NULL
- quantity — int — NOT NULL
- unit_price — decimal(10,2) — NOT NULL
- subtotal — decimal(10,2) — NOT NULL
쿠폰
- coupon_id — bigint
- code — varchar(255) — NOT NULL
- type — varchar(255) — NOT NULL
- value — decimal(10,2) — NOT NULL
- total_quantity — int — NOT NULL
- used_quantity — int — NOT NULL
- valid_from — timestamp — NOT NULL
- valid_until — timestamp — NOT NULL
- is_active — boolean — NOT NULL
- created_at — timestamp — NOT NULL
- updated_at — timestamp — NOT NULL
활동_로그
- log_id — bigint
- user_id — bigint — NOT NULL
- action_type — varchar(255) — NOT NULL
- description — text — NOT NULL
- created_at — timestamp — NOT NULL
- ip_address — varchar(255) — NOT NULL