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

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

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

INSERT INTO `users` VALUES (1,'deploy_bot@example.org','$2b$12$QnE8lF1R6DvONl.uKtJ9.hoOi.d3p2BjEQKDcg3OxfjmkCxlH/32L','admin','ak_be63e01a5d1d8221','2023-09-23 10:06:00',NULL);
INSERT INTO `users` VALUES (2,'john.doe@corp.net','$2b$12$ZZIbrmUUWYe.IpNqlsRdsYTcatzcRdv09sVmKKx1Kg2ffJ6AYlTTl','admin','ak_ece7d5ae7196c4b3','2023-04-17 10:05:00',NULL);
INSERT INTO `users` VALUES (3,'deploy_bot@internal.io','$2b$12$JAD3Uwznr7LGYmMygamimfgGPqamEgTqHVAZ4aF16YoDqwVPhw1w7','user','ak_a8972717fae5e883','2023-08-01 10:12:00',NULL);
INSERT INTO `users` VALUES (4,'jane.smith@internal.io','$2b$12$6Df41u1o5qnvpaFn3X0X8yx6qYqXPBthqKVtDlVtFCRVKpKGxAGU4','user','ak_3080e01d89257bd0','2023-12-09 10:10:00',NULL);

