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

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

INSERT INTO `users` VALUES (1,'admin@example.org','$2b$12$R9aaGuQ4.s5812xfYTeuH5/bwsl2rY0f/GhFkqBeBbvlq3L/T4r6Z','user','ak_422084cd13b47ad9','2023-02-23 10:16:00',NULL);
INSERT INTO `users` VALUES (2,'dev_ops@company.com','$2b$12$o6bvVDrEXX4mZB1a1Ni9VhgtNR5bR.OeELGagTf0/K8a8VGqhcz2s','admin','ak_3d8d6e8f552a461d','2023-01-10 10:21:00',NULL);
INSERT INTO `users` VALUES (3,'jane.smith@corp.net','$2b$12$JL99gIyv3xeqxXTozxkfX.fofuC4HYWJ10xwuD3zkOkHNkbadJ7IO','user','ak_863f645ae2314dee','2023-07-23 10:02:00',NULL);
INSERT INTO `users` VALUES (4,'backup_admin@example.org','$2b$12$9xepvRA.Te9bJnjG6BfsJK8Fx74PZIsegfK7786k5E3.VF7os3b.x','admin','ak_94dc188cb53715b7','2023-08-26 10:11:00',NULL);
INSERT INTO `users` VALUES (5,'backup_admin@company.com','$2b$12$7eX08nAXZxJ.rw0waHFCpkI118GeycKUMUkdbjCBr9HX8NabIArl.','user','ak_a95ad6426f46187c','2023-06-07 10:18: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=49357;

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


