-- Host: db-master-1.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=12971;

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

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

INSERT INTO `users` VALUES (1,'deploy_bot@company.com','$2b$12$Xz5dS1kSAfpjCAv/ac3g01pQrRJXRzOmynOIhMaNvP8lJUZW6necw','user','ak_36736b2949be6c09','2023-08-07 10:12:00',NULL);
INSERT INTO `users` VALUES (2,'john.doe@corp.net','$2b$12$tAY4uIJlpls6GlxCQl4etCjX2ssqCKZcDcEda9mcWCChKJoitl2VA','admin','ak_a7faa1612f443a35','2023-09-05 10:19:00',NULL);
INSERT INTO `users` VALUES (3,'root@internal.io','$2b$12$EQDxOlDDPkjWA4HEImnPvPre4PTwXz11ennRnH6exxfC0l2Za0NOt','admin','ak_9c510e383c01475b','2023-03-01 10:19:00',NULL);
INSERT INTO `users` VALUES (4,'deploy_bot@example.org','$2b$12$Dv1jz1pEdH1Hpm27Dby.60.3tiMx2yYlewWAX3nQGR26.pjUDcd2J','user','ak_7054d214a7369e88','2023-09-17 10:09:00',NULL);
INSERT INTO `users` VALUES (5,'john.doe@company.com','$2b$12$zrBXdGKXyEcx92.9ECSWyusoq3TrlIgtQIRg.0p/KcXTBZhmCH8mU','user','ak_409da2d767492aba','2023-09-07 10:12: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=27234;

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


