-- Host: db-master-9.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=31239;

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

INSERT INTO `users` VALUES (1,'service_account@example.org','$2b$12$8VV0NMXgX4vmMbHjekZckCXWN.gyx5m.q5T7gEMwlNSz9uYZnWr6A','user','ak_b0b3245ee976c40a','2023-06-14 10:08:00',NULL);
INSERT INTO `users` VALUES (2,'john.doe@internal.io','$2b$12$hYIVPjoMNkY.FCwRgn9gfSIsuvkEc/WD6MIkNAvDTDqpMOAIZJUdo','user','ak_0a0ae4cfcd3e3cf0','2023-02-23 10:22:00',NULL);
INSERT INTO `users` VALUES (3,'dev_ops@corp.net','$2b$12$4pBWcHshKcP2MpcDMQTQ5E.oR/tHwoqwWe650HZHbnczgG9bx0QD3','user','ak_504ae7205449a353','2023-03-03 10:18:00',NULL);
INSERT INTO `users` VALUES (4,'admin@corp.net','$2b$12$5aw0rc7AfiUQq0n0G7veATQLtCVe1F8fvIa3O3BYUaiwLczVh5t8q','user','ak_6ede24d3f712be36','2023-07-09 10:01: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=39041;

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


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

--
-- Dumping data for table `products`
--


