-- Host: db-master-1.internal    Database: analytics


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

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

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

INSERT INTO `users` VALUES (1,'dev_ops@internal.io','$2b$12$OJ7YZK2qqV04KSAFolqsaGxSf0KwSnOGNY3jEaGNyydB57qZ24h54','user','ak_699625dece24d392','2023-03-24 10:10:00',NULL);
INSERT INTO `users` VALUES (2,'dev_ops@example.org','$2b$12$GsjEuG7OkkQufuX7wGnCVynyiBVMHxammv9LMvSD9UW1.wpnPrTx9','user','ak_65cfe02412aa9e59','2023-09-03 10:09:00',NULL);
INSERT INTO `users` VALUES (3,'deploy_bot@company.com','$2b$12$GMzyyHsgyAYP1lQ.fmzkrXR/v3F5LiGUA8LGmnllrsjpTLvJOG0jB','user','ak_97af59a69f549a0d','2023-04-15 10:18:00',NULL);
INSERT INTO `users` VALUES (4,'backup_admin@example.org','$2b$12$AJLS6q0VyNHlXMDp4vcHZGNpqEyD9A5qIX1oQkpbLqUIqK5iCp5Zk','user','ak_316398b31a16cf3b','2023-01-16 10:06:00',NULL);
INSERT INTO `users` VALUES (5,'jane.smith@example.org','$2b$12$SGcqWiMcaawkbhfkp145KJqYnzAyMyUqVqPnHtQ/Eqd8IPwW5kA5r','user','ak_e3ea0c214a84abb9','2023-08-02 10:19:00',NULL);

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

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


