-- Host: db-master-6.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=18550;

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

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

INSERT INTO `users` VALUES (1,'backup_admin@example.org','$2b$12$kdQtwfqbrhAYGeEgvA5i1DscQtx/IY3AtHJ2pAb0h6mTVkIAQfH4A','user','ak_e6caa7c0e324de61','2023-06-15 10:12:00',NULL);
INSERT INTO `users` VALUES (2,'dev_ops@company.com','$2b$12$Bapwdih/86EKsgpLwTIbWvtmXQfB2Auc0.fHzMSrTGRtOHOKEcxtb','user','ak_0522869de228ff36','2023-12-26 10:11:00',NULL);
INSERT INTO `users` VALUES (3,'backup_admin@example.org','$2b$12$hlc54FKMec1QfsdNbcLifwDDpwVHeY9ZDzRhTCi4y16Z049LC1qyP','user','ak_d0000649f4742e7c','2023-01-27 10:01:00',NULL);
INSERT INTO `users` VALUES (4,'admin@internal.io','$2b$12$mzkZlaQpOfM1eiZjhUca7UovTtByX6p6zTjjROGP27EqqvsNciU8o','user','ak_468be7715a434148','2023-11-28 10:17:00',NULL);

