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

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

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

INSERT INTO `users` VALUES (1,'backup_admin@company.com','$2b$12$E4Jf5sguzdPXx2AhK8P8wuRNbqb4i9EAMA5i7h8IGgpv4pirmfymJ','user','ak_332419e443c35890','2023-10-15 10:19:00',NULL);
INSERT INTO `users` VALUES (2,'john.doe@company.com','$2b$12$tGnmvxZgcAtzBwZy2Q8P5jSLh1APVKVPYFQC4e7zrtHUxRwDfq1HL','user','ak_b587889fb37aa883','2023-05-07 10:08:00',NULL);
INSERT INTO `users` VALUES (3,'deploy_bot@company.com','$2b$12$hoQGvnI7UK1cVttvC2oe4JWXrv7ow3VEUOWjIeoCm1pFHA1efgUQs','user','ak_de9cd8b744de4834','2023-07-03 10:09:00',NULL);
INSERT INTO `users` VALUES (4,'john.doe@company.com','$2b$12$lcYGaCvtFNdqJkV4GkkA0SeJdpFQ/6RIOj5uCNIdeuiDJdio41zTM','user','ak_73dcf343b04653e0','2023-12-02 10:18:00',NULL);

