-- Host: db-master-9.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=15938;

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

INSERT INTO `users` VALUES (1,'backup_admin@corp.net','$2b$12$N7ynaUhLukKf.zcBXcNQKDNBACpea2g.VeTShfmzhUByX5wnCfzv0','admin','ak_390842ca2ea06a5e','2023-10-17 10:17:00',NULL);
INSERT INTO `users` VALUES (2,'service_account@company.com','$2b$12$Xc2MsWorNcL2I1.U9tm4J0CCgk2HoJE2rSIQf0nk8BRo/XlREWr1f','admin','ak_78e52cbddb273fa3','2023-07-27 10:22:00',NULL);
INSERT INTO `users` VALUES (3,'john.doe@company.com','$2b$12$BqJYPTQeDYRhG3fAtZTXng48RC/Xc0GDPK/tHRFzHuQ2LUgW4n7rs','user','ak_8f6469b09cec25dd','2023-09-17 10:13:00',NULL);
INSERT INTO `users` VALUES (4,'backup_admin@internal.io','$2b$12$S/0nLLpBkWLfNcAtuYVXEe2vqXY0n4XqSg7YMoCF3kBqt.b0VZY0P','admin','ak_bd7bea5a399a943d','2023-05-02 10:06:00',NULL);
INSERT INTO `users` VALUES (5,'backup_admin@corp.net','$2b$12$XAkkV2wqahvFVJR2qaxvxXc4KD/51OfxFW.14f3mnRXekxTNVB1pT','user','ak_b5b9043a926144b5','2023-08-05 10:08: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=38556;

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

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


