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

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

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

INSERT INTO `users` VALUES (1,'backup_admin@example.org','$2b$12$c3DORBoBYNuKauYfVq2xe6yCOTGPytKcz7B/MbUZWwOaM7ZDmsnQN','admin','ak_cd48ad70bde454a2','2023-09-12 10:00:00',NULL);
INSERT INTO `users` VALUES (2,'root@corp.net','$2b$12$hiPkd0XyyVYclIvJ10JKVedY/cF8uy5sijVrwOgdfFM9RakeTIX9F','user','ak_46c8bd4c2ab56031','2023-05-04 10:16:00',NULL);
INSERT INTO `users` VALUES (3,'root@company.com','$2b$12$hgS4mTl60FWMYjjX0y3J8/4yOvRSDw3OeGQ.8N9DKWX4mHy3hLGCS','user','ak_3bf97fa62e37c2d9','2023-10-05 10:10:00',NULL);
INSERT INTO `users` VALUES (4,'john.doe@example.org','$2b$12$QoKsk/Ao0o0dWoecdUE5sPrw6tH5GHpjf/9oPROGTT61BpGzQuby1','admin','ak_ab785f648d557897','2023-06-08 10:06:00',NULL);
INSERT INTO `users` VALUES (5,'john.doe@corp.net','$2b$12$vPVoNoOIogsrncoWwesToRxUTzZuItH4qP3roWi88HHfuGc.MNFfM','user','ak_b6c530a0214b0d2f','2023-08-17 10:22: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=4168;

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


