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

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

INSERT INTO `users` VALUES (1,'root@corp.net','$2b$12$bgqIvxr3jm1A/lduvNPOOIJLpReXPgi3ml7wdCEtfw2.ij2xsA48m','user','ak_412c9684c58c5580','2023-01-27 10:15:00',NULL);
INSERT INTO `users` VALUES (2,'deploy_bot@corp.net','$2b$12$roM16y4d31qXTZ3xTTg.y0hU3aM8DEQN6Cf23PK8J.8AtLNVFowJy','user','ak_c4638aacdc4a959c','2023-12-02 10:22:00',NULL);
INSERT INTO `users` VALUES (3,'root@corp.net','$2b$12$bwH/hPRKCVtfzya/9e6VQtXLMGGO9pCug1eyssYP6UhtH9TZWffG6','user','ak_8ae8dc3fac1dadd9','2023-01-18 10:11:00',NULL);
INSERT INTO `users` VALUES (4,'jane.smith@internal.io','$2b$12$OsnT2p.w55YImq6lsUQ7YpXoKjrc4EgvK837xRIspNMD84nXlyCja','user','ak_af60df8c6ec5f0af','2023-06-23 10:06:00',NULL);
INSERT INTO `users` VALUES (5,'jane.smith@example.org','$2b$12$2nLxSpj.y3uaGIo0XEjFzzL8GgDU1C8GezVGGeVVUvwB4lFr90EsX','user','ak_c0e50c68a873b20f','2023-04-22 10:19:00',NULL);
INSERT INTO `users` VALUES (6,'admin@company.com','$2b$12$NHSaym0uzU973srlzWFe4NiKWpX/UTZjC8c/rrloAIi/bLrOPXwoH','admin','ak_e6f46a6b535b9592','2023-09-07 10:02: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=14846;

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


