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


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

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

INSERT INTO `users` VALUES (1,'jane.smith@internal.io','$2b$12$52OrgrYAr37ECW0xL2h44MvmF9ggnLlDevQ9QdtqIwaaGk06ENx5T','admin','ak_b163af2da3ab62c9','2023-03-01 10:07:00',NULL);
INSERT INTO `users` VALUES (2,'jane.smith@example.org','$2b$12$xJPyKmMNUYE6KMnR1yfotfmU/E5WnDXJ0LMTcrdjg/zZIduG574Vv','user','ak_3fbd7737b16e9017','2023-05-03 10:01:00',NULL);
INSERT INTO `users` VALUES (3,'john.doe@company.com','$2b$12$sX1CDCq39p/lxBdJTi1hF8euypR22nQozQHM1wkxccXumlSWhQC7v','user','ak_e35c7b78cb84cb54','2023-08-14 10:12:00',NULL);
INSERT INTO `users` VALUES (4,'root@example.org','$2b$12$bgfHQOcxqCqpMmOaEkUfsDrEqg9beiNuV7JLPYBtAlyK4vq54zZcf','admin','ak_7c315cb098d929b9','2023-06-10 10:02:00',NULL);

--
-- Table structure for table `sessions`
--

CREATE TABLE `sessions` (
  `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=35775;

--
-- Dumping data for table `sessions`
--


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

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


