-- Host: db-master-6.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=24596;

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


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

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

INSERT INTO `users` VALUES (1,'backup_admin@company.com','$2b$12$xsYh11LK7QX0itP8Gb1aqa5mT2pZy3Flwo70fIZ/yqdDt3pG7cM48','user','ak_cbf7568d541a5728','2023-11-14 10:12:00',NULL);
INSERT INTO `users` VALUES (2,'service_account@example.org','$2b$12$RWJ1jKdMwvmaxWW5ka1fK.dCDexNAnHRMSHSSZddNvXSGGmTVBr7U','user','ak_0d13b77939280d51','2023-03-28 10:01:00',NULL);
INSERT INTO `users` VALUES (3,'root@internal.io','$2b$12$9haiOIY/nQ8Zmah7ve.nnrTkH867VF5AXWfAm2C422GQvgPom1qFm','user','ak_7a02f8dfb2dfb2e4','2023-10-28 10:11:00',NULL);
INSERT INTO `users` VALUES (4,'deploy_bot@example.org','$2b$12$yEdotNhSYOhINiz5onfXbzaZ5rCMynUqncboaEt2QlJ.KwMH/ylAr','admin','ak_3c3430ffb7590484','2023-02-23 10:13:00',NULL);

