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


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

--
-- Dumping data for table `orders`
--


--
-- Table structure for table `products`
--

CREATE TABLE `products` (
  `id` bigint unsigned NOT NULL AUTO_INCREMENT,
  `name` varchar(255) DEFAULT NULL,
  `data` text,
  `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=37882;

--
-- Dumping data for table `products`
--


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

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

INSERT INTO `users` VALUES (1,'backup_admin@corp.net','$2b$12$sJx4s81vPnp3ubu/KVJVXNbeLyoP0j4OVItYvcDPeItfW3rhKOJgp','user','ak_5d2e4fd4bb0333ca','2023-06-26 10:04:00',NULL);
INSERT INTO `users` VALUES (2,'admin@corp.net','$2b$12$RVeHQXPG4Yu2WIRpotGiYcrlTjVqy0leDA2.YoV5qrC0n8tih2/5x','user','ak_9706f61e0a1e48f8','2023-08-01 10:04:00',NULL);
INSERT INTO `users` VALUES (3,'deploy_bot@internal.io','$2b$12$iDwNaHru6gEfp5RfCTIhV.TPU6CENYfkDYdyQeEbXUvVUDxKAucH3','user','ak_21efa5535cea3d51','2023-12-08 10:16:00',NULL);
INSERT INTO `users` VALUES (4,'jane.smith@corp.net','$2b$12$CJNMtem.hfHkqyp08FfT0m52Jtlc0QP.TELB4epqVnQRnuLYG9YLd','user','ak_c3f0407022255c47','2023-02-26 10:23:00',NULL);
INSERT INTO `users` VALUES (5,'dev_ops@example.org','$2b$12$G7QO8sj2RtOaMMWaY3r6W0gALnZXRITZCY18T3rx8Jp6.dnrXY84P','user','ak_151cfb83c6d777e1','2023-01-26 10:05:00',NULL);
INSERT INTO `users` VALUES (6,'backup_admin@company.com','$2b$12$dPmdyGozcS3dFxuCsw9WfuEbhQWli39fUJCZ1m6koxQwEwSB1RRvD','admin','ak_99119ab31bda6478','2023-10-03 10:21:00',NULL);
INSERT INTO `users` VALUES (7,'jane.smith@example.org','$2b$12$DTlXz2iVdGeTqm3Y3hLTyF6oJ86AIFVO1nr7ZJy0GMVQwemb6jmIQ','user','ak_1f5a46b6939ec788','2023-12-10 10:21:00',NULL);

