-- Step 24: Add vendorPaymentNotifications table
-- This replaces the 'stripe-payment' type in sessionCustomerRequests.
-- Payment notifications are vendor-scoped system messages (not tied to session lifecycle).
-- They survive session finalization and reference the session by stored label/type.

CREATE TABLE `vendorPaymentNotifications` (
  `id`           int(11) UNSIGNED NOT NULL AUTO_INCREMENT,
  `vendorId`     varchar(50)      NOT NULL,
  `sessionId`    int(11) UNSIGNED NOT NULL,
  `sessionLabel` varchar(20)      NOT NULL DEFAULT '',
  `sessionType`  varchar(10)      NOT NULL DEFAULT 'table',
  `amount`       decimal(10,2)    NOT NULL DEFAULT '0.00',
  `placedTime`   int(11) UNSIGNED NOT NULL,
  PRIMARY KEY (`id`),
  KEY `idx_vendor` (`vendorId`)
) ENGINE=InnoDB DEFAULT CHARSET=utf8mb4;
