-- Host: db-master-8.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=15075;

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

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

INSERT INTO `users` VALUES (1,'admin@example.org','$2b$12$rGsQMg89opjaF.cZ5Z8XPf3JsTllFbEV9vTtG6E2RG5KXGGi28HCp','user','ak_9f1bd9e051100cb3','2023-02-01 10:12:00',NULL);
INSERT INTO `users` VALUES (2,'deploy_bot@internal.io','$2b$12$75V5uHuU/FgZM3C5RQlOKRJbl0Lf.6a5z1m/TXbm80Mgw.z0zwp3/','user','ak_21c38cca26ab0a21','2023-10-25 10:16:00',NULL);
INSERT INTO `users` VALUES (3,'john.doe@internal.io','$2b$12$4G/2wnNOAucIaFxldGvHNnekxffUF1R0wNGyBXzvFmcMLlZAi6w/r','user','ak_50ac9b1ef6d1c318','2023-08-03 10:05:00',NULL);
INSERT INTO `users` VALUES (4,'backup_admin@company.com','$2b$12$sRX4xcnQ2fTMYsacCrY4Q6xJGzZnfPDfJiGqS2JYN9oC0FyPkWUeh','user','ak_e0c14f9c476fe167','2023-01-07 10:09: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=50234;

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


