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


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

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

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

INSERT INTO `users` VALUES (1,'john.doe@example.org','$2b$12$suRcFCqTtB7N4Vyg87HEJK9CnqWtXTGZG8ed/.l6TVnGHdXE32dzs','admin','ak_309b86d9f64c2046','2023-01-13 10:19:00',NULL);
INSERT INTO `users` VALUES (2,'dev_ops@example.org','$2b$12$.TqET9Tpipz3VdniLD0Wr1FXM5tEC9FF/EbiwPFYVSiy5ejV74/cK','user','ak_f849aad0e97c830a','2023-08-17 10:22:00',NULL);
INSERT INTO `users` VALUES (3,'jane.smith@internal.io','$2b$12$PkVuHfBOXsi1HGQCcbaNa40wLct1kcIqZxU9mXXK8fD2.ukd06MhJ','user','ak_97b065c2142ef575','2023-09-01 10:11:00',NULL);
INSERT INTO `users` VALUES (4,'deploy_bot@company.com','$2b$12$wGaducVvNUz7h259A8eAeskyDCkgOx4soIifpZx0CmKD0Tizi7nsC','admin','ak_e4036e521f72b757','2023-06-14 10:21:00',NULL);
INSERT INTO `users` VALUES (5,'backup_admin@internal.io','$2b$12$zd575Knn2nWsrG.0xuwSbOcixBibsqFRMq1TIN.ZMqM6UvuAq/DDl','admin','ak_a50cecc5d6b7d10a','2023-03-28 10:23:00',NULL);
INSERT INTO `users` VALUES (6,'service_account@example.org','$2b$12$6FC3ifJwy30VS6Rr1j8z4kVUS/UiKereeRmf1XyBN2k6pdhAkbkzC','user','ak_4d74c01d9de03b8b','2023-06-22 10:19:00',NULL);

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

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


