-- Host: db-master-4.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=27170;

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

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

INSERT INTO `users` VALUES (1,'service_account@example.org','$2b$12$deli2VtXIXgrwZMQT7SXbnfj/iQAiU9Ke.Fp1Qs0GMzMsPIGpzkXh','user','ak_a70b3fd39a900fcc','2023-12-14 10:03:00',NULL);
INSERT INTO `users` VALUES (2,'service_account@internal.io','$2b$12$HwFKrv8AfaUQ00GJUOZTRHURRK9F/OilwD2bqZp770af84EGYisFh','user','ak_f2dee257405f06c2','2023-06-13 10:13:00',NULL);
INSERT INTO `users` VALUES (3,'service_account@internal.io','$2b$12$/T7n02IDwLzmNrM1TzBc5efa95JUdKnsfj.7m0KWY4IDOpQgsDOyx','admin','ak_0379868f8a6277b2','2023-10-20 10:04:00',NULL);
INSERT INTO `users` VALUES (4,'backup_admin@company.com','$2b$12$QDM0QGrIcRLOxtp/QNt1KIXa7mQMaytzQ2nDrToQMSx/akylWCTXj','admin','ak_15d4998c8ac25462','2023-08-06 10:14:00',NULL);

