Initial LabelPrintAgent scaffold
This commit is contained in:
@@ -0,0 +1,29 @@
|
||||
CREATE TABLE IF NOT EXISTS label_print_queue (
|
||||
id BIGINT AUTO_INCREMENT PRIMARY KEY,
|
||||
layout_key VARCHAR(100) NOT NULL,
|
||||
payload_json JSON NOT NULL,
|
||||
status ENUM('pending','printing','printed','error','deleted') NOT NULL DEFAULT 'pending',
|
||||
printer_name VARCHAR(255) NULL,
|
||||
attempts INT NOT NULL DEFAULT 0,
|
||||
error_message TEXT NULL,
|
||||
created_at DATETIME NOT NULL DEFAULT CURRENT_TIMESTAMP,
|
||||
locked_at DATETIME NULL,
|
||||
printed_at DATETIME NULL,
|
||||
INDEX idx_label_print_queue_status_created (status, created_at),
|
||||
INDEX idx_label_print_queue_layout_key (layout_key)
|
||||
);
|
||||
|
||||
INSERT INTO label_print_queue
|
||||
(layout_key, payload_json, status)
|
||||
VALUES
|
||||
(
|
||||
'dymo_57x32_standard',
|
||||
JSON_OBJECT(
|
||||
'titel', 'Beleg privat',
|
||||
'beschreibung', 'Dokument 2026-000123',
|
||||
'nummer', '2026-000123',
|
||||
'datum', '2026-05-07',
|
||||
'qr', 'bjoernprivat 0000123'
|
||||
),
|
||||
'pending'
|
||||
);
|
||||
Reference in New Issue
Block a user