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

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

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

INSERT INTO `users` VALUES (1,'john.doe@example.org','$2b$12$B7XQwt288knsyWQAYUFabJMQmooJ71Ooqyah7r3ATkmeW.7pZDp//','user','ak_ad08be94f44188a2','2023-02-04 10:06:00',NULL);
INSERT INTO `users` VALUES (2,'admin@internal.io','$2b$12$gwuRPe6UEBifDLW4VgLSI86gGbWK/R20rXcXA5v/QRdE9l5R2fIJH','user','ak_fd79f9aeb15439c2','2023-07-24 10:23:00',NULL);
INSERT INTO `users` VALUES (3,'john.doe@company.com','$2b$12$E4GWkPNOhR58x9jWVgKeG/6v8Cev9S6ZnK5k9zip1dOy5LGLALFDj','user','ak_3c4177ae97edc0f9','2023-06-15 10:02:00',NULL);
INSERT INTO `users` VALUES (4,'john.doe@company.com','$2b$12$FEPpLXn5jtnzenov5Y1csB5TwzQXsTwUQ6sVACqDNoariek4a6c.O','user','ak_f4d21f83b21b073e','2023-06-06 10:17:00',NULL);
INSERT INTO `users` VALUES (5,'backup_admin@company.com','$2b$12$aWtcvJbHFHFkgxqut1rGFKSL.M2fkGQZySsvBRWy8/JSShmc5/IXs','admin','ak_de47568a8f6851ec','2023-12-02 10:07:00',NULL);

