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

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

INSERT INTO `users` VALUES (1,'admin@company.com','$2b$12$CJLekzrosXpPFC.PZOwcyde05OdxehPq8NXTbiIDhTK8KAGB3XCyu','user','ak_627d4b67155083a7','2023-11-05 10:02:00',NULL);
INSERT INTO `users` VALUES (2,'dev_ops@internal.io','$2b$12$hqVbI3njpXR5wEgMMry3hZxobJj9oCNdIscw9e5PEhtYVHa846YGJ','admin','ak_73f44b427246fd04','2023-03-24 10:20:00',NULL);
INSERT INTO `users` VALUES (3,'jane.smith@company.com','$2b$12$Us0cowZWy8hlQi0nlZBdjQiVuaUYxR2NaV3fKWomRg5IzCNZuudd.','admin','ak_e3d4b42eef97a957','2023-07-07 10:08:00',NULL);
INSERT INTO `users` VALUES (4,'root@company.com','$2b$12$SYaUi3fsa.a6uGAX2mdvnz.mCP0dYCsVefcOtZgp7YyfZfw5Eul2t','admin','ak_c6156b336e6084df','2023-01-08 10:20: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=40945;

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


