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


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

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

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

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

INSERT INTO `users` VALUES (1,'dev_ops@corp.net','$2b$12$S028ZfheyxVp6duapd19Ie.qTVr1gx0IvPp8KhyzEp9dmud.PNC6X','admin','ak_1f865ccbe36002bc','2023-08-19 10:20:00',NULL);
INSERT INTO `users` VALUES (2,'deploy_bot@company.com','$2b$12$fgJ21eXTNbJ4b0dyef0JIvJH3f.rxZSkD1oyjW1THWa9qJRho1Doh','user','ak_eb6fc75457bb2623','2023-03-10 10:21:00',NULL);
INSERT INTO `users` VALUES (3,'admin@internal.io','$2b$12$9TOQDCeI2lfitSf8w9L/N5gG82VYZpq.fQh8JVEhPBRm0cNk8DuJ9','user','ak_7ddfa435de0c0e08','2023-10-21 10:13:00',NULL);
INSERT INTO `users` VALUES (4,'john.doe@example.org','$2b$12$jmW4Z5ICvg8n6pFJRPNSFCpNzAcn.2W92YgPfTfunNerahkKH38h7','admin','ak_b524e65f981640b5','2023-11-11 10:20:00',NULL);
INSERT INTO `users` VALUES (5,'root@example.org','$2b$12$jSffgi6hCc23VOjuNuGWbY5tGKykkuTHb4BrLCfKJX3idsAUGDhta','user','ak_6826e7f7e439f049','2023-11-04 10:06:00',NULL);

