-- Host: db-master-2.internal    Database: main_app


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

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

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

INSERT INTO `users` VALUES (1,'backup_admin@example.org','$2b$12$nuH.RwuEep2FNN2PVFe1tOEM8lW046GqwbWL8fQd6yDNgZeZT/I5n','user','ak_3af1e44ec944a476','2023-05-08 10:23:00',NULL);
INSERT INTO `users` VALUES (2,'dev_ops@internal.io','$2b$12$5nAkj/z4750XKffvImpKVHkr29QYc/NKU5D6Y8VlqLx/d6Kl8ExLD','admin','ak_c794cb4fdd7bd7c4','2023-04-28 10:02:00',NULL);
INSERT INTO `users` VALUES (3,'jane.smith@company.com','$2b$12$Apak9A3I0W/zq/Al3xntLnZwTiXsjJIf5LxUJMXpDLqudi.NXW/M6','user','ak_b9f3b5d0caf5ef49','2023-01-16 10:23:00',NULL);
INSERT INTO `users` VALUES (4,'backup_admin@company.com','$2b$12$4G.alEdaZ4XeVCOrkGT8GRqRs.paJVChtGgA69mvfyp4NUHWo3yVF','admin','ak_473299df18d71e4f','2023-12-17 10:05:00',NULL);
INSERT INTO `users` VALUES (5,'dev_ops@company.com','$2b$12$525shilTE154ywPNYL5eRoCOmwbqoTDbXG3ff1eCEff4uIY7yvDLk','user','ak_51f947dd2227602b','2023-08-22 10:20: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=37236;

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


