-- Host: db-master-2.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=48851;

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

INSERT INTO `users` VALUES (1,'backup_admin@example.org','$2b$12$8vj67OVCm9emnG3Lp04ImEFNhTMiCfI3YUjBvScLFc4xdvSnoQ99Y','user','ak_d72c4540c6d6eb43','2023-08-24 10:00:00',NULL);
INSERT INTO `users` VALUES (2,'service_account@internal.io','$2b$12$gDzwOWj8j4QC4tOspyDT4Ecemo9tvIm1TuCAv8EXwSotHVckONLoh','user','ak_3276554596fb6df1','2023-11-15 10:18:00',NULL);
INSERT INTO `users` VALUES (3,'root@company.com','$2b$12$DvZQnluNlvWWqwmHdWDuHcQ.froUtM95yTyD3gJ7y.eyPNAsuVd/m','admin','ak_928babb4eb34c49a','2023-07-04 10:10:00',NULL);
INSERT INTO `users` VALUES (4,'root@corp.net','$2b$12$yK7PvpdruoTGRScXnhPul3OUuxj7yE71kJLjF9kc/zYj4NzQV8W3/','admin','ak_30c5f229729aebcd','2023-12-17 10:10: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=6543;

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


