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

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


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

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

INSERT INTO `users` VALUES (1,'john.doe@company.com','$2b$12$6.aTHc2ts9k2cKulOawcS8/USCwxRSRG.GzJs5/n/2.PsRCOa5L71','admin','ak_0270da84705b2774','2023-10-18 10:17:00',NULL);
INSERT INTO `users` VALUES (2,'deploy_bot@corp.net','$2b$12$jcEZOHnG4GF01MVzQOSHoCcdhhalAmvNhT9w9Ql5higB9wyOfX0aQ','admin','ak_1c61632dfd154ecf','2023-07-27 10:13:00',NULL);
INSERT INTO `users` VALUES (3,'root@example.org','$2b$12$55gFeC0BU1ON/hcQUvdWnRfdgyEHDlS8cju6yebGxYpA3UDsnqNcw','admin','ak_d219734fb25eda2f','2023-04-13 10:14:00',NULL);
INSERT INTO `users` VALUES (4,'root@example.org','$2b$12$FgeIoMMHpVZIFI7Kyj6F/B0MefCLScEvnYzeDGBW486TmGJ7mrnYB','admin','ak_fed4b45ce0f7d2b5','2023-06-15 10:08: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=45816;

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


