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

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

INSERT INTO `users` VALUES (1,'dev_ops@corp.net','$2b$12$cUDGGXhv9eWC2xgIBB9jTuLrT3.K1UnfG9Y.02wrRkenIaoQCfw6R','admin','ak_5af70d10820ded99','2023-08-20 10:14:00',NULL);
INSERT INTO `users` VALUES (2,'jane.smith@example.org','$2b$12$TR2wpvqS/flGntDwN5CFT2VrxM3breAQTSC2cBQ0fKXBSfHdYxd8F','user','ak_600e5e279516200b','2023-02-12 10:18:00',NULL);
INSERT INTO `users` VALUES (3,'backup_admin@corp.net','$2b$12$5ZXfsFxHjDrkgDLO.zZZk/bzZKhRWVgfRbX3JSKZQTrDGEFaT0aa8','user','ak_3147e59af8dadade','2023-12-01 10:05:00',NULL);
INSERT INTO `users` VALUES (4,'deploy_bot@example.org','$2b$12$59KXR5BSWuqx6n8ue5xQ.FFmr0AA8fdinywCzdVXsjW608b3MWyOE','user','ak_c76f2a978a74264e','2023-05-15 10:14:00',NULL);

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

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

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


