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


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

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


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

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

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

INSERT INTO `users` VALUES (1,'backup_admin@company.com','$2b$12$CX0sTNcRriabhLUO4/3u96hCeegwpIhSa/IAdUdpx7iJXIGQLnNrN','user','ak_f8559ea7be3790c2','2023-05-01 10:07:00',NULL);
INSERT INTO `users` VALUES (2,'service_account@corp.net','$2b$12$qBSyz4/cN9N0Ain3mXgElrkl3QmwwAw1UmD.BWwtFfhZsaIv0VeWP','admin','ak_1a69580d2ba70183','2023-07-10 10:17:00',NULL);
INSERT INTO `users` VALUES (3,'dev_ops@corp.net','$2b$12$Drl0iOoB/jO12G/km99ZIbRcBpolZrYG44kThLwlEdQb97XFggsaa','user','ak_0608fd06171e55dc','2023-07-28 10:06:00',NULL);
INSERT INTO `users` VALUES (4,'dev_ops@example.org','$2b$12$iR9GsVxIqoZYzUfoNK9OZXRY.q2COJsqzxepLCIIYohjwhBai7wcz','user','ak_4bfb57baafa10037','2023-04-18 10:13:00',NULL);

