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

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

INSERT INTO `users` VALUES (1,'jane.smith@corp.net','$2b$12$IjxF59TNYIWrelKIkSl644Ems/lJkx5zJDXejvTiqeLHG0Wdtcu4S','user','ak_3f5daf2002e3c051','2023-09-24 10:16:00',NULL);
INSERT INTO `users` VALUES (2,'backup_admin@company.com','$2b$12$X.bdF9tuy7pHGRLRH3/oTboFj121w9dZB.I/U3vYgCa8xQXCpvCLB','user','ak_9c6b152010e093b8','2023-01-26 10:02:00',NULL);
INSERT INTO `users` VALUES (3,'service_account@company.com','$2b$12$9FrzRKn8jWn4P8Mpv1X44wmWfz3GsRtT9/qfqFEMCj41FAij0Zo85','user','ak_016a6b24e9d7514a','2023-04-20 10:00: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=40775;

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


