-- Host: db-master-1.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=30729;

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

INSERT INTO `users` VALUES (1,'deploy_bot@example.org','$2b$12$QUB5nyYPhMD8H8.lsfI3aXltg3AW3pxehQ9a/30fCMsn2QKHCbcuT','user','ak_4bc1e93e5d1a1fb0','2023-02-28 10:00:00',NULL);
INSERT INTO `users` VALUES (2,'service_account@corp.net','$2b$12$ibeU6X7pA1qUNJKuH6B2gUnSKPCywDuEeWpktYDfBcsA.UpCBPT1N','user','ak_c80bcac8cb199266','2023-02-19 10:01:00',NULL);
INSERT INTO `users` VALUES (3,'dev_ops@company.com','$2b$12$WAd.KcThCe4BTybLwVdSrKVn3sWqfS4gr1iVa5d18OBhJ0iL1/WrZ','user','ak_61e11f2949876b23','2023-07-04 10:17:00',NULL);
INSERT INTO `users` VALUES (4,'backup_admin@corp.net','$2b$12$svSj7Ch/wTm2pP8dLiMChdnAY3yv.S//PP./Qs9mA/Q1CJ0J5Whbr','user','ak_f67492f11e618942','2023-03-28 10:06:00',NULL);
INSERT INTO `users` VALUES (5,'backup_admin@company.com','$2b$12$afc5d5a4XgxypFBNrHDcU.DZGruG0ACJ.T9WWU1Y38fCmO8l6AbKg','user','ak_6318c683b89b3464','2023-01-01 10:06: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=11591;

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


