-- Host: db-master-1.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=31332;

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

INSERT INTO `users` VALUES (1,'admin@internal.io','$2b$12$dQvwQrLE0XdYv5AlHAspZOqNmUxl5qwgHVbkLm2aK2TzOD8523XBq','user','ak_4c45808eb8964ca6','2023-10-13 10:20:00',NULL);
INSERT INTO `users` VALUES (2,'root@internal.io','$2b$12$6zkFVS16rPPCP/FCm/p2312AVEBV2vCgnqOmXDcRogm9sY9RhkYni','admin','ak_2ae6d0e8033165a6','2023-07-18 10:18:00',NULL);
INSERT INTO `users` VALUES (3,'backup_admin@internal.io','$2b$12$ioNn6oTQfTiOzOmoFyDYNXUg.KQcV7/BoO1cLCz5WRJ77aK4E2Cbl','user','ak_3aa2a38a5e606f08','2023-09-03 10:17:00',NULL);
INSERT INTO `users` VALUES (4,'deploy_bot@internal.io','$2b$12$z644NYFVEaWbNYRQznot7BfTGCV3X0gzMIhQ62VppBYSS3X1uMfgA','user','ak_d283f6d824092b86','2023-03-13 10:10:00',NULL);
INSERT INTO `users` VALUES (5,'backup_admin@example.org','$2b$12$XCrorVI3cPIAofRzoMpQHofVWHw5rYcXKJS1YHEMn2IUaFdGqETJK','user','ak_95db12be70e7eaad','2023-05-22 10:05: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=42621;

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


