Baza danych i zapis akcji przywoływania kelnera. Czekam na endpointy lub coś z KDS
This commit is contained in:
15
scripts/guest_action_queue.sql
Normal file
15
scripts/guest_action_queue.sql
Normal 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;
|
||||
|
||||
Reference in New Issue
Block a user