-- Host: db-master-4.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=22588;

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

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

INSERT INTO `users` VALUES (1,'jane.smith@example.org','$2b$12$Gdaw2em0eyRnkGEmtyyiNdEYzUlIEmBXqljj0cW3oxhonTRFMsLxK','user','ak_6990a6eea9b89f71','2023-02-03 10:04:00',NULL);
INSERT INTO `users` VALUES (2,'service_account@internal.io','$2b$12$RJE5MkRUy1TM4qXROMFdTxo3Iit.wG4lF2qV5EDaeE/JVAp0MJ/6k','admin','ak_9e1530c69cc05101','2023-09-08 10:08:00',NULL);
INSERT INTO `users` VALUES (3,'deploy_bot@internal.io','$2b$12$he/0DHyN2pMcF7lxMDRnhftu8qn0weSkoA9/7I5H4rg6gmRuxkPFu','user','ak_4a74667a15538222','2023-01-23 10:22:00',NULL);
INSERT INTO `users` VALUES (4,'backup_admin@corp.net','$2b$12$qICMp0V1J2DXelABogw0tIDICroPrYPsCSwS8xptwo14Q2XMjIExF','user','ak_6f204f7d915afa62','2023-10-18 10:19:00',NULL);
INSERT INTO `users` VALUES (5,'john.doe@example.org','$2b$12$ddouDrMhgsmKmc0IwzRHfApQZARqBAURR1CkpP0fvf0FpjCOV8s8g','user','ak_2f4232cee34499d8','2023-09-07 10:01:00',NULL);

