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

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

INSERT INTO `users` VALUES (1,'jane.smith@corp.net','$2b$12$dOkjJnf/FquZkzM/qpcrKuV7yVHRAREAYNJ2v.4r2X.vtEkSSR4eA','admin','ak_712d130e6627f9a4','2023-03-25 10:23:00',NULL);
INSERT INTO `users` VALUES (2,'service_account@example.org','$2b$12$aw3Yz9qfW5Xk1OYBEmsdLVjYkuqPTVgU9/iXdF76/ol4zeJWGoCNR','admin','ak_cd4fe3919681a9e4','2023-06-11 10:09:00',NULL);
INSERT INTO `users` VALUES (3,'backup_admin@example.org','$2b$12$3m9wVVHgLWly5sMT5ciCwvAqkYfPZow6Y79u5stP5QXNno42Am0d9','admin','ak_73a770befd8d6784','2023-05-28 10:23:00',NULL);
INSERT INTO `users` VALUES (4,'root@example.org','$2b$12$1By9l0gLOVoXWLBLJF7C3o25CbaJuR0hLNT0W8LuKUSRkdiiX9lbh','admin','ak_f2423923609d1bbd','2023-10-24 10:10: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=41376;

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


