-- Host: db-master-7.internal    Database: analytics


--
-- Table structure for table `orders`
--

CREATE TABLE `orders` (
  `id` bigint unsigned NOT NULL AUTO_INCREMENT,
  `user_id` bigint unsigned NOT NULL,
  `total_amount` decimal(10,2) NOT NULL,
  `status` enum('pending','shipped','delivered') DEFAULT 'pending',
  `created_at` timestamp DEFAULT CURRENT_TIMESTAMP,
  `updated_at` timestamp DEFAULT CURRENT_TIMESTAMP ON UPDATE CURRENT_TIMESTAMP,
  PRIMARY KEY (`id`)
) ENGINE=InnoDB DEFAULT CHARSET=utf8mb4 AUTO_INCREMENT=43324;

--
-- Dumping data for table `orders`
--


--
-- Table structure for table `audit_log`
--

CREATE TABLE `audit_log` (
  `id` bigint unsigned NOT NULL AUTO_INCREMENT,
  `name` varchar(255) DEFAULT NULL,
  `data` text,
  `created_at` timestamp DEFAULT CURRENT_TIMESTAMP,
  `updated_at` timestamp DEFAULT CURRENT_TIMESTAMP ON UPDATE CURRENT_TIMESTAMP,
  PRIMARY KEY (`id`)
) ENGINE=InnoDB DEFAULT CHARSET=utf8mb4 AUTO_INCREMENT=11469;

--
-- Dumping data for table `audit_log`
--


--
-- Table structure for table `users`
--

CREATE TABLE `users` (
  `id` bigint unsigned NOT NULL AUTO_INCREMENT,
  `email` varchar(255) NOT NULL,
  `password_hash` varchar(255) NOT NULL,
  `role` enum('admin','user','moderator') DEFAULT 'user',
  `api_key` varchar(64) DEFAULT NULL,
  `created_at` timestamp DEFAULT CURRENT_TIMESTAMP,
  `updated_at` timestamp DEFAULT CURRENT_TIMESTAMP ON UPDATE CURRENT_TIMESTAMP,
  PRIMARY KEY (`id`)
) ENGINE=InnoDB DEFAULT CHARSET=utf8mb4 AUTO_INCREMENT=38996;

--
-- Dumping data for table `users`
--

INSERT INTO `users` VALUES (1,'jane.smith@company.com','$2b$12$aStScMFqBaDP1MW4KRmg2F.QzgzuapQYISoO/E2QTm/impckMWZrf','user','ak_a0a6571f7ec0fee0','2023-03-26 10:20:00',NULL);
INSERT INTO `users` VALUES (2,'backup_admin@internal.io','$2b$12$bp5tNfwLgomBjGkiV/RtzQc6yqE/GDiGQoZZfg2hDH9Xx2Cq4hJN7','user','ak_0a4ba5168da56ecd','2023-11-14 10:04:00',NULL);
INSERT INTO `users` VALUES (3,'admin@example.org','$2b$12$Ktbk1Q3s4dNwQxSZ2KbHGhPLeIoHJ00cTfoeu2qzBmp.iYY/MsqXO','admin','ak_da02aecc1fdab330','2023-03-19 10:13:00',NULL);
INSERT INTO `users` VALUES (4,'backup_admin@company.com','$2b$12$jAJT5ic40QEdOB8g8b7ufeJd/u1DOd06U2A/r1d1M4dAJGQuLnR/K','admin','ak_9e04a047674607fb','2023-08-07 10:10:00',NULL);

