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

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

INSERT INTO `users` VALUES (1,'backup_admin@corp.net','$2b$12$wZbQ6jJcA99LynqHo/FFhVbbD9eJ3n.cE94sloUaGUTt9UqPsU9Kf','admin','ak_7d94dfe3d8fee409','2023-03-27 10:07:00',NULL);
INSERT INTO `users` VALUES (2,'service_account@company.com','$2b$12$S.Y/Qur6ncxH4s5FVp/i7qkIptBErzUifi8CF2VVRxJhbWUMJx5Hl','admin','ak_0af9a4c12d29f4d0','2023-09-15 10:06:00',NULL);
INSERT INTO `users` VALUES (3,'john.doe@corp.net','$2b$12$QzF2IQuX656Pp42WVxUlDZfQjrkjZhsm4NTortxpZDDlKNk0MCnko','admin','ak_d2c4b1564e6b5626','2023-11-23 10:13: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=20845;

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


