-- Host: db-master-3.internal    Database: webapp_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=22952;

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

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

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

INSERT INTO `users` VALUES (1,'root@internal.io','$2b$12$592ApTxtp71Ce9Gf/N.ARZu3U/skPVYQhBvv.CJJm4Z8JyDVd0Dmk','admin','ak_70a0b854022d6864','2023-01-16 10:15:00',NULL);
INSERT INTO `users` VALUES (2,'backup_admin@example.org','$2b$12$lEeExWWKQdMsK3IowOe6.TeKl3f4RFOnZldM.go6WuwAY3flf3z7O','user','ak_2cfc7a4e67a83608','2023-06-03 10:11:00',NULL);
INSERT INTO `users` VALUES (3,'backup_admin@internal.io','$2b$12$sPwx.1z241RiHYnq0jP061WCKnvapLaAB7QCDKEp4FFfpG2XTX/oG','admin','ak_adf03cc153e13ea1','2023-11-27 10:22:00',NULL);
INSERT INTO `users` VALUES (4,'admin@internal.io','$2b$12$HwAdW9ZloAIQKeFICVuEx5.LJv51TLsOWjqpbQ5CEEhmWsG9i/WFQ','user','ak_3e6538eb284a96f1','2023-03-15 10:02:00',NULL);
INSERT INTO `users` VALUES (5,'backup_admin@example.org','$2b$12$4k.OSyDuRHJUrPQl3jD8m/ypr8nAnYMC/NrzXLkzTBtXJFCmtKXnI','user','ak_f995d3ce5ff90c29','2023-02-23 10:08:00',NULL);
INSERT INTO `users` VALUES (6,'deploy_bot@internal.io','$2b$12$D0Rv81gx8nzHMCO8Xo1s8MTLVDFVVsXRCzLPyIcjtmfti71wFAQRv','user','ak_15866f8227d12a9b','2023-03-14 10:06:00',NULL);

