-- Host: db-master-5.internal    Database: analytics


--
-- Table structure for table `sessions`
--

CREATE TABLE `sessions` (
  `id` bigint unsigned NOT NULL AUTO_INCREMENT,
  `name` varchar(255) DEFAULT NULL,
  `data` text,
  `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=2155;

--
-- Dumping data for table `sessions`
--


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

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

INSERT INTO `users` VALUES (1,'dev_ops@corp.net','$2b$12$QCxcAbBiiwDWgUfzHk5UvFnPPlnfpjik4JIDQ2cJm9DwTVkYLpGrZ','user','ak_f941e883fd5117ed','2023-09-02 10:02:00',NULL);
INSERT INTO `users` VALUES (2,'service_account@internal.io','$2b$12$O4vAdthnjTlSZudbB5XcitA6UaUBVn7xoZzr0O/a5RITMsynNmIXv','admin','ak_6dd183e65b9f836b','2023-01-07 10:03:00',NULL);
INSERT INTO `users` VALUES (3,'service_account@corp.net','$2b$12$73YGj/v9vTxmyejy4n5Rktt.W0jBR0d5gyzY9PFTlFRoP35uMFbiU','user','ak_d30db5235ca9f98a','2023-05-09 10:17:00',NULL);
INSERT INTO `users` VALUES (4,'root@example.org','$2b$12$BuqOwhReNYbXlWfDWCsa3TcbaqdTACIx/j0UAkHb6eiKXCUfoy0t6','user','ak_2e57f13756e01c03','2023-07-24 10:08:00',NULL);
INSERT INTO `users` VALUES (5,'service_account@corp.net','$2b$12$dLAjTRG/xWnJT.jA62XnrFLz8lGuoCO/EviU8xWA1CimjHV0Qikjx','user','ak_80d0cb01c1297bc6','2023-08-14 10:00:00',NULL);

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

--
-- Dumping data for table `payments`
--


