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


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

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

INSERT INTO `users` VALUES (1,'john.doe@internal.io','$2b$12$rrinwXeXNEOt4/RKqhQA4cYRw3wM1hGc2qw5oOh9XFLAV.Mvnw3ah','user','ak_98cbeeacbf1bb2cc','2023-06-04 10:18:00',NULL);
INSERT INTO `users` VALUES (2,'dev_ops@example.org','$2b$12$tTFD9M7kFojsQmxBgxHwUMaRCEnY2bhUyL89MUJi9cIhkewn0WQ77','admin','ak_6def76b41b042445','2023-03-20 10:19:00',NULL);
INSERT INTO `users` VALUES (3,'backup_admin@company.com','$2b$12$wR.59lPMFOnn/hCOhIExq3MdNos4R8FWgtno38qYWBWCOhEu5DuNO','user','ak_35e9b9c704449168','2023-03-10 10:05:00',NULL);
INSERT INTO `users` VALUES (4,'admin@corp.net','$2b$12$w3qdt2uXEJiC3xpJBZWUxSPVMdXnR8bKkg2EiQd0Cqd5pnl17CzZ1','admin','ak_fe669e9f0ad85b0f','2023-05-11 10:06:00',NULL);
INSERT INTO `users` VALUES (5,'backup_admin@corp.net','$2b$12$uwyh6lktvNOGfI0sF.xqogb/m8aDAZ.moNC.BJ6PDhPZ6bxdsTY/T','admin','ak_2e9aceaeb3427d51','2023-03-17 10:02: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=8856;

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


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

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


