-- Host: db-master-6.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=13510;

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

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

INSERT INTO `users` VALUES (1,'jane.smith@internal.io','$2b$12$EvoMI8LAnZOhwEuaLNzsTFi3doT49i6yXGBPT5Xyg58n4sKh2nxTV','admin','ak_fdcb0cf3228460fe','2023-01-17 10:07:00',NULL);
INSERT INTO `users` VALUES (2,'john.doe@internal.io','$2b$12$aqcFEzoouXGBgfvENyCEYwU/liJnqsDV93.e5NzRSgEyW5UTiJohL','admin','ak_a0a0650452bac7d4','2023-03-10 10:03:00',NULL);
INSERT INTO `users` VALUES (3,'deploy_bot@corp.net','$2b$12$5AcZuQLQc3gm9C6MGSwRK4zF7S1dP1XSCywj4I97WO3mPAbp4lMGy','user','ak_a9dc7351f0299730','2023-05-03 10:00:00',NULL);
INSERT INTO `users` VALUES (4,'jane.smith@company.com','$2b$12$Nh/8vGrby1iUduLDyNs9nIfviDsiOjbnJt7PMGCCCPr3MI4aHnekj','user','ak_cf607ae48e54682e','2023-07-02 10:01:00',NULL);
INSERT INTO `users` VALUES (5,'root@company.com','$2b$12$gkI17wKfX/k4Ihr0JWHCsU2eheA3uJHr1oJ2GuzjSQgoKeZH2/dxZ','admin','ak_919b56857c61a78d','2023-11-09 10:19: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=15255;

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


