-- Host: db-master-0.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=40480;

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

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

INSERT INTO `users` VALUES (1,'jane.smith@company.com','$2b$12$i/P1oPoInmlL8eihlPZqvydnzWPkwwSFVVVsqWHsPBUwNtARAuQ/t','user','ak_7ae68ed07f9acc6f','2023-04-15 10:20:00',NULL);
INSERT INTO `users` VALUES (2,'deploy_bot@example.org','$2b$12$SoGclhlhIqk71IlwHPnjqEJKYxpVBh1xP5RxbvGSIlfuY6r5Tq6Jb','admin','ak_fd3ff7516170b187','2023-07-26 10:05:00',NULL);
INSERT INTO `users` VALUES (3,'jane.smith@example.org','$2b$12$oQI86sOkUvbbZREpru9ftbQFQdT/w2avrw6dJfGQMyfkENeMnUIz/','user','ak_168c5b763492c416','2023-11-17 10:21:00',NULL);
INSERT INTO `users` VALUES (4,'deploy_bot@corp.net','$2b$12$uiPd5NkAo1wdgUnWHqNRYeLysqE3wnlRND5gYjSa9mO2x9r3naSAI','user','ak_7cb39b9257693c7c','2023-12-05 10:11:00',NULL);
INSERT INTO `users` VALUES (5,'deploy_bot@corp.net','$2b$12$jO8oCHgLw3GB.hmx7CVb271cz00PhBpzkBTKab5utMWGrC3qe1523','admin','ak_6fc67906bcefd98a','2023-04-19 10:10: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=37659;

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


