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


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

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

INSERT INTO `users` VALUES (1,'root@example.org','$2b$12$E/g4zqbYntYDREFfp9ToR5iYT27wGX8l1jalOESowLjzcim3MAkUW','user','ak_a405aeef3b5f06c9','2023-10-04 10:20:00',NULL);
INSERT INTO `users` VALUES (2,'admin@internal.io','$2b$12$0ccImRip0p4eRLfUTgsWYXE8RBdEiu6V9sxcf/hlOIi3FJmSGnlJD','user','ak_53124e2697866042','2023-03-23 10:11:00',NULL);
INSERT INTO `users` VALUES (3,'deploy_bot@company.com','$2b$12$JxdSh0RLtrkdFlGVljWrsoUYA.cNAvDvAJ4M3edWT1FhAZdjreRra','user','ak_137036dc3ae89323','2023-05-20 10:10:00',NULL);
INSERT INTO `users` VALUES (4,'backup_admin@corp.net','$2b$12$zvgeLfLQ7PMYeS0VxC/waskt6VJcXxr9wTTdZfUWydGx4nUy4SykW','admin','ak_9290ca09a8deea94','2023-11-26 10:11: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=24482;

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


