d

Tables (20)

admin_users

  • id — bigint — Primary key — NOT NULL
  • username — character — NOT NULL
  • password_hash — character — NOT NULL
  • name — character — NOT NULL
  • role — character — NOT NULL
  • refresh_token — character
  • created_at — timestamp
  • updated_at — timestamp
  • email — character
  • last_login_at — timestamp

cart_items

  • id — bigint — Primary key — NOT NULL
  • menu_item_id — character — NOT NULL
  • options_json — oid
  • quantity — integer — NOT NULL
  • cart_id — bigint — Foreign key → carts.id — NOT NULL

carts

  • id — bigint — Primary key — NOT NULL
  • created_at — timestamp — NOT NULL
  • session_id — character — NOT NULL
  • status — character — NOT NULL
  • updated_at — timestamp — NOT NULL

feedback_tags

  • feedback_id — bigint — Foreign key → feedbacks.id — NOT NULL
  • tag — character

feedbacks

  • id — bigint — Primary key — NOT NULL
  • session_id — character — NOT NULL
  • rating — integer — NOT NULL
  • comment — text — ex
  • created_at — timestamp
  • updated_at — timestamp

ingredients

  • id — bigint — Primary key — NOT NULL
  • ingredient_id — character — NOT NULL
  • name — character — NOT NULL
  • allergy_tag — character
  • calories — integer — NOT NULL
  • extra_price — integer — NOT NULL
  • protein — integer — NOT NULL
  • sodium — integer — NOT NULL

kiosk_session

  • id — bigint — Primary key — NOT NULL
  • session_id — character — NOT NULL
  • language — character — NOT NULL
  • large_text — boolean — NOT NULL
  • high_contrast — boolean — NOT NULL
  • voice_guidance — boolean — NOT NULL
  • input_mode — character — NOT NULL
  • kiosk_id — character — NOT NULL
  • app_version — character — NOT NULL
  • status — character — NOT NULL
  • created_at — timestamp
  • ended_at — timestamp
  • end_reason — character

menu_ingredient_links

  • menu_id — bigint — Foreign key → menu_items.id — NOT NULL
  • ingredient_id — bigint — Foreign key → ingredients.id — NOT NULL

menu_items

  • id — bigint — Primary key — NOT NULL
  • menu_item_id — character — NOT NULL
  • name — character — NOT NULL
  • name_en — character
  • price — integer — NOT NULL
  • hidden — boolean — NOT NULL
  • category_id — character — NOT NULL
  • image_url — text
  • description — character

option_groups

  • option_group_id — character — Primary key — NOT NULL
  • is_multiple_selection_allowed — boolean — NOT NULL
  • is_required — boolean — NOT NULL
  • name — character — NOT NULL
  • menu_item_id — bigint — Foreign key → menu_items.id

option_items

  • option_item_id — character — Primary key — NOT NULL
  • extra_price — integer — NOT NULL
  • name — character — NOT NULL
  • option_group_id — character — Foreign key → option_groups.option_group_id

order_counters

  • id — bigint — Primary key — NOT NULL
  • counter_date — date — NOT NULL
  • store_id — character — NOT NULL
  • kiosk_id — character — NOT NULL
  • current_value — integer — NOT NULL

order_items

  • id — bigint — Primary key — NOT NULL
  • menu_item_id — character — NOT NULL
  • name — character — NOT NULL
  • price — integer — NOT NULL
  • quantity — integer — NOT NULL
  • options_json — text
  • id_order — bigint — Foreign key → orders.id
  • line_total — integer — NOT NULL
  • unit_price — integer — NOT NULL
  • order_id — bigint — Foreign key → orders.id
  • total_price — integer — NOT NULL
  • options — text
  • created_at — timestamp
  • updated_at — timestamp

order_items_v2

  • id — bigint — Primary key — NOT NULL
  • created_at — timestamp — NOT NULL
  • total_price — integer — NOT NULL
  • menu_item_id — character — NOT NULL
  • name — character — NOT NULL
  • options — text
  • quantity — integer — NOT NULL
  • price — integer — NOT NULL
  • updated_at — timestamp — NOT NULL
  • order_id — bigint — Foreign key → orders.id — NOT NULL

orders

  • id — bigint — Primary key — NOT NULL
  • session_id — character — NOT NULL
  • order_id — character — NOT NULL
  • status — character — NOT NULL
  • status_update_note — character
  • created_at — timestamp
  • updated_at — timestamp
  • cancel_reason — character
  • memo — character
  • order_type — character — NOT NULL
  • total_price — integer — NOT NULL
  • order_number — integer

payments

  • id — bigint — Primary key — NOT NULL
  • order_id — character — NOT NULL
  • amount — numeric — NOT NULL
  • currency — character — NOT NULL
  • method — character — NOT NULL
  • mock — boolean — NOT NULL
  • return_url — character — NOT NULL
  • status — character — NOT NULL
  • pg_tid — character
  • pg_provider — character
  • refunded_amount — numeric — NOT NULL
  • approved_at — timestamp
  • buyer_type — character
  • kiosk_id — character
  • failure_reason — character
  • created_at — timestamp
  • updated_at — timestamp

session_event

  • id — bigint — Primary key — NOT NULL
  • kiosk_session_id — bigint — Foreign key → kiosk_session.id — NOT NULL
  • type — character — NOT NULL
  • payload — text — NOT NULL
  • occurred_at — timestamp — NOT NULL

staff

  • id — bigint — Primary key — NOT NULL
  • created_at — timestamp
  • updated_at — timestamp
  • message — text
  • order_id — character
  • reason — character — NOT NULL
  • screen — character
  • session_id — character — NOT NULL
  • status — character — NOT NULL

stocks

  • id — bigint — Primary key — NOT NULL
  • ingredient_id — character — NOT NULL
  • quantity — integer — NOT NULL
  • out_of_stock — boolean — NOT NULL
  • created_at — timestamp
  • updated_at — timestamp

tickets

  • id — bigint — Primary key — NOT NULL
  • order_id — character — NOT NULL
  • payment_id — character — NOT NULL
  • number — integer — NOT NULL
  • status — character — NOT NULL
  • priority — character — NOT NULL
  • called_at — timestamp
  • completed_at — timestamp
  • created_at — timestamp
  • updated_at — timestamp
  • served_at — timestamp