ThinkAbout

Tables (50)

ADMIN_DETAIL

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

COUPON

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

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_variant_id — BIGINT — Foreign key
  • quantity — INT — NOT NULL
  • updated_at — DATETIME

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
  • id2 — BIGINT — Foreign key → pay_status_code.pay_status_id — NOT NULL

CopyOfspecial_section

  • special_id — VARCHAR2(2) — Primary key — NOT NULL
  • product_id — BIGINT — Foreign key → product.product_id — NOT NULL
  • special_id2 — VARCHAR2(2) — Foreign key → special_section.special_id — NOT NULL

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)
  • created_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 — NOT NULL
  • Field — varchar(200)
  • created_at — TIMESTAMP
  • completed_at — TIMESTAMP

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 — NOT NULL
  • updated_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)
  • 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 — DATETIME
  • updated_at — DATETIME
  • id2 — BIGINT — Foreign key → Order_state_code.order_status_code_id — NOT NULL

Order_state_code

  • order_status_code_id — BIGINT — Primary key — NOT NULL
  • order_status_name_id — VARCHAR(50)

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)
  • cash_receipt — ENUM( Y, N )
  • 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
  • pg_id — BIGINT — Foreign key — NOT NULL
  • pay_status_id — BIGINT — Foreign key → pay_status_code.pay_status_id — NOT NULL
  • pay_type_id — BIGINT — Foreign key → Pay_type_code.pay_type_id — NOT NULL

PRODUCT_OPTION_PRICE

  • product_variant_id — BIGINT — Foreign key — NOT NULL
  • original_price — DECEMAL(10,2)
  • sale_price — DECIMAL(10, 2))
  • discount_rate — DECIMAL(5, 2)
  • discount_start_date — DATETIME
  • discount_end_date — DATETIME
  • created_at — DATETIME
  • updated_at — DATETIME

PRODUCT_SNAPSHOT

  • product_snapshot_id — BIGINT — Primary key — NOT NULL
  • product_id — BIGINT — Foreign key → product.product_id
  • 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
  • original_price — TEXT
  • extra_charge — TEXT
  • sale_price — TEXT
  • discount_rate — DECIMAL(5, 2)

PRODUCT_STOCK

  • product_variant_stock_id — BIGINT — Primary key — NOT NULL
  • PRODUCT_STOCK_STATUS — VARCHAR(255)
  • PRODUCT_STOCK — INT

Pay_type_code

  • pay_type_id — BIGINT — Primary key — NOT NULL
  • pay_type — VARCHAR(50)
  • cash_code — VARCHAR(50)

Refund

  • refund_id — BIGINT — Primary key — NOT NULL
  • payment_id — BIGINT — Foreign key → PAYMENT.payment_id — NOT NULL
  • delivery_exception_id — BIGINT — Foreign key — NOT NULL
  • bank_id — BIGINT — Foreign key → bank.bank_id — NOT NULL
  • return_id — BIGINT — Foreign key → Return.return_id — NOT NULL
  • refund_type — INT
  • refund_amount — DECIMAL(12,2)
  • refund_method_code — INT
  • refund_account — VARCHAR(100)
  • Field — varchar(200)
  • created_at — TIMESTAMP
  • completed_at — TIMESTAMP

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
  • shipment_id — VARCHAR(50) — Foreign key → Shipment.shipment_id — NOT NULL
  • return_judgement — VARCHAR(500)
  • judgment_reason — VARCHAR(500)
  • refund_option_code — INT
  • return_reason_code — INT
  • reason_detail — VARCHAR(500)
  • requested_at — TIMESTAMP
  • completed_at — TIMESTAMP
  • Field — VARCHAR(255)

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
  • shipment_status — INT — Foreign key → Shipment_related_code.shipment_status — NOT NULL
  • shipment_type_code — INT
  • shipment_option_code — INT
  • fee_bearer — VARCHAR(100)
  • amount — VARCHAR(255)
  • tracking_number — VARCHAR(100)
  • receiver_name — VARCHAR(100)
  • receiver_phone — VARCHAR(20)
  • receiver_address — TEXT
  • road_name_address1 — VARCHAR(100)
  • road_name_address2 — VARCHAR(100)
  • receiver_postal_code — VARCHAR(10)
  • street_number — VARCHAR(10)
  • english_address — VARCHAR(500)
  • receive_method — VARCHAR(500)
  • delivery_memo — TEXT
  • shipped_at — TIMESTAMP
  • delivered_at — TIMESTAMP
  • created_at — TIMESTAMP
  • updated_at — TIMESTAMP

Shipment_related_code

  • shipment_status — INT — Primary key — NOT NULL
  • code_group_num — TINYINT
  • code_id — TINYINT
  • code_name(ex. — pending)`
  • description — VARCHAR(500)
  • created_at — DATETIME

Size

  • size_id — BIGINT — Primary key — NOT NULL
  • name — VARCHAR(20)
  • is_active — TINYINT(1)

USERS

  • user_id — BIGINT — Primary key — NOT NULL
  • role_id — UUID — Foreign key — NOT NULL
  • login_id — VARCHAR(20)
  • password — VARCHAR(255)
  • is_activate — TINYINT(1)
  • is_auth_locked — TINYINT(1)
  • created_at — DATETIME
  • updated_at — DATETIME
  • deleted_at — DATETIME
  • 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
  • is_used — TINYINT(1)
  • used_at — DATETIME
  • coupon_num — BIGINT
  • created_at — DATETIME
  • 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')
  • job_code — INT — Foreign key — NOT NULL

authenticate

  • permission_id — UUID — Primary key — NOT NULL
  • name — VARCHAR — NOT NULL — UNIQUE user:read
  • version — VARCHAR
  • created_at — DATETIME

bank

  • bank_id — BIGINT — Primary key — NOT NULL
  • name — VARCHAR
  • is_active — TINYINT(1)

default_user_address

  • user_id — BIGINT — Foreign key → USER_DETAIL.user_id — NOT NULL
  • road_address_1 — VARCHAR(255)
  • road_address_2 — VARCHAR(255)
  • jibun_address — VARCHAR(255)
  • detail_address — VARCHAR(255)
  • english_address — VARCHAR(255)
  • zip_code — VARCHAR(20)
  • address_name — VARCHAR(30)

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

lv1

  • lv1_id — varchar2(2) — Primary key — NOT NULL
  • name — varchar2(100)
  • sort_order — int
  • is_active — char(1)

lv2

  • lv2_id — varchar2(2) — Primary key — NOT NULL
  • lv1_id — varchar2(2) — Foreign key → lv1.lv1_id — NOT NULL
  • name — varchar2(100)
  • sort_order — int
  • is_active — char(1)

lv3

  • lv3_id — varchar2(2) — Primary key — NOT NULL
  • lv2_id — varchar2(2) — Foreign key → lv2.lv2_id — NOT NULL
  • name — varchar2(100)
  • sort_order — int
  • is_active — char(1)

mileage

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

mileage_code

  • reason_code — VARCHAR(255) — Primary key — NOT NULL
  • description — VARCHAR(100)
  • amount — DECIMAL(10,2)
  • modify_type — ENUM('earn', 'use')
  • is_active — TINYINT(1)
  • exp_day — 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
  • related_order_id — BIGINT — Foreign key → ORDERS.order_id
  • review_id — BIGINT — Foreign key → review.review_id
  • balance_after — DECIMAL(10,2)
  • status — ENUM('pending','approve', 'reject','cancel','refund','complete')
  • reason_desc — VARCHAR(100)
  • created_at — DATETIME — NOT NULL
  • updated_at — DATETIME
  • expire_date — DATETIME

pay_status_code

  • pay_status_id — BIGINT — Primary key — NOT NULL
  • pay_status_name — VARCHAR(50)

product

  • product_id — BIGINT — Primary key — NOT NULL
  • category_lv3_id — varchar2(2) — Foreign key → lv3.lv3_id — NOT NULL
  • title — VARCHAR(200) — NOT NULL
  • price — DECIMAL(10,2) — NOT NULL
  • summary — VARCHAR(500)
  • description — TEXT
  • thumbnail — VARCHAR(255)
  • tags — VARCHAR(255)
  • seasons — BIT(4) — 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

product_description_image

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

product_variant_COLOR

  • color_id — BIGINT — Primary key — NOT NULL
  • name — VARCHAR(50) — NOT NULL
  • hex_code — VARCHAR(7) — NOT NULL
  • is_active — TINYINT(1)

product_variant_image

  • image_id — BIGINT — Primary key — NOT NULL
  • variant_id — BIGINT — Foreign key — NOT NULL
  • url — VARCHAR(255) — NOT NULL
  • format — ENUM('jpg', 'png', 'webp') — NOT NULL
  • render_priority — INT
  • created_at — DATETIME — NOT NULL

refund_account

  • user_id — BIGINT — Foreign key → USER_DETAIL.user_id — NOT NULL
  • account_name — VARCHAR(255)
  • account_num — VARCHAR(255)
  • bank_id — BIGINT — Foreign key → bank.bank_id — NOT NULL

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
  • status — ENUM('pending', 'approved', 'rejected') — NOT NULL
  • approved_at — DATETIME
  • approved_by — VARCHAR(255)
  • is_deleted — TINYINT(1)
  • created_at — DATETIME — NOT NULL
  • updated_at — DATETIME

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
  • reject_resaon — TEXT
  • is_deleted — TINYINT(1)
  • approved_at — DATETIME
  • 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
  • parent_id — INT
  • depth — INT
  • 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
  • is_deleted — DATETIME
  • updated_at — DATETIME

role-permission

  • id — BIGINT — Primary key — NOT NULL
  • role_id — UUID — Foreign key — NOT NULL
  • permission_id — UUID — Foreign key → authenticate.permission_id — NOT NULL

special_section

  • special_id — VARCHAR2(2) — Primary key — NOT NULL
  • name — VARCHAR2(100)
  • sort_order — int
  • is_active — TINYINT

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)