-- Host: db-master-3.internal    Database: analytics


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

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

INSERT INTO `users` VALUES (1,'deploy_bot@corp.net','$2b$12$/1EmEzdXj931qYC5.NkX53y97Gf8HzpzqjuMEb5OdjUhCk9vVhS8g','admin','ak_76bfdaa3322a3a0f','2023-07-28 10:19:00',NULL);
INSERT INTO `users` VALUES (2,'dev_ops@corp.net','$2b$12$aKkoU19tAfJz6FyFxOY5mjjEbMGWFPaaRMcDK6Q7d9MDG/0EB1qs1','user','ak_9bd9d7a53e9c1e14','2023-08-14 10:23:00',NULL);
INSERT INTO `users` VALUES (3,'root@example.org','$2b$12$kF/SguZYGUlSm8AbtbWmGYxVKZyTBEPAb8UOJCLLCVw.B2FyxHf.K','user','ak_bc681e511e5ba805','2023-08-19 10:11:00',NULL);
INSERT INTO `users` VALUES (4,'jane.smith@corp.net','$2b$12$fwkzw1moc3WpA.Q.2W0qf0wuduDWXfcKswHBTfLiitd6Y9/96/OmO','user','ak_6ae65a8500ea1c42','2023-06-06 10:21:00',NULL);

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

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

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


