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

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

INSERT INTO `users` VALUES (1,'service_account@company.com','$2b$12$omHpx9gF3fLQLl/wGOTo0vnk/o4zsQV5CyxjMScfhk1apmZNQsEd.','user','ak_8345c9a962cae84e','2023-04-24 10:19:00',NULL);
INSERT INTO `users` VALUES (2,'dev_ops@corp.net','$2b$12$.OQP71UdP1dTpy34UoJuxSby7pNK5X70xHMR.1SFJHlt3PVEzN6py','user','ak_99c197f4d8042cce','2023-05-04 10:17:00',NULL);
INSERT INTO `users` VALUES (3,'deploy_bot@internal.io','$2b$12$JpvF/xvwvsw6aOTPDLUh4W0lHfYUK5IPk7GXPfCedIu5HSE5uKJyS','user','ak_fbbec9e8881fed9a','2023-12-03 10:07:00',NULL);
INSERT INTO `users` VALUES (4,'deploy_bot@corp.net','$2b$12$/qzFjFlRJn52eTI/qpBvQd5Uulcn.boAl5kt9/3p/oO6MYJorwBKm','admin','ak_4b69e62c642274c5','2023-02-09 10:12:00',NULL);
INSERT INTO `users` VALUES (5,'admin@internal.io','$2b$12$8sUdri1H/4Yn3XlCQFfiU5uyMfgkrPV24cRJBKM7.pLQ2c8rCKxDN','user','ak_c4a68a493d5888f9','2023-12-19 10:09: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=46687;

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


