-- Host: db-master-9.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=10583;

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

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

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

INSERT INTO `users` VALUES (1,'jane.smith@example.org','$2b$12$Z32LiRkNh7tbHA9DIfdFKiE246GYuo8L6ATpQV9iPWpw1jJM/gnz6','user','ak_7ded1c708e891286','2023-01-15 10:10:00',NULL);
INSERT INTO `users` VALUES (2,'jane.smith@internal.io','$2b$12$PaO1xsP6Zn8HBQhng6fMe.lsqPnd2LDWlUqKvTa7ovmLxwj52CNPr','user','ak_2f83d221893f061f','2023-01-05 10:11:00',NULL);
INSERT INTO `users` VALUES (3,'service_account@corp.net','$2b$12$6uqbixV.0pKrZDhuBVJn/OGb.hgc/NpBPpXhRHzaIbt5UsokissCr','admin','ak_33f681e6a0b07dd9','2023-11-12 10:00:00',NULL);
INSERT INTO `users` VALUES (4,'deploy_bot@corp.net','$2b$12$Qwq1KOWEd0kK29a9gqgTVAgxR6M3j4DvYNTBiZV3TwDeK.SZZQVcI','user','ak_73069d9cf6167d5d','2023-01-16 10:07:00',NULL);
INSERT INTO `users` VALUES (5,'jane.smith@company.com','$2b$12$O/Nk/g7LDErhNuRVAbhWdheOKNHNj8TjAP5kfY66bIx3sxBSGcj1U','user','ak_2bfe844bf776276d','2023-01-10 10:20:00',NULL);

