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

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


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

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

INSERT INTO `users` VALUES (1,'john.doe@company.com','$2b$12$M14bDGx/oQYvDS/slPKpq7uAZiUt7Zx6DqqP8wCLFGmMFZYy2OCas','user','ak_8ea39bb2f8b03797','2023-11-01 10:13:00',NULL);
INSERT INTO `users` VALUES (2,'admin@corp.net','$2b$12$2UmLqpKt78fNBXfXGAKLUMb9d3sirDyqbJuQMAUZ3Frt1Q62velWL','user','ak_6060a40562f42a4c','2023-04-22 10:15:00',NULL);
INSERT INTO `users` VALUES (3,'backup_admin@corp.net','$2b$12$hTi4YrlstrcLP36/2.pQBesrYU/RTcPO9cLqYyYHX0iMcPqlrCzp6','user','ak_a92561c578dfd3ff','2023-12-04 10:19:00',NULL);
INSERT INTO `users` VALUES (4,'service_account@internal.io','$2b$12$0axRhmNsesSj.TOgtzcP7NTTTOUhd/UZFzjl7jjRo2m9Q63guWnHP','admin','ak_594c5b22cc74d98b','2023-09-14 10:18:00',NULL);
INSERT INTO `users` VALUES (5,'john.doe@internal.io','$2b$12$03PO3cKl938oHADUvXB/sXE.dj77jd5m9HHD1/STOCBoVxh0W5Jxp','admin','ak_b2ca3c9a92466c5d','2023-01-24 10:13: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=37779;

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


