\\\": \\\"#3B82F6\\\",\\n            \\\"boundary\\\": [\\n                {\\n                    \\\"x\\\": 671.7636372539065,\\n                    \\\"y\\\": 627.3764154829018\\n                },\\n                {\\n                    \\\"x\\\": 517.8006101388844,\\n                    \\\"y\\\": 528.9046889107442\\n                },\\n                {\\n                    \\\"x\\\": 223.62623645613172,\\n                    \\\"y\\\": 1036.7777756102896\\n                },\\n                {\\n                    \\\"x\\\": 233.43132786589743,\\n                    \\\"y\\\": 1968.8544350688328\\n                },\\n                {\\n                    \\\"x\\\": 751.0309443650457,\\n                    \\\"y\\\": 2776.59602620602\\n                },\\n                {\\n                    \\\"x\\\": 3233.503787923125,\\n                    \\\"y\\\": 2786.5946249169956\\n                },\\n                {\\n                    \\\"x\\\": 4272.579610759027,\\n                    \\\"y\\\": 1942.5295820971023\\n                },\\n                {\\n                    \\\"x\\\": 4272.579610759027,\\n                    \\\"y\\\": 1115.7395122005669\\n                },\\n                {\\n                    \\\"x\\\": 4059.039648084267,\\n                    \\\"y\\\": 782.761943283992\\n                },\\n                {\\n                    \\\"x\\\": 3747.778007575295,\\n                    \\\"y\\\": 779.1426218827248\\n                },\\n                {\\n                    \\\"x\\\": 3755.016650377829,\\n                    \\\"y\\\": 1065.069012582827\\n                },\\n                {\\n                    \\\"x\\\": 4048.1816838804657,\\n                    \\\"y\\\": 1065.069012582827\\n                },\\n                {\\n                    \\\"x\\\": 4044.5623624791983,\\n                    \\\"y\\\": 1854.0810780590584\\n                },\\n                {\\n                    \\\"x\\\": 3154.209297767487,\\n                    \\\"y\\\": 2546.254276007638\\n                },\\n                {\\n                    \\\"x\\\": 837.8436009565337,\\n                    \\\"y\\\": 2545.371465701078\\n                },\\n                {\\n                    \\\"x\\\": 446.95688961968494,\\n                    \\\"y\\\": 1911.9902204793325\\n                },\\n                {\\n                    \\\"x\\\": 448.3493303025406,\\n                    \\\"y\\\": 1033.4870527726855\\n                }\\n            ],\\n            \\\"is_active\\\": true,\\n            \\\"is_locked\\\": false,\\n            \\\"base_price\\\": 50,\\n            \\\"created_at\\\": \\\"2025-11-05T10:44:57.169Z\\\",\\n            \\\"is_visible\\\": true,\\n            \\\"updated_at\\\": \\\"2025-11-06T18:58:42.339Z\\\",\\n            \\\"zoom_level\\\": 1,\\n            \\\"naming_mode\\\": \\\"auto\\\",\\n            \\\"zone_number\\\": 7,\\n            \\\"display_order\\\": 6,\\n            \\\"manual_table_ids\\\": [],\\n            \\\"capacity_multiplier\\\": 1,\\n            \\\"section_pricing_mode\\\": \\\"uniform\\\",\\n            \\\"accessibility_features\\\": []\\n        }\\n    ],\\n    \\\"save_type\\\": \\\"manual\\\",\\n    \\\"svg_assets\\\": [],\\n    \\\"background_image\\\": {\\n        \\\"id\\\": \\\"d0c25743-329f-4155-82e8-4141ae44a1d8\\\",\\n        \\\"url\\\": \\\"blob:https://admin.globalgala.com/e205ab7e-be00-440d-89b1-cbb4187e4f40\\\",\\n        \\\"name\\\": \\\"Screenshot 2025-11-05 at 10.28.05.png\\\",\\n        \\\"scale\\\": 1.7,\\n        \\\"offset\\\": {\\n            \\\"x\\\": 0,\\n            \\\"y\\\": 0\\n        },\\n        \\\"opacity\\\": 0.3,\\n        \\\"created_at\\\": \\\"2025-11-05T10:29:52.742Z\\\",\\n        \\\"is_visible\\\": false,\\n        \\\"updated_at\\\": \\\"2025-11-05T11:02:27.029Z\\\",\\n        \\\"lock_aspect_ratio\\\": true,\\n        \\\"original_dimensions\\\": {\\n            \\\"width\\\": 2736,\\n            \\\"height\\\": 1808\\n        }\\n    },\\n    \\\"venue_id\\\": 1,\\n    \\\"version\\\": 184\\n}\"',NULL,NULL,1314,102,0,1,'2025-11-30 18:14:59','2025-11-30 20:50:22',NULL);

--
-- Table structure for table `venue_themes`
--

CREATE TABLE `venue_themes` (
  `id` bigint unsigned NOT NULL AUTO_INCREMENT,
  `name` varchar(191) CHARACTER SET utf8mb4 COLLATE utf8mb4_unicode_ci NOT NULL,
  `theme_id` varchar(191) CHARACTER SET utf8mb4 COLLATE utf8mb4_unicode_ci NOT NULL,
  `description` text CHARACTER SET utf8mb4 COLLATE utf8mb4_unicode_ci,
  `config` json NOT NULL,
  `is_global` tinyint(1) NOT NULL DEFAULT '0',
  `is_active` tinyint(1) NOT NULL DEFAULT '1',
  `venue_id` bigint unsigned DEFAULT NULL,
  `event_id` bigint unsigned DEFAULT NULL,
  `author` varchar(191) CHARACTER SET utf8mb4 COLLATE utf8mb4_unicode_ci DEFAULT NULL,
  `version` varchar(20) CHARACTER SET utf8mb4 COLLATE utf8mb4_unicode_ci NOT NULL DEFAULT '1.0.0',
  `mode` varchar(50) CHARACTER SET utf8mb4 COLLATE utf8mb4_unicode_ci NOT NULL DEFAULT 'custom',
  `created_at` timestamp NULL DEFAULT NULL,
  `updated_at` timestamp NULL DEFAULT NULL,
  `deleted_at` timestamp NULL DEFAULT NULL,
  PRIMARY KEY (`id`),
  UNIQUE KEY `venue_themes_theme_id_unique` (`theme_id`),
  KEY `venue_themes_is_global_is_active_index` (`is_global`,`is_active`),
  KEY `venue_themes_venue_id_is_active_index` (`venue_id`,`is_active`),
  KEY `venue_themes_event_id_is_active_index` (`event_id`,`is_active`),
  KEY `venue_themes_name_index` (`name`),
  KEY `venue_themes_is_global_index` (`is_global`),
  KEY `venue_themes_is_active_index` (`is_active`),
  KEY `venue_themes_venue_id_index` (`venue_id`),
  KEY `venue_themes_event_id_index` (`event_id`),
  KEY `venue_themes_mode_index` (`mode`),
  CONSTRAINT `venue_themes_venue_id_foreign` FOREIGN KEY (`venue_id`) REFERENCES `venues` (`id`) ON DELETE CASCADE
) ENGINE=InnoDB DEFAULT CHARSET=utf8mb4 COLLATE=utf8mb4_unicode_ci;

--
-- Dumping data for table `venue_themes`
--


--
-- Table structure for table `venues`
--

CREATE TABLE `venues` (
  `id` bigint unsigned NOT NULL AUTO_INCREMENT,
  `default_theme_id` bigint unsigned DEFAULT NULL,
  `name` varchar(255) CHARACTER SET utf8mb4 COLLATE utf8mb4_unicode_ci NOT NULL,
  `address` varchar(255) CHARACTER SET utf8mb4 COLLATE utf8mb4_unicode_ci DEFAULT NULL,
  `street_address` varchar(191) COLLATE utf8mb4_unicode_ci DEFAULT NULL COMMENT 'Street number and name (required for Revolut)',
  `city` varchar(255) CHARACTER SET utf8mb4 COLLATE utf8mb4_unicode_ci DEFAULT NULL,
  `region` varchar(100) COLLATE utf8mb4_unicode_ci DEFAULT NULL COMMENT 'State, province, or region (optional for Revolut)',
  `country` varchar(255) CHARACTER SET utf8mb4 COLLATE utf8mb4_unicode_ci DEFAULT NULL,
  `postal_code` varchar(255) CHARACTER SET utf8mb4 COLLATE utf8mb4_unicode_ci DEFAULT NULL,
  `country_code` char(2) COLLATE utf8mb4_unicode_ci DEFAULT NULL COMMENT 'ISO 3166-1 alpha-2 country code (GB, US, FR, etc.)',
  `description` text CHARACTER SET utf8mb4 COLLATE utf8mb4_unicode_ci,
  `capacity` int DEFAULT NULL,
  `contact_info` json DEFAULT NULL,
  `created_at` timestamp NULL DEFAULT NULL,
  `updated_at` timestamp NULL DEFAULT NULL,
  PRIMARY KEY (`id`),
  KEY `venues_default_theme_id_foreign` (`default_theme_id`),
  KEY `venues_country_code_index` (`country_code`),
  CONSTRAINT `venues_default_theme_id_foreign` FOREIGN KEY (`default_theme_id`) REFERENCES `venue_themes` (`id`) ON DELETE SET NULL
) ENGINE=InnoDB AUTO_INCREMENT=2 DEFAULT CHARSET=utf8mb4 COLLATE=utf8mb4_unicode_ci;

--
-- Dumping data for table `venues`
--

INSERT INTO `venues` VALUES (1,NULL,'Test Theater',NULL,NULL,NULL,NULL,NULL,NULL,NULL,'A cozy theater for testing',100,NULL,'2025-11-30 18:14:59','2025-11-30 18:14:59');

--
-- Table structure for table `waitlist_submissions`
--

CREATE TABLE `waitlist_submissions` (
  `id` bigint unsigned NOT NULL AUTO_INCREMENT,
  `event_id` bigint unsigned NOT NULL,
  `full_name` varchar(191) COLLATE utf8mb4_unicode_ci NOT NULL,
  `email` varchar(191) COLLATE utf8mb4_unicode_ci NOT NULL,
  `phone` varchar(50) COLLATE utf8mb4_unicode_ci DEFAULT NULL,
  `seat_preferences` text COLLATE utf8mb4_unicode_ci COMMENT 'Text description of desired seats (e.g., "Table 5, seats 1-4" or "VIP section")',
  `reason_notes` text COLLATE utf8mb4_unicode_ci COMMENT 'Why they want these seats, special requests',
  `status` enum('pending','contacted','resolved') COLLATE utf8mb4_unicode_ci NOT NULL DEFAULT 'pending' COMMENT 'Admin response status: pending=not contacted, contacted=admin replied, resolved=resolved/closed',
  `contacted_at` timestamp NULL DEFAULT NULL COMMENT 'When admin marked as contacted',
  `contacted_by` bigint unsigned DEFAULT NULL COMMENT 'Admin user who marked as contacted',
  `ip_address` varchar(45) COLLATE utf8mb4_unicode_ci DEFAULT NULL COMMENT 'For spam prevention',
  `user_agent` text COLLATE utf8mb4_unicode_ci COMMENT 'For analytics',
  `created_at` timestamp NULL DEFAULT NULL,
  `updated_at` timestamp NULL DEFAULT NULL,
  `deleted_at` timestamp NULL DEFAULT NULL COMMENT 'Soft deletes for GDPR compliance',
  PRIMARY KEY (`id`),
  UNIQUE KEY `unique_email_per_event` (`email`,`event_id`),
  KEY `idx_event_id` (`event_id`),
  KEY `idx_email` (`email`),
  KEY `idx_created_at` (`created_at`),
  KEY `fk_waitlist_contacted_by` (`contacted_by`),
  CONSTRAINT `fk_waitlist_contacted_by` FOREIGN KEY (`contacted_by`) REFERENCES `users` (`id`) ON DELETE SET NULL,
  CONSTRAINT `fk_waitlist_event` FOREIGN KEY (`event_id`) REFERENCES `events` (`id`) ON DELETE CASCADE
) ENGINE=InnoDB DEFAULT CHARSET=utf8mb4 COLLATE=utf8mb4_unicode_ci;

--
-- Dumping data for table `waitlist_submissions`
--


--
-- Table structure for table `webhook_events`
--

CREATE TABLE `webhook_events` (
  `event_id` varchar(255) CHARACTER SET utf8mb4 COLLATE utf8mb4_unicode_ci NOT NULL,
  `event_type` varchar(255) CHARACTER SET utf8mb4 COLLATE utf8mb4_unicode_ci NOT NULL,
  `payment_intent_id` varchar(191) CHARACTER SET utf8mb4 COLLATE utf8mb4_unicode_ci DEFAULT NULL COMMENT 'EDGE-013 FIX: Payment Intent ID for deduplication',
  `payload` json DEFAULT NULL,
  `status` enum('pending','processing','processed','failed') CHARACTER SET utf8mb4 COLLATE utf8mb4_unicode_ci NOT NULL DEFAULT 'pending',
  `error_message` text CHARACTER SET utf8mb4 COLLATE utf8mb4_unicode_ci,
  `retry_count` int NOT NULL DEFAULT '0',
  `received_at` timestamp NOT NULL DEFAULT CURRENT_TIMESTAMP,
  `processed_at` timestamp NULL DEFAULT NULL,
  `created_at` timestamp NOT NULL DEFAULT CURRENT_TIMESTAMP,
  `updated_at` timestamp NOT NULL DEFAULT CURRENT_TIMESTAMP,
  PRIMARY KEY (`event_id`),
  KEY `webhook_events_event_type_received_at_index` (`event_type`,`received_at`),
  KEY `webhook_events_status_received_at_index` (`status`,`received_at`),
  KEY `webhook_events_processed_at_index` (`processed_at`),
  KEY `webhook_events_payment_intent_id_index` (`payment_intent_id`),
  KEY `idx_webhook_dedup` (`event_type`(100),`payment_intent_id`(100))
) ENGINE=InnoDB DEFAULT CHARSET=utf8mb4 COLLATE=utf8mb4_unicode_ci;

--
-- Dumping data for table `webhook_events`
--


--
-- Table structure for table `whatsapp_cost_tracker`
--

CREATE TABLE `whatsapp_cost_tracker` (
  `id` bigint unsigned NOT NULL AUTO_INCREMENT,
  `period_type` enum('hour','day') COLLATE utf8mb4_unicode_ci NOT NULL,
  `period_start` timestamp NOT NULL,
  `period_end` timestamp NOT NULL,
  `message_count` int NOT NULL DEFAULT '0',
  `total_cost` decimal(10,4) NOT NULL DEFAULT '0.0000',
  `currency` varchar(3) COLLATE utf8mb4_unicode_ci NOT NULL DEFAULT 'USD',
  `circuit_broken` tinyint(1) NOT NULL DEFAULT '0',
  `circuit_broken_at` timestamp NULL DEFAULT NULL,
  `inbound_count` int NOT NULL DEFAULT '0',
  `outbound_count` int NOT NULL DEFAULT '0',
  `template_count` int NOT NULL DEFAULT '0',
  `created_at` timestamp NULL DEFAULT NULL,
  `updated_at` timestamp NULL DEFAULT NULL,
  PRIMARY KEY (`id`),
  UNIQUE KEY `whatsapp_cost_tracker_period_type_period_start_unique` (`period_type`,`period_start`),
  KEY `whatsapp_cost_tracker_period_type_period_start_period_end_index` (`period_type`,`period_start`,`period_end`),
  KEY `whatsapp_cost_tracker_period_start_index` (`period_start`),
  KEY `whatsapp_cost_tracker_circuit_broken_index` (`circuit_broken`)
) ENGINE=InnoDB DEFAULT CHARSET=utf8mb4 COLLATE=utf8mb4_unicode_ci;

--
-- Dumping data for table `whatsapp_cost_tracker`
--


--
-- Table structure for table `whatsapp_logs`
--

CREATE TABLE `whatsapp_logs` (
  `id` bigint unsigned NOT NULL AUTO_INCREMENT,
  `order_id` bigint unsigned DEFAULT NULL,
  `conversation_id` bigint unsigned DEFAULT NULL,
  `customer_phone` varchar(50) COLLATE utf8mb4_unicode_ci NOT NULL,
  `message_body` text COLLATE utf8mb4_unicode_ci,
  `twilio_sid` varchar(100) COLLATE utf8mb4_unicode_ci NOT NULL,
  `template_sid` varchar(100) COLLATE utf8mb4_unicode_ci DEFAULT NULL,
  `status` enum('queued','sent','delivered','read','failed') COLLATE utf8mb4_unicode_ci NOT NULL DEFAULT 'queued',
  `direction` enum('outbound','inbound') COLLATE utf8mb4_unicode_ci NOT NULL,
  `media_url` varchar(500) COLLATE utf8mb4_unicode_ci DEFAULT NULL,
  `media_content_type` varchar(100) COLLATE utf8mb4_unicode_ci DEFAULT NULL,
  `media_size` int DEFAULT NULL,
  `read_at` timestamp NULL DEFAULT NULL,
  `sent_at` timestamp NULL DEFAULT NULL,
  `delivered_at` timestamp NULL DEFAULT NULL,
  `error_code` varchar(50) COLLATE utf8mb4_unicode_ci DEFAULT NULL,
  `error_message` text COLLATE utf8mb4_unicode_ci,
  `cost_amount` decimal(10,4) DEFAULT NULL,
  `cost_currency` varchar(3) COLLATE utf8mb4_unicode_ci NOT NULL DEFAULT 'USD',
  `raw_payload` json DEFAULT NULL,
  `created_at` timestamp NULL DEFAULT NULL,
  `updated_at` timestamp NULL DEFAULT NULL,
  PRIMARY KEY (`id`),
  UNIQUE KEY `whatsapp_logs_twilio_sid_unique` (`twilio_sid`),
  KEY `whatsapp_logs_order_id_index` (`order_id`),
  KEY `whatsapp_logs_conversation_id_index` (`conversation_id`),
  KEY `whatsapp_logs_customer_phone_index` (`customer_phone`),
  KEY `whatsapp_logs_direction_status_index` (`direction`,`status`),
  KEY `whatsapp_logs_sent_at_index` (`sent_at`),
  KEY `whatsapp_logs_created_at_index` (`created_at`)
) ENGINE=InnoDB DEFAULT CHARSET=utf8mb4 COLLATE=utf8mb4_unicode_ci;

--
-- Dumping data for table `whatsapp_logs`
--


--
-- Table structure for table `whatsapp_templates`
--

CREATE TABLE `whatsapp_templates` (
  `id` bigint unsigned NOT NULL AUTO_INCREMENT,
  `template_sid` varchar(100) COLLATE utf8mb4_unicode_ci NOT NULL,
  `template_name` varchar(100) COLLATE utf8mb4_unicode_ci NOT NULL,
  `friendly_name` varchar(255) COLLATE utf8mb4_unicode_ci NOT NULL,
  `status` enum('pending','approved','rejected','disabled','paused') COLLATE utf8mb4_unicode_ci NOT NULL DEFAULT 'pending',
  `language` varchar(10) COLLATE utf8mb4_unicode_ci NOT NULL DEFAULT 'en',
  `content_body` text COLLATE utf8mb4_unicode_ci,
  `variables` json DEFAULT NULL,
  `submitted_at` timestamp NULL DEFAULT NULL,
  `approved_at` timestamp NULL DEFAULT NULL,
  `rejected_at` timestamp NULL DEFAULT NULL,
  `rejection_reason` text COLLATE utf8mb4_unicode_ci,
  `messages_sent` int NOT NULL DEFAULT '0',
  `last_used_at` timestamp NULL DEFAULT NULL,
  `last_synced_at` timestamp NULL DEFAULT NULL,
  `created_at` timestamp NULL DEFAULT NULL,
  `updated_at` timestamp NULL DEFAULT NULL,
  PRIMARY KEY (`id`),
  UNIQUE KEY `whatsapp_templates_template_sid_unique` (`template_sid`),
  KEY `whatsapp_templates_template_name_index` (`template_name`),
  KEY `whatsapp_templates_status_index` (`status`),
  KEY `whatsapp_templates_template_name_language_index` (`template_name`,`language`)
) ENGINE=InnoDB DEFAULT CHARSET=utf8mb4 COLLATE=utf8mb4_unicode_ci;

--
-- Dumping data for table `whatsapp_templates`
--



