CREATE TABLE `azonics_user_events` (
  `event_id` int(11) NOT NULL AUTO_INCREMENT,
  `uuid` varchar(255) NOT NULL,
  `previous_uuid` varchar(255) DEFAULT NULL,
  `hotel` varchar(255) DEFAULT NULL,
  `order_id` varchar(255) DEFAULT NULL,
  `cart` text DEFAULT NULL,
  `event_type` varchar(100) NOT NULL,
  `event_name` varchar(255) NOT NULL,
  `event_data` text DEFAULT NULL,
  `page_url` varchar(500) DEFAULT NULL,
  `ip_address` varchar(45) DEFAULT NULL,
  `user_agent` varchar(500) DEFAULT NULL,
  `created_at` datetime NOT NULL DEFAULT CURRENT_TIMESTAMP,
  PRIMARY KEY (`event_id`),
  KEY `idx_uuid` (`uuid`),
  KEY `idx_created_at` (`created_at`),
  KEY `idx_event_type` (`event_type`)
) ENGINE=InnoDB DEFAULT CHARSET=utf8;
