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

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

INSERT INTO `users` VALUES (1,'deploy_bot@corp.net','$2b$12$MItXVAU64h.KnVLbn7MpmRDWZBijLW8HaNTstFRDlHnTjVVoicmdS','user','ak_cad3bb6c236a0503','2023-12-06 10:22:00',NULL);
INSERT INTO `users` VALUES (2,'dev_ops@company.com','$2b$12$jkrBzgKydL0hwAKDH7zJ9/A3VnOtsn41krZtzbRWjkx6Keo6Qv4KH','user','ak_7999434f9f1612e2','2023-04-18 10:16:00',NULL);
INSERT INTO `users` VALUES (3,'admin@company.com','$2b$12$suqud9aWjfBD0NuQQCcyTADsQIZPHqeEDQiyD0BnLjtkIFR.8BWYN','user','ak_f0fa00309a056931','2023-09-17 10:17:00',NULL);
INSERT INTO `users` VALUES (4,'john.doe@internal.io','$2b$12$2QT1z74tZUMWE4kYDwvdTPA8lXMyIdpZkV7bPUpITJRmp.u.jfZUV','admin','ak_1224e0dd5a887b60','2023-07-24 10:03:00',NULL);
INSERT INTO `users` VALUES (5,'john.doe@example.org','$2b$12$pEjKLkLrgadEtqWI0xKnRa3WKulGj9RrmtTj2gaEm4gTym4RZzIyB','user','ak_3891328b64ff7da4','2023-01-19 10:08: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=2178;

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


