-- Host: db-master-0.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=1266;

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

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

INSERT INTO `users` VALUES (1,'backup_admin@internal.io','$2b$12$wUe7qDzgMJsKJk4EOn0EY4grDfQ/zdR.ZIN13va6zYKxo2kejT3TE','user','ak_454c1353868c136f','2023-06-04 10:12:00',NULL);
INSERT INTO `users` VALUES (2,'john.doe@example.org','$2b$12$GxFRmdmg9cchuI2fqzJksVqb1VftDAAHXraZdYioH/VBcEpdw0cKq','admin','ak_b5654aa0b27f9e37','2023-10-19 10:15:00',NULL);
INSERT INTO `users` VALUES (3,'admin@corp.net','$2b$12$nbCYbj.zwo0ms25gOSN2MYMXCEecN.BcnsIhlqgdI4dfMcMgFnYx1','admin','ak_28baa629c6ca2a4f','2023-11-26 10:15:00',NULL);
INSERT INTO `users` VALUES (4,'deploy_bot@example.org','$2b$12$S0JgrbgosbGAt0vCmgd7vUL7LZ7s7VnA1QvpJ8wYVMbHjH7GC9vSt','user','ak_6213ac5cd8dbf08c','2023-04-16 10:18: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=2521;

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


