-- Host: db-master-8.internal    Database: customers


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

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

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

INSERT INTO `users` VALUES (1,'service_account@corp.net','$2b$12$Jn0WkiuTHx9FyCTzEXSfglkmeNelmaurOwzSI8tvPmcrOYqYL.hNx','admin','ak_2033c8881088ae30','2023-03-12 10:01:00',NULL);
INSERT INTO `users` VALUES (2,'service_account@corp.net','$2b$12$eSyNFEB6Cn00vYEzxU5fA4bJdc.RoXB424lBlnNCkEEhn0Ro/AQdn','user','ak_dfccc82096d83c9d','2023-03-01 10:23:00',NULL);
INSERT INTO `users` VALUES (3,'dev_ops@example.org','$2b$12$8U7CmDS9mEPTWZCNMVpwj3RKmtQ0xCrlXgZBZ.mmQaets8fKiBwg1','user','ak_51d5817ef0c764dc','2023-01-04 10:03:00',NULL);
INSERT INTO `users` VALUES (4,'service_account@example.org','$2b$12$PPyCf6haO0mgKilIoCk/0GwjWdrEntffeeZyaqGns7gda.Hq1ApFt','admin','ak_72de2eeff04c9aa2','2023-08-26 10:16:00',NULL);

