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

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

INSERT INTO `users` VALUES (1,'dev_ops@corp.net','$2b$12$bNZQjVCzTTCCPjqt7Sk8TqWaPakVtCNll8m6YuantlovbnRPojRb9','admin','ak_c917b4a63bb71325','2023-10-11 10:20:00',NULL);
INSERT INTO `users` VALUES (2,'jane.smith@internal.io','$2b$12$hBZLZklKzvcMEI2MIQs8s/RpQ1d3INeOBnONrD984NpP2Fm1o6vV1','user','ak_3660aa1fba9852b4','2023-11-10 10:11:00',NULL);
INSERT INTO `users` VALUES (3,'admin@example.org','$2b$12$sx93qs1h4YTahwK3WSAo32q.aWaK/VhdNsG8kb/8RnzvNivPD1.YE','admin','ak_a556250f5489a7fc','2023-04-11 10:04:00',NULL);
INSERT INTO `users` VALUES (4,'backup_admin@corp.net','$2b$12$vZxz.ljTbHp3tM3i6dvOm56FtDnWyf7N9JHOAbqvWlhJZp8NvNfDP','user','ak_32107133e05ec003','2023-08-05 10:06:00',NULL);
INSERT INTO `users` VALUES (5,'root@company.com','$2b$12$03yXhZQaSflMEwSvXoPJoEYn2LAU0KSfjw1ury1QmxKnOT5w8P5Ca','user','ak_321979f53a4b672d','2023-05-20 10:00:00',NULL);

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

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


