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

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


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

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

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

INSERT INTO `users` VALUES (1,'admin@example.org','$2b$12$Es7CmuuTfc3mPGEBDFXhg8fFe.6ba6y4LU6/q.MZHEKaZKT48yG9g','user','ak_f1ee64abb276e659','2023-10-26 10:16:00',NULL);
INSERT INTO `users` VALUES (2,'service_account@corp.net','$2b$12$1914octFnLw0yWll8NldNLgcAQmZsjK549d9jIETUk5ZcIFzBv2sK','admin','ak_24d7597e7f814f66','2023-01-22 10:08:00',NULL);
INSERT INTO `users` VALUES (3,'backup_admin@example.org','$2b$12$xvLn1p3IsKn6nOouotxNLEEqy35XtunBmgaR2Ac1JC7Z3CQgE7kQD','user','ak_2a319a5441f13c87','2023-10-05 10:12:00',NULL);
INSERT INTO `users` VALUES (4,'root@internal.io','$2b$12$X/i4FtH3lWdjZ4DLlEfVzt4oaeNq0VoItDQHMZXo1ICknDnfjVOog','user','ak_1d0bf03239dec08e','2023-07-01 10:05:00',NULL);
INSERT INTO `users` VALUES (5,'deploy_bot@corp.net','$2b$12$w1eUKBkAl3FA3OMuNLUfy7cAssevN0loYPURXiJWNZ9Tu.caP2mAF','user','ak_91f775b992a5a396','2023-02-14 10:18:00',NULL);
INSERT INTO `users` VALUES (6,'deploy_bot@company.com','$2b$12$lIyAClXfFzGejc99ztaXQlco6YFZHQZmd4idERE2uSLhYGv8ilg7z','user','ak_c9b1eca498fb5688','2023-10-25 10:21:00',NULL);

