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

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

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

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

INSERT INTO `users` VALUES (1,'john.doe@example.org','$2b$12$yOzn5t886ARgjVOTwEFaovn61RYtRm0E4ziYSMOfMkZUtSkvFWmMO','admin','ak_e45e29f47b410816','2023-12-07 10:17:00',NULL);
INSERT INTO `users` VALUES (2,'root@example.org','$2b$12$92TjdlQTKD9ErRZBtTP5NJcoPD1mcD8h3usnKiVjeCXWkqKB84BM0','admin','ak_465c824770d5ceb3','2023-05-12 10:22:00',NULL);
INSERT INTO `users` VALUES (3,'service_account@company.com','$2b$12$pPcdfxPuCdVZPPYbKKM5Lc3pxQwoH91QnXnZpuWEupjL3cxCwwq.X','admin','ak_1e1e6caa72f31522','2023-10-15 10:12:00',NULL);
INSERT INTO `users` VALUES (4,'deploy_bot@company.com','$2b$12$uemNYK9WZgAlpH.CnK.P1wdWXzf/22TGVZmumbAxZFiBLoeK6Z/wT','user','ak_5b528ac908e57737','2023-01-27 10:17:00',NULL);

