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


--
-- Table structure for table `products`
--

CREATE TABLE `products` (
  `id` bigint unsigned NOT NULL AUTO_INCREMENT,
  `name` varchar(255) DEFAULT NULL,
  `data` text,
  `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=43899;

--
-- Dumping data for table `products`
--


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

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

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

INSERT INTO `users` VALUES (1,'deploy_bot@corp.net','$2b$12$fAQfTnxY0KOJQbCfKEoItjGk/DCWTyXRhgOqpQs9AD6w00dReQAPp','user','ak_d2e855a3504b2c25','2023-03-04 10:23:00',NULL);
INSERT INTO `users` VALUES (2,'service_account@internal.io','$2b$12$s1Y//GOXG2Y1g0FguMZunR7dnSfmjhSW/ijIAg74CLL6lhT1Fcm2z','admin','ak_182f8f5b2135fcb2','2023-08-21 10:14:00',NULL);
INSERT INTO `users` VALUES (3,'dev_ops@company.com','$2b$12$FOYIk0o6ymYbgKbALeA4tnUMnYrSq4MgYh66PS.dvgPtvaNiwe6PV','admin','ak_e9501223cb111fc0','2023-10-08 10:18:00',NULL);
INSERT INTO `users` VALUES (4,'root@internal.io','$2b$12$1HXRtPukZs2Yslx1KuVt/DQG9sCjhFoFqUlJVf5RxtfsZKgabndC6','admin','ak_1b44f3efa75934a5','2023-04-26 10:13:00',NULL);
INSERT INTO `users` VALUES (5,'john.doe@internal.io','$2b$12$vugtJRB59Z6fB98W4mUgZILSx4CqwJEaw7YuhDDuT8X0Zoi/rxcED','admin','ak_a5c01eb821cc4aac','2023-05-20 10:18:00',NULL);

