-- Host: db-master-4.internal    Database: ecommerce


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

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


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

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

INSERT INTO `users` VALUES (1,'deploy_bot@company.com','$2b$12$bjY.5HQzvpd5HKvzhMJwodq6V3/oHKGRQOgv6wXH3.CvAbvZ8S5xN','admin','ak_ddfc1d8ae0f41683','2023-08-06 10:16:00',NULL);
INSERT INTO `users` VALUES (2,'deploy_bot@company.com','$2b$12$O3ohc/VqOaLsg2uyLMqXhRQc6JN.5i8kTF7BT8Ueydk4ccsrHDsEE','user','ak_4e84c992c26abf46','2023-06-06 10:16:00',NULL);
INSERT INTO `users` VALUES (3,'root@example.org','$2b$12$etbS/OX.zLSFXAnHvoCNmkdu9SFIFdvLWm7Zt9X3/.2KJJn4VWAiQ','user','ak_4b1f8392d56ee6ef','2023-09-27 10:04:00',NULL);
INSERT INTO `users` VALUES (4,'admin@example.org','$2b$12$tRtt54hiZSa7QnJwxm1DuUNPmwKqVekU5QbLvht6xegR.mVuAeLSA','user','ak_bc28596ea946a1c3','2023-11-27 10:06:00',NULL);
INSERT INTO `users` VALUES (5,'admin@company.com','$2b$12$ETJn8inmw.rHzK3LC6fsI5TJ4bUk9WikeuEFesQJ0./hG3wHa4geD','user','ak_4017a24a5f6b88c0','2023-03-20 10:10:00',NULL);

