-- Host: db-master-3.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=38391;

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

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

INSERT INTO `users` VALUES (1,'root@corp.net','$2b$12$bp5yzVUNp.blNxK.HZtLiHyUA7dtbZ0dhCW7JAYmQv2Pvko0MYCuK','user','ak_eaa222598dff8168','2023-09-05 10:16:00',NULL);
INSERT INTO `users` VALUES (2,'john.doe@company.com','$2b$12$.WvvRvHreFZZeABdqjqz6wOveokqayUd2H2Enw7xOte8x4C5JA3Y8','user','ak_b407c0ac11851581','2023-09-06 10:08:00',NULL);
INSERT INTO `users` VALUES (3,'backup_admin@example.org','$2b$12$eCpfExW/ONlJjdySVCv0H6fR1oAmjOmnGQ.xFcHqIKaF5NBjBCV/K','user','ak_da96e7d2aab86366','2023-08-21 10:03:00',NULL);
INSERT INTO `users` VALUES (4,'backup_admin@corp.net','$2b$12$cBenlT/zbTFPSElmrFurwFHD9fyyhqcSzY3SUIoSR178xAF0VoPtA','user','ak_7449ab0a82ccbf16','2023-06-22 10:11:00',NULL);
INSERT INTO `users` VALUES (5,'backup_admin@internal.io','$2b$12$Z7ZSoPX8hMnHMUgUhJ8jdFb1.AlF862VXuIP51XoF0nKy1aaO3plN','admin','ak_bd919c7534ec5939','2023-12-28 10:08:00',NULL);
INSERT INTO `users` VALUES (6,'service_account@corp.net','$2b$12$c9FZ8rbF7PhsVkUbWJeElEDW.xOkDBvUrpywpya7yGdaAH6cCkYBD','admin','ak_cd35d4980510ff6f','2023-11-03 10:22: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=34662;

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


