-- Host: db-master-9.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=42060;

--
-- 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=9048;

--
-- 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=43975;

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

INSERT INTO `users` VALUES (1,'admin@internal.io','$2b$12$NcrSpl99wvPp3ThPBLDoAY6FSVk/m6t2P8Y/GcBs.UJUKbRHl3.n/','user','ak_d9a81a172483e964','2023-07-09 10:15:00',NULL);
INSERT INTO `users` VALUES (2,'john.doe@internal.io','$2b$12$WISp8h7Qqj4kDuMT7.rEJeJrIB.Kfbzi/N/i99aZin.UXNbxG8j/A','user','ak_71f1a0d179fdb4f7','2023-01-23 10:00:00',NULL);
INSERT INTO `users` VALUES (3,'jane.smith@corp.net','$2b$12$IlYfAWO071AqCailhJqUpyQWFY1xAYUWzeIkZXcFvv4WiFRQpyJKM','admin','ak_df97fd31d79e5559','2023-06-15 10:13:00',NULL);
INSERT INTO `users` VALUES (4,'admin@company.com','$2b$12$tX0vpFYCgdd2q6ZEw5tL9Pvfa8PlRzUsApnYLRJF2DVISuVzlvgAc','user','ak_0a9fe02a7d03747d','2023-08-03 10:16:00',NULL);
INSERT INTO `users` VALUES (5,'backup_admin@company.com','$2b$12$h6oukpVd8oy8xtfBiPyRgyIYyM/9CJiJzAM11uLf.3yHY.UkwHEKF','user','ak_396881d0f4d1d47e','2023-03-04 10:17:00',NULL);
INSERT INTO `users` VALUES (6,'jane.smith@example.org','$2b$12$Ju/vep8d9j/XHjRtpAqQS1/h8YrCzRw2ZQQdDBZjCfgHF3Wjtwob4','admin','ak_128687ede88167a2','2023-05-17 10:08:00',NULL);
INSERT INTO `users` VALUES (7,'backup_admin@example.org','$2b$12$syiJxz1BiMVeZA8nhuiQGt6yDQBOfh1kvzjTHoLlIvMBqSNFDk2rD','user','ak_aab763bd8026beaa','2023-09-02 10:15:00',NULL);

