[
  {
    "type": "create_table",
    "description": "Create quoteRequests table for storing price quote form submissions",
    "database": "kiosk_buykiosk",
    "check_query": "SELECT 1 FROM information_schema.tables WHERE table_schema = 'kiosk_buykiosk' AND table_name = 'quoteRequests'",
    "sql": "CREATE TABLE IF NOT EXISTS `quoteRequests` (`id` int unsigned NOT NULL AUTO_INCREMENT, `status` enum('new','contacted','quoted','won','lost') NOT NULL DEFAULT 'new', `ownerFirstName` varchar(100) NOT NULL, `ownerLastName` varchar(100) NOT NULL, `corporationName` varchar(255) DEFAULT NULL, `storeCount` varchar(20) DEFAULT NULL, `ownerAddress` varchar(255) DEFAULT NULL, `ownerCity` varchar(100) DEFAULT NULL, `ownerState` varchar(100) DEFAULT NULL, `ownerZip` varchar(20) DEFAULT NULL, `ownerPhone` varchar(50) DEFAULT NULL, `ownerEmail` varchar(255) DEFAULT NULL, `referredBy` varchar(255) DEFAULT NULL, `storeName` varchar(255) DEFAULT NULL, `storePhone` varchar(50) DEFAULT NULL, `storeNumber` varchar(50) DEFAULT NULL, `storeAddress` varchar(255) DEFAULT NULL, `storeCity` varchar(100) DEFAULT NULL, `storeState` varchar(100) DEFAULT NULL, `storeZip` varchar(20) DEFAULT NULL, `emailProvider` varchar(100) DEFAULT NULL, `emailProviderOther` varchar(255) DEFAULT NULL, `loyaltyProvider` varchar(100) DEFAULT NULL, `loyaltyProviderOther` varchar(255) DEFAULT NULL, `marketingFirm` varchar(100) DEFAULT NULL, `basePackage` varchar(50) DEFAULT NULL, `labelPrinter` varchar(10) DEFAULT NULL, `ethernetLength` varchar(20) DEFAULT NULL, `networkSwitch` varchar(10) DEFAULT NULL, `dlScanning` varchar(10) DEFAULT NULL, `digitalSign` varchar(10) DEFAULT NULL, `tvSize` varchar(20) DEFAULT NULL, `tvCount` int DEFAULT NULL, `tvMount` varchar(10) DEFAULT NULL, `standColor` varchar(20) DEFAULT NULL, `internalNotes` text, `estimatedPrice` decimal(10,2) DEFAULT NULL, `ipAddress` varchar(45) DEFAULT NULL, `createdAt` timestamp NOT NULL DEFAULT CURRENT_TIMESTAMP, `updatedAt` timestamp NOT NULL DEFAULT CURRENT_TIMESTAMP ON UPDATE CURRENT_TIMESTAMP, PRIMARY KEY (`id`), KEY `idx_status` (`status`), KEY `idx_createdAt` (`createdAt`), KEY `idx_ownerEmail` (`ownerEmail`)) ENGINE=InnoDB DEFAULT CHARSET=utf8mb4 COLLATE=utf8mb4_unicode_ci;"
  },
  {
    "type": "create_table",
    "description": "Create quotePricing table for admin-configurable price quote items",
    "database": "kiosk_buykiosk",
    "check_query": "SELECT 1 FROM information_schema.tables WHERE table_schema = 'kiosk_buykiosk' AND table_name = 'quotePricing'",
    "sql": "CREATE TABLE IF NOT EXISTS `quotePricing` (`id` int unsigned NOT NULL AUTO_INCREMENT, `itemKey` varchar(50) NOT NULL, `itemLabel` varchar(255) NOT NULL, `price` decimal(10,2) NOT NULL DEFAULT 0.00, `isActive` tinyint(1) NOT NULL DEFAULT 1, `updatedAt` timestamp NOT NULL DEFAULT CURRENT_TIMESTAMP ON UPDATE CURRENT_TIMESTAMP, PRIMARY KEY (`id`), UNIQUE KEY `uk_itemKey` (`itemKey`)) ENGINE=InnoDB DEFAULT CHARSET=utf8mb4 COLLATE=utf8mb4_unicode_ci;"
  },
  {
    "type": "insert",
    "description": "Seed quotePricing with default items (prices at 0 — admin fills in real prices)",
    "database": "kiosk_buykiosk",
    "check_query": "SELECT 1 FROM kiosk_buykiosk.quotePricing WHERE itemKey = 'pkg_full' LIMIT 1",
    "sql": "INSERT INTO `quotePricing` (`itemKey`, `itemLabel`, `price`) VALUES ('pkg_full', 'Full Package', 0.00), ('pkg_qr_only', 'QR Code Only Package', 0.00), ('pkg_kiosk', 'Kiosk Stand/Tablet Only Package', 0.00), ('label_printer', 'Label Printer', 0.00), ('ethernet_25ft', 'Ethernet Cable - 25ft', 0.00), ('ethernet_50ft', 'Ethernet Cable - 50ft', 0.00), ('ethernet_100ft', 'Ethernet Cable - 100ft', 0.00), ('network_switch', 'Network Switch', 0.00), ('dl_scanning', 'DL Scanning Module', 0.00), ('digital_sign', 'Digital Signage Module', 0.00), ('tv_32', 'TV - 32 inch', 0.00), ('tv_39', 'TV - 39 inch', 0.00), ('tv_43', 'TV - 43 inch', 0.00), ('tv_50', 'TV - 50 inch', 0.00), ('tv_mount', 'TV Wall Mount', 0.00), ('stand_black', 'Kiosk Stand - Black', 0.00), ('stand_red', 'Kiosk Stand - Daredevil Red', 0.00), ('stand_blue', 'Kiosk Stand - Dynamic Blue', 0.00);"
  }
]
