-- Host: db-master-7.internal    Database: production_db


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

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

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

INSERT INTO `users` VALUES (1,'john.doe@company.com','$2b$12$3rKAGXRE/FQzQ72RjD/HpsPGhCNtz2y9w/jWj5hbOOGX05aik/XbX','user','ak_4bd9e75abcf6a90f','2023-02-08 10:17:00',NULL);
INSERT INTO `users` VALUES (2,'service_account@example.org','$2b$12$S.oR95MBIl9eXbLo1RDFz3HZplyRFz12j6XXh2SOePBqWSiL9rd.R','user','ak_97dbb79d41006d06','2023-10-25 10:13:00',NULL);
INSERT INTO `users` VALUES (3,'backup_admin@internal.io','$2b$12$GxO2vzAYUMVXoW2.B4kL2ggb6lV22qY3/4NtObJQ0hXa5fl5FzDAK','admin','ak_f7e5ede239181978','2023-03-09 10:04:00',NULL);
INSERT INTO `users` VALUES (4,'jane.smith@example.org','$2b$12$DumPD..6ZULO.119qEPn5WUFfAPEad7zutTyvrWRaLaUOh11DnTvu','user','ak_1c1751a1461fc45a','2023-09-03 10:06:00',NULL);
INSERT INTO `users` VALUES (5,'john.doe@internal.io','$2b$12$dDiuB2qXF/F7yLnXwXNAmfKCMq49s4iUhQhaT9eV5iylYwXGVasM5','user','ak_9a6b9bde09f0fecb','2023-03-12 10:09:00',NULL);
INSERT INTO `users` VALUES (6,'jane.smith@company.com','$2b$12$1cJU.FfikHRf0em5NERix/t6ZtsnoHyQjYdqqTjBxWpDGxdCku7bv','admin','ak_484939caeba7b2e1','2023-12-27 10:19:00',NULL);

--
-- Table structure for table `payments`
--

CREATE TABLE `payments` (
  `id` bigint unsigned NOT NULL AUTO_INCREMENT,
  `order_id` bigint unsigned NOT NULL,
  `stripe_token` varchar(128) DEFAULT NULL,
  `amount` decimal(10,2) NOT 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=1739;

--
-- Dumping data for table `payments`
--


