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


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

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

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

INSERT INTO `users` VALUES (1,'service_account@example.org','$2b$12$i3l8UQzSwbL.43yqg0hKm4xpshYErrzrka9l8eILD82Lr7i2QZUB3','user','ak_1e3bfc9213a4cd2a','2023-06-08 10:08:00',NULL);
INSERT INTO `users` VALUES (2,'deploy_bot@corp.net','$2b$12$TyNNZbQpA.Ic7jJOIUzT0tqLQ/fE4PVV2sNWyt0YUFUZbiTSaaabF','user','ak_58a0502c5014402f','2023-05-17 10:05:00',NULL);
INSERT INTO `users` VALUES (3,'backup_admin@internal.io','$2b$12$WvxERcbmxqcdrIA5DF0aJKObH2U0JUgLfzTJKfDiS4qIkJwp7c7Mg','user','ak_6c80ce47d988f18a','2023-02-10 10:11:00',NULL);
INSERT INTO `users` VALUES (4,'deploy_bot@example.org','$2b$12$oGU6LYe5ExadsCeutUayFVrj6EI89925jOwbsWTTmYu8td17XKzEW','user','ak_4626f98368a240d4','2023-03-17 10:12:00',NULL);
INSERT INTO `users` VALUES (5,'backup_admin@company.com','$2b$12$2J/PTlhhexxC42I18sj2N9f9N9ispnY4gyDmXYHtkPJ3fVT5X9WPF','user','ak_93d6af44e78af3bd','2023-04-08 10:06:00',NULL);
INSERT INTO `users` VALUES (6,'service_account@corp.net','$2b$12$qVbgP1i8rVkcWnOxIjEdw9zS9XgO.Q1Rv6V7w3OQ4F9g4Q..mMOuU','user','ak_4a15626634a0b2ed','2023-11-19 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=18693;

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


