hof

Tables (16)

audit_logs

  • log_id — uuid — Primary key — NOT NULL
  • occurred_at — timestamp with time zone — NOT NULL
  • actor_type — varchar(16) — NOT NULL
  • actor_id — varchar(200)
  • action — varchar(100) — NOT NULL
  • entity_type — varchar(100) — NOT NULL
  • entity_id — varchar(200) — NOT NULL
  • from_value — text
  • to_value — text
  • request_id — uuid
  • detail_json — jsonb

auth_attempts

  • attempt_key — varchar(200) — Primary key — NOT NULL
  • failure_count — integer — NOT NULL
  • window_started_at — timestamp with time zone — NOT NULL
  • blocked_until — timestamp with time zone
  • updated_at — timestamp with time zone — NOT NULL

calls

  • call_id — uuid — Primary key — NOT NULL
  • table_id — varchar(20) — Foreign key → tables.table_id — NOT NULL
  • reason — varchar(32) — NOT NULL
  • status — varchar(16) — NOT NULL
  • client_request_id — uuid — NOT NULL
  • created_at — timestamp with time zone — NOT NULL
  • acknowledged_at — timestamp with time zone
  • acknowledged_by — varchar(100)
  • cancelled_at — timestamp with time zone
  • updated_at — timestamp with time zone — NOT NULL

categories

  • category_id — varchar(100) — Primary key — NOT NULL
  • label — varchar(100) — NOT NULL
  • heading — varchar(200) — NOT NULL
  • sort_order — integer — NOT NULL
  • active — boolean — NOT NULL
  • updated_at — timestamp with time zone — NOT NULL

domain_events

  • event_id — bigserial — Primary key — NOT NULL
  • event_type — varchar(100) — NOT NULL
  • entity_id — varchar(200) — NOT NULL
  • table_id — varchar(20)
  • revision — bigint — NOT NULL
  • payload — jsonb — NOT NULL
  • occurred_at — timestamp with time zone — NOT NULL

flyway_schema_history

  • installed_rank — integer — Primary key — NOT NULL
  • version — varchar(50)
  • description — varchar(200) — NOT NULL
  • type — varchar(20) — NOT NULL
  • script — varchar(1000) — NOT NULL
  • checksum — integer
  • installed_by — varchar(100) — NOT NULL
  • installed_on — timestamp — NOT NULL
  • execution_time — integer — NOT NULL
  • success — boolean — NOT NULL

menus

  • menu_id — varchar(100) — Primary key — NOT NULL
  • category_id — varchar(100) — Foreign key → categories.category_id — NOT NULL
  • name — varchar(200) — NOT NULL
  • description — text — NOT NULL
  • base_price — integer — NOT NULL
  • image_url — text
  • available — boolean — NOT NULL
  • min_quantity — integer — NOT NULL
  • max_quantity — integer — NOT NULL
  • allergens — text — NOT NULL
  • origin — text
  • badge_tags — text — NOT NULL
  • sort_order — integer — NOT NULL
  • updated_at — timestamp with time zone — NOT NULL

option_groups

  • option_group_id — varchar(100) — Primary key — NOT NULL
  • menu_id — varchar(100) — Foreign key → menus.menu_id — NOT NULL
  • label — varchar(200) — NOT NULL
  • selection_type — varchar(16) — NOT NULL
  • required — boolean — NOT NULL
  • min_select — integer — NOT NULL
  • max_select — integer — NOT NULL
  • sort_order — integer — NOT NULL
  • active — boolean — NOT NULL
  • updated_at — timestamp with time zone — NOT NULL

options

  • option_id — varchar(100) — Primary key — NOT NULL
  • option_group_id — varchar(100) — Foreign key → option_groups.option_group_id — NOT NULL
  • menu_id — varchar(100) — Foreign key → menus.menu_id — NOT NULL
  • name — varchar(200) — NOT NULL
  • price_delta — integer — NOT NULL
  • available — boolean — NOT NULL
  • default_selected — boolean — NOT NULL
  • sort_order — integer — NOT NULL
  • updated_at — timestamp with time zone — NOT NULL

order_item_options

  • order_item_option_id — uuid — Primary key — NOT NULL
  • order_item_id — uuid — Foreign key → order_items.order_item_id — NOT NULL
  • order_id — uuid — Foreign key → orders.order_id — NOT NULL
  • option_group_id — varchar(100) — NOT NULL
  • option_group_name_snapshot — varchar(200) — NOT NULL
  • option_id — varchar(100) — NOT NULL
  • option_name_snapshot — varchar(200) — NOT NULL
  • price_delta_snapshot — integer — NOT NULL
  • sort_order — integer — NOT NULL
  • created_at — timestamp with time zone — NOT NULL

order_items

  • order_item_id — uuid — Primary key — NOT NULL
  • order_id — uuid — Foreign key → orders.order_id — NOT NULL
  • line_no — integer — NOT NULL
  • menu_id — varchar(100) — Foreign key → menus.menu_id — NOT NULL
  • menu_name_snapshot — varchar(200) — NOT NULL
  • base_price_snapshot — integer — NOT NULL
  • unit_price_snapshot — integer — NOT NULL
  • quantity — integer — NOT NULL
  • line_total — integer — NOT NULL
  • status — varchar(16) — NOT NULL
  • created_at — timestamp with time zone — NOT NULL
  • updated_at — timestamp with time zone — NOT NULL
  • preparation_status — varchar(16) — NOT NULL
  • prepared_at — timestamp with time zone
  • served_at — timestamp with time zone

orders

  • order_id — uuid — Primary key — NOT NULL
  • display_number — bigint — NOT NULL
  • display_code — varchar(40) — NOT NULL
  • client_request_id — uuid — NOT NULL
  • idempotency_key — varchar(160) — NOT NULL
  • request_fingerprint — char(64) — NOT NULL
  • table_id — varchar(20) — Foreign key → tables.table_id — NOT NULL
  • session_id — uuid — Foreign key → table_sessions.session_id — NOT NULL
  • status — varchar(16) — NOT NULL
  • public_status — varchar(16) — NOT NULL
  • payment_status — varchar(16) — NOT NULL
  • total_amount — integer — NOT NULL
  • note — varchar(200)
  • note_audience — varchar(16) — NOT NULL
  • status_updated_at — timestamp with time zone — NOT NULL
  • created_at — timestamp with time zone — NOT NULL
  • updated_at — timestamp with time zone — NOT NULL
  • paid_at — timestamp with time zone
  • cancelled_at — timestamp with time zone
  • cancel_reason — text
  • order_kind — varchar(16) — NOT NULL
  • service_message — varchar(100)
  • charged_staff_id — varchar(40) — Foreign key → staff_members.staff_id
  • staff_charge_amount — integer
  • staff_discount_rate — integer

settings

  • value — text — NOT NULL
  • type — varchar(16) — NOT NULL
  • description — text — NOT NULL
  • updated_at — timestamp with time zone — NOT NULL

staff_members

  • staff_id — varchar(40) — Primary key — NOT NULL
  • name — varchar(100) — NOT NULL
  • affiliation — varchar(100)
  • active — boolean — NOT NULL
  • sort_order — integer — NOT NULL
  • settlement_status — varchar(16) — NOT NULL
  • settled_amount — integer
  • settled_at — timestamp with time zone
  • created_at — timestamp with time zone — NOT NULL
  • updated_at — timestamp with time zone — NOT NULL

table_sessions

  • session_id — uuid — Primary key — NOT NULL
  • table_id — varchar(20) — Foreign key → tables.table_id — NOT NULL
  • origin_table_id — varchar(20) — Foreign key → tables.table_id — NOT NULL
  • status — varchar(16) — NOT NULL
  • discount_rate — integer — NOT NULL
  • merged_into_session_id — uuid — Foreign key → table_sessions.session_id
  • payment_status — varchar(16) — NOT NULL
  • subtotal_amount — integer
  • discount_amount — integer
  • final_amount — integer
  • opened_at — timestamp with time zone — NOT NULL
  • closed_at — timestamp with time zone
  • paid_at — timestamp with time zone
  • updated_at — timestamp with time zone — NOT NULL
  • table_note — varchar(200)
  • close_reason — varchar(32)
  • payment_request_id — uuid

tables

  • table_id — varchar(20) — Primary key — NOT NULL