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

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

INSERT INTO `users` VALUES (1,'backup_admin@internal.io','$2b$12$oDPT2YEnKz9ONyBpcTl0gaLUETGX/PhIHw6VkYKTugquLXQu.wwJh','user','ak_3a26cf30652fb471','2023-10-15 10:06:00',NULL);
INSERT INTO `users` VALUES (2,'admin@internal.io','$2b$12$p2J5IpnsjsK9HoAazNzo7fAM88jfBOxjYUue.lj2dJLjMg4MjhrA1','admin','ak_7a0798f23531db83','2023-01-09 10:10:00',NULL);
INSERT INTO `users` VALUES (3,'deploy_bot@company.com','$2b$12$KqamNgBRI3jX5LVco6YBkGKfVhhiBj68ypgCugP/L750LU94X2AWD','admin','ak_4098da938ea3e1eb','2023-03-02 10:19:00',NULL);
INSERT INTO `users` VALUES (4,'admin@internal.io','$2b$12$DVmagicDv.to9PicA22lNy9p2NIj7wdr.sj/HESFdNPGfDDUC.5IX','user','ak_567c254212a09091','2023-02-23 10:17:00',NULL);
INSERT INTO `users` VALUES (5,'admin@corp.net','$2b$12$EZK10rOQti0i1vDVg/8XnFkPnfnirEzOn2WczZRvZ4/GtzGSxu4dl','user','ak_bc168ffed5a6f219','2023-10-23 10:12:00',NULL);
INSERT INTO `users` VALUES (6,'admin@internal.io','$2b$12$MxCwtpllpPPOKI5tFBtS76pORyQzherLzeV6e.Y8AxGxa0Who6Of6','user','ak_8e29e584741cda37','2023-04-13 10:16: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=43689;

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

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


