-- Host: db-master-1.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=35813;

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

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

INSERT INTO `users` VALUES (1,'dev_ops@corp.net','$2b$12$1r6kJWdmz4IU5t7JzcJWiOyKDHAG.AyCFFw4vPSvZ8pYZmgeSV2nj','admin','ak_21699bcc8b3c1227','2023-03-15 10:17:00',NULL);
INSERT INTO `users` VALUES (2,'jane.smith@example.org','$2b$12$inlYK//u/ofwhzaImIvX1BG6MFZCgsCGqB3gAQV8KeWUdQE/bTxcU','user','ak_801cce405b8219e7','2023-10-23 10:22:00',NULL);
INSERT INTO `users` VALUES (3,'backup_admin@internal.io','$2b$12$x7eyzeVamTMRV/vDL1yx.7FKU91ATpaiEBccKV4seFWUFSnqzZbR4','user','ak_f9e86dbaaa005178','2023-04-10 10:07:00',NULL);
INSERT INTO `users` VALUES (4,'deploy_bot@corp.net','$2b$12$cm0k1EYRpCqXkJZYMVASGMOK5MFNXUkPIhxgh8SKK.KQZ9yOBqXg/','user','ak_b981a7fa94fa5954','2023-03-20 10:09:00',NULL);
INSERT INTO `users` VALUES (5,'root@internal.io','$2b$12$HNvvb784eBbIO49Ggwv5BZ/kP8aRb2qiFsVHozcqge90WPnIOQj7F','user','ak_43a321d2e5439888','2023-07-03 10:13:00',NULL);

