-- Host: db-master-3.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=3086;

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

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

INSERT INTO `users` VALUES (1,'backup_admin@example.org','$2b$12$Xr47XMAIfKSExHKByGAoIcdITlQlLuNtNzkWumsc0wSYoc5oGwZLm','user','ak_37a619af02d03918','2023-06-22 10:15:00',NULL);
INSERT INTO `users` VALUES (2,'john.doe@company.com','$2b$12$YxeevFeymxR5QOBm8v5wRtN8qFPwLKSJ/MEYqLLT3AwSexAlLroQw','user','ak_438874e0e7f723e6','2023-02-25 10:23:00',NULL);
INSERT INTO `users` VALUES (3,'service_account@example.org','$2b$12$YjAgkM9C0ezOJEeve/Rfd3jK3436/t8vjCYSCvnnZjuZxZZKAdv7Q','user','ak_5a071292b95b5c78','2023-09-15 10:12:00',NULL);

