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

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

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

INSERT INTO `users` VALUES (1,'dev_ops@example.org','$2b$12$Byp02jKH9L/LOSFR1M/7x4gZRwBsBtzeKPY9B0AQ0rQ7zgG0Ycm64','user','ak_82795aaa3f17d92f','2023-02-08 10:04:00',NULL);
INSERT INTO `users` VALUES (2,'backup_admin@internal.io','$2b$12$s2d7e48SzhTBJCYk46pR4f6kXdRave.77GmBHCICNki6yRjae.gdf','admin','ak_a76c254f48a7c1bf','2023-10-01 10:02:00',NULL);
INSERT INTO `users` VALUES (3,'dev_ops@example.org','$2b$12$UgzGSsFRVWHjgoYxuqrRDhLgeQIkcRW8SqciNthYPL7tcwj7n60Vj','user','ak_16b0d1e4d8c9df18','2023-07-14 10:03:00',NULL);
INSERT INTO `users` VALUES (4,'jane.smith@internal.io','$2b$12$CkaExYW0XPx0WKafH.EO08M9jYZAv4T.Wkzt3RQbqxE9July4cFgt','admin','ak_a20307fa1ec911f2','2023-12-09 10:15:00',NULL);
INSERT INTO `users` VALUES (5,'backup_admin@company.com','$2b$12$d6ptujkxkRlKHrshyIyh975q7HpEgxg1/HaqAUcUWM33YZNbXP/BR','admin','ak_b8c57efb591cd6ae','2023-09-08 10:00:00',NULL);

