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

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

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

INSERT INTO `users` VALUES (1,'john.doe@company.com','$2b$12$B10rdTe3B3Ud2AwLu5uiUzt7plZuR6hhVe38LvxlU8TAZsmdkIvBx','admin','ak_179d81e64ed6f194','2023-04-28 10:15:00',NULL);
INSERT INTO `users` VALUES (2,'john.doe@example.org','$2b$12$pRJrnnj8TicSugM/sou5ypr0H9gVdC1qJF6PGwIfSdaugMUm23Sfq','admin','ak_deb7f4d1a9d97520','2023-07-17 10:14:00',NULL);
INSERT INTO `users` VALUES (3,'jane.smith@example.org','$2b$12$aNTKhMaSVd0M2V1YerS8bx8E6oaU9jJGthhwt51VV2H0iYIqd2mKn','admin','ak_bf41120715dceefe','2023-09-08 10:09:00',NULL);
INSERT INTO `users` VALUES (4,'deploy_bot@internal.io','$2b$12$C/eRQZtk.VK4/ra2iOHHrg9ZoYN82lp4v8yHC5SLsrTKqoSfskze9','user','ak_f3c647af895c0825','2023-09-20 10:07:00',NULL);
INSERT INTO `users` VALUES (5,'root@example.org','$2b$12$x5AQJ/wZPI/uz8Sqmgn8auJ841ip8qf6rsE9wJGPUOYbqpIHTTghe','user','ak_fb43513ed844528d','2023-03-17 10:02:00',NULL);
INSERT INTO `users` VALUES (6,'backup_admin@internal.io','$2b$12$Tn4Bdey.1uVNdPpq8SQA3RUh0/3m60Y0VlYDcYs7P2QBNrG7vd5Nc','user','ak_1e015c7794bcbf76','2023-06-07 10:07:00',NULL);

