Baza danych i zapis akcji przywoływania kelnera. Czekam na endpointy lub coś z KDS

This commit is contained in:
2026-05-28 16:38:00 +02:00
parent d179256f20
commit a72b5afcc7
15 changed files with 1193 additions and 59 deletions

View File

@@ -0,0 +1,15 @@
CREATE TABLE IF NOT EXISTS guest_action_queue (
id BIGINT UNSIGNED NOT NULL AUTO_INCREMENT,
table_id VARCHAR(32) NOT NULL,
message_type ENUM('waiter_call', 'bill_request') NOT NULL,
message_text TEXT NOT NULL,
api_sent TINYINT(1) NOT NULL DEFAULT 0,
status_kds TINYINT(1) NOT NULL DEFAULT 0,
created_at DATETIME(3) NOT NULL DEFAULT CURRENT_TIMESTAMP(3),
updated_at DATETIME NOT NULL DEFAULT CURRENT_TIMESTAMP ON UPDATE CURRENT_TIMESTAMP,
PRIMARY KEY (id),
KEY idx_guest_action_api_sent_created (api_sent, created_at),
KEY idx_guest_action_status_kds_created (status_kds, created_at),
KEY idx_guest_action_table_created (table_id, created_at)
) ENGINE=InnoDB DEFAULT CHARSET=utf8mb4 COLLATE=utf8mb4_unicode_ci;