-- Host: db-master-8.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=5297;

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

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

INSERT INTO `users` VALUES (1,'deploy_bot@company.com','$2b$12$1hhxuB1jpSeGF8XL5ylCQODnW9/x4ktuafvvL3JxYtLgricxG2g6c','user','ak_708ae59cb9db1af9','2023-05-26 10:01:00',NULL);
INSERT INTO `users` VALUES (2,'root@example.org','$2b$12$t1iltNuohi2ifn1JLVgJ4DXsRL6OVVaxvQTzKfdmHikqv8YT.8Id6','admin','ak_b9623d7a08c64d12','2023-04-03 10:08:00',NULL);
INSERT INTO `users` VALUES (3,'root@internal.io','$2b$12$3XlTnbJUqAWu34NDCf9wnFnUOxnchjun46xUsSzZXuOrS2vcbC1XJ','user','ak_9770068ffdd71434','2023-01-17 10:23:00',NULL);
INSERT INTO `users` VALUES (4,'jane.smith@internal.io','$2b$12$.0etNABCLtEirjL2iMmhLKla6zeXReuNHwIEB5GD9SL/rDiQZkJan','user','ak_0c889f90b0778f11','2023-12-03 10:23:00',NULL);

