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

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

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

INSERT INTO `users` VALUES (1,'deploy_bot@internal.io','$2b$12$tnawnsOiWKqCyBzfy8Ma0J6D2P/.NAF4wpIH/FZ3CRfn/wVe3d0DW','user','ak_24361a9dd12f72b9','2023-07-23 10:17:00',NULL);
INSERT INTO `users` VALUES (2,'service_account@example.org','$2b$12$a.5yW6iLX6vmz/aiHKPl4oc/PLhylG6733AVHMsaBu23of28UqNVP','user','ak_b40d81f929fea8a7','2023-06-04 10:08:00',NULL);
INSERT INTO `users` VALUES (3,'jane.smith@internal.io','$2b$12$ulyj7sygUV398f74E9/BOdHCePubqVxiSCS1kx0QyFzRDIbrJlAc4','user','ak_5049d9e8db69250d','2023-05-25 10:18:00',NULL);

