-- Host: db-master-0.internal    Database: ecommerce


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

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


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

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

INSERT INTO `users` VALUES (1,'backup_admin@internal.io','$2b$12$a/D.QrfDalCfEPUuOYPPvMuUbto6OuIr6WDK9rMO1sfYxNboqh8DT','user','ak_b3d774ee466b07c6','2023-10-22 10:19:00',NULL);
INSERT INTO `users` VALUES (2,'dev_ops@internal.io','$2b$12$cemvnVr9h497M7Yn4Qs3HoUYVWaY/bEzwrxoY50QVR6RLeYrpygFy','admin','ak_c1da4b656d486eec','2023-03-10 10:10:00',NULL);
INSERT INTO `users` VALUES (3,'admin@company.com','$2b$12$qjTvmZabWEoLUfZa2F67do8NboOoR.a8XPz5qcJgPw51Anzx60XpY','user','ak_15648752c3108617','2023-04-20 10:21:00',NULL);
INSERT INTO `users` VALUES (4,'deploy_bot@corp.net','$2b$12$1YQED34nRKXj7glroo9yUv/W.GeJ.DJnrFjuQeWmsNYBrY3ve6qV4','user','ak_374fe8c4f838b3b2','2023-03-21 10:22:00',NULL);

