test
Tables (15)
answers
- id — uuid
- question_id — uuid — NOT NULL
- author_id — uuid — NOT NULL
- body — text — NOT NULL
- created_at — timestamptz — NOT NULL
cart_items
- id — uuid
- cart_id — uuid — NOT NULL
- product_variant_id — uuid — NOT NULL
- qty — int — NOT NULL
- unit_price_snapshot — numeric(12,2) — NOT NULL
- discount_snapshot — numeric(12,2) — NOT NULL
- created_at — timestamptz — NOT NULL
carts
- id — uuid
- user_id — uuid — NOT NULL
- created_at — timestamptz — NOT NULL
- updated_at — timestamptz — NOT NULL
categories
- id — uuid
- code — text — NOT NULL
- name — text — NOT NULL
- sort_order — int — NOT NULL
- is_active — boolean — NOT NULL
- parent_id — uuid
favorite_stores
- id — uuid
- user_id — uuid — NOT NULL
- store_id — uuid — NOT NULL
- created_at — timestamptz — NOT NULL
notifications
- id — uuid
- user_id — uuid — NOT NULL
- type — text — NOT NULL
- message — text — NOT NULL
- is_read — boolean — NOT NULL
- created_at — timestamptz — NOT NULL
- read_at — timestamptz
order_items
- id — uuid
- order_id — uuid — NOT NULL
- product_variant_id — uuid — NOT NULL
- qty — int — NOT NULL
- unit_price_snapshot — numeric(12,2) — NOT NULL
- discount_snapshot — numeric(12,2) — NOT NULL
orders
- id — uuid
- user_id — uuid — NOT NULL
- status — text — NOT NULL
- total_amount — numeric(12,2) — NOT NULL
- point_used — numeric(12,2) — NOT NULL
- point_earned — numeric(12,2) — NOT NULL
- receiver_name — text
- receiver_phone — text
- address1 — text
- address2 — text
- zipcode — text
- paid_at — timestamptz
- created_at — timestamptz — NOT NULL
- updated_at — timestamptz — NOT NULL
point_ledger
- id — uuid
- user_id — uuid — NOT NULL
- order_id — uuid
- type — text — NOT NULL
- delta — numeric(12,2) — NOT NULL
- balance_after — numeric(12,2) — NOT NULL
- created_at — timestamptz — NOT NULL
product_variants
- id — uuid
- product_id — uuid — NOT NULL
- sku — text — NOT NULL
- size — text
- stock — int — NOT NULL
- created_at — timestamptz — NOT NULL
- updated_at — timestamptz — NOT NULL
products
- id — uuid
- store_id — uuid — NOT NULL
- category_id — uuid — NOT NULL
- name — text — NOT NULL
- description — text
- price — numeric(12,2) — NOT NULL
- discount_rate — numeric(5,4) — NOT NULL
- discount_from — timestamptz
- discount_to — timestamptz
- image_url — text
- created_at — timestamptz — NOT NULL
- updated_at — timestamptz — NOT NULL
questions
- id — uuid
- product_id — uuid — NOT NULL
- author_id — uuid — NOT NULL
- title — text — NOT NULL
- body — text
- is_private — boolean — NOT NULL
- created_at — timestamptz — NOT NULL
reviews
- id — uuid
- order_item_id — uuid — NOT NULL
- author_id — uuid — NOT NULL
- rating — int — NOT NULL
- body — text
- created_at — timestamptz — NOT NULL
stores
- id — uuid
- owner_id — uuid — NOT NULL
- name — text — NOT NULL
- phone — text
- address — text
- image_url — text
- description — text
- created_at — timestamptz — NOT NULL
- updated_at — timestamptz — NOT NULL
users
- id — uuid
- email — text — NOT NULL
- password_hash — text — NOT NULL
- role — text — NOT NULL
- nickname — text — NOT NULL
- created_at — timestamptz — NOT NULL
- updated_at — timestamptz — NOT NULL