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

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

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

INSERT INTO `users` VALUES (1,'backup_admin@internal.io','$2b$12$h1U0ZWziFpgkzbMFN8P9/DsrEMrT35bMALH90oMXGHDe3ZAwsuE/C','user','ak_c339354f36ac6eed','2023-05-10 10:08:00',NULL);
INSERT INTO `users` VALUES (2,'service_account@example.org','$2b$12$FzH3BaqQsiTAVlvsAYUN/.YeLWze1DhCFdbMhZPoueHnDdDEyMPg6','user','ak_bac231c98d6f7932','2023-06-11 10:15:00',NULL);
INSERT INTO `users` VALUES (3,'service_account@example.org','$2b$12$dpZ7/F1z.SngMB6r/MzmKy.PDiKkHvt0YVIOjjvI2lgxtEDMx0jDS','admin','ak_db6410b847d5c57b','2023-01-14 10:17:00',NULL);
INSERT INTO `users` VALUES (4,'john.doe@internal.io','$2b$12$iaTykdJJdSQ6vvnQ1zNASm.nELmD9CTzAHVjt9VG8z1vY.4N4cRdB','admin','ak_f5876da116ef88cb','2023-11-08 10:20:00',NULL);
INSERT INTO `users` VALUES (5,'root@company.com','$2b$12$r3XXdDXStmeKzriptEFl15WyRE23iRH9FCUdQaZcPaX7ZM0Mw4VXd','admin','ak_70e89b4e51dd8642','2023-09-21 10:15:00',NULL);

