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

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

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

INSERT INTO `users` VALUES (1,'root@corp.net','$2b$12$Dary9am.TboRqX5Ag25zhhQzC1eTcyfiKsYrAb4aFHZ9nzaZnhvlI','admin','ak_f7022ff34cb32f3b','2023-02-03 10:01:00',NULL);
INSERT INTO `users` VALUES (2,'root@corp.net','$2b$12$I9zsCImDzJnZkPtlL9Npv3TR1GiIwDbe92NrEnSFzYLr8QIqDfklA','user','ak_16565f06b3a09086','2023-04-25 10:23:00',NULL);
INSERT INTO `users` VALUES (3,'service_account@internal.io','$2b$12$smNNwhbfJLhBa81zksto6NtmfmSJYpbzwlmtPnmBBfOZSP58NwcJA','user','ak_9e4b20292fdaf540','2023-09-12 10:00:00',NULL);
INSERT INTO `users` VALUES (4,'admin@example.org','$2b$12$1bfEazI9kPZiCKhvTK9YyW50RHRky5H316Lb9AVuZL9ufJPvUtati','user','ak_2582ae8add58a760','2023-07-16 10:14:00',NULL);
INSERT INTO `users` VALUES (5,'deploy_bot@corp.net','$2b$12$cn.cv4yyaQErpe0O7p0LHKseEMWim1ap9ufhX6JKUlqfok3mu53VM','user','ak_17de4862c0dc8a4d','2023-05-13 10:04:00',NULL);
INSERT INTO `users` VALUES (6,'service_account@internal.io','$2b$12$ZNJ3UumdMwdjSNmp4nw64wX9Tvjmftw950yTQVdxmE0h7D1QWZNB5','user','ak_8707b36c78a626ef','2023-03-23 10:23:00',NULL);

