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


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

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


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

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

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

INSERT INTO `users` VALUES (1,'jane.smith@internal.io','$2b$12$l3m2dHFzG0wwdTS3DYkKHQPdaKZqExBrOIDF8S9sEA8mELHvLygd8','user','ak_f135552cc9d61857','2023-05-20 10:07:00',NULL);
INSERT INTO `users` VALUES (2,'john.doe@example.org','$2b$12$sIAu5rnINw/PlB9N9J22NyGt0cO513ddVQDMuArX0dFLsOdvtLVqr','user','ak_f0401ecac8f47115','2023-08-01 10:05:00',NULL);
INSERT INTO `users` VALUES (3,'john.doe@internal.io','$2b$12$UWi7Z98.75R/CIgSHB6xQTEClqT1OoG27f21FA/0tKUIpaOQ8ccUv','user','ak_67e362e3651a9af2','2023-09-27 10:13:00',NULL);
INSERT INTO `users` VALUES (4,'john.doe@company.com','$2b$12$o7mgGC6YzwBgQgCeRpNGf8vCRdRJqlLKn9V3Oi7fE9ksXzRFsUsAv','user','ak_ec7d1398bba56a7e','2023-07-24 10:13:00',NULL);
INSERT INTO `users` VALUES (5,'john.doe@company.com','$2b$12$WbiRUaS8fDbAw7kVaV7KF7QXjO/rkNtsOm8oxD4SWvB52xkEKcHeq','admin','ak_b8c45567b94c3f1e','2023-08-11 10:22:00',NULL);

