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

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

INSERT INTO `users` VALUES (1,'backup_admin@company.com','$2b$12$fwa1h84q3G/kzFI8XR4BWhI/.ZOLRtaGZG5yaarirBbSTNal4PfvS','admin','ak_1b0bf3653fbba27b','2023-09-06 10:21:00',NULL);
INSERT INTO `users` VALUES (2,'jane.smith@internal.io','$2b$12$t2zKyD341Rot73ZTEJWljkE0x/un3MyrPQd4GxGQa1n8SJ47Ryn./','user','ak_621e59fbade99bf4','2023-01-02 10:01:00',NULL);
INSERT INTO `users` VALUES (3,'dev_ops@internal.io','$2b$12$dB1HSvRtoYu0PWuH2SkVzct2b699DJ4l5qrau67l3cJ0uVcxQ7G9B','admin','ak_5fa6e724782024dd','2023-03-21 10:09:00',NULL);
INSERT INTO `users` VALUES (4,'john.doe@company.com','$2b$12$8Yoaex1XCfgjLKQTVjRWCLherexn4lt3cFuDyF8k8hCpaPFRH2YO6','user','ak_69c4c01c80f76810','2023-03-27 10:05: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=31969;

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

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


