123
Tables (7)
members
- id — BIGINT — Primary key — NOT NULL
- email — VARCHAR(255) — NOT NULL
- password — VARCHAR(255) — NOT NULL
- name — VARCHAR(255) — NOT NULL
- phone_number — VARCHAR(255) — NOT NULL
- role — VARCHAR(30) — NOT NULL — USER, ADMIN
- point_wallet_id — BIGINT — Linked wallet id. Application-level reference.
- created_at — DATETIME(6)
- updated_at — DATETIME(6)
- deleted_at — DATETIME(6)
menus
- id — BIGINT — Primary key — NOT NULL
- name — VARCHAR(255) — NOT NULL
- description — VARCHAR(255) — NOT NULL
- image_url — VARCHAR(255)
- image_key — VARCHAR(255)
- price — INT — NOT NULL
- status — VARCHAR(30) — NOT NULL — ACTIVE, INACTIVE
- category — VARCHAR(30) — NOT NULL — COFFEE, LATTE, TEA, ADE, SMOOTHIE, DECAFFEINATED, DESSERT
- created_at — DATETIME(6)
- updated_at — DATETIME(6)
- deleted_at — DATETIME(6)
order_items
- id — BIGINT — Primary key — NOT NULL
- order_id — BIGINT — Foreign key → orders.id — NOT NULL
- menu_id — BIGINT — Foreign key → menus.id — NOT NULL
- menu_name — VARCHAR(255) — NOT NULL — Menu name snapshot at order time.
- quantity — INT — NOT NULL
- menu_price — BIGINT — NOT NULL — Menu price snapshot at order time.
- total_price — BIGINT — NOT NULL
- created_at — DATETIME(6)
- updated_at — DATETIME(6)
- deleted_at — DATETIME(6)
orders
- id — BIGINT — Primary key — NOT NULL
- order_number — VARCHAR(255) — NOT NULL
- member_id — BIGINT — Foreign key → members.id — NOT NULL
- total_amount — BIGINT — NOT NULL
- status — VARCHAR(30) — NOT NULL — PAID, CANCELED
- ordered_at — DATETIME(6) — NOT NULL
- created_at — DATETIME(6)
- updated_at — DATETIME(6)
- deleted_at — DATETIME(6)
point_histories
- id — BIGINT — Primary key — NOT NULL
- member_id — BIGINT — Foreign key → members.id — NOT NULL
- point_wallet_id — BIGINT — Foreign key → point_wallets.id — NOT NULL
- type — VARCHAR(30) — NOT NULL — CHARGE, USE, REFUND
- point — BIGINT — NOT NULL
- after_point — BIGINT — NOT NULL
- created_at — DATETIME(6)
- updated_at — DATETIME(6)
- deleted_at — DATETIME(6)
point_wallets
- id — BIGINT — Primary key — NOT NULL
- member_id — BIGINT — Foreign key → members.id — NOT NULL
- point — BIGINT — NOT NULL
- version — BIGINT
- created_at — DATETIME(6)
- updated_at — DATETIME(6)
- deleted_at — DATETIME(6)
refresh_tokens
- id — BIGINT — Primary key — NOT NULL
- member_id — BIGINT — Foreign key → members.id — NOT NULL
- token — VARCHAR(512) — NOT NULL