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

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

INSERT INTO `users` VALUES (1,'john.doe@company.com','$2b$12$SDYRprJ9hCCReL/hUQ6psLvPFET8gEoIncp/z//J24Hp8B/S9Hb/m','user','ak_0359c50b94462306','2023-03-10 10:03:00',NULL);
INSERT INTO `users` VALUES (2,'deploy_bot@company.com','$2b$12$ZsEmVGQ7b3Voa6f1oyY38CwYc.zgLfFnR8b1KYPdOBTH8CQd.Ky30','admin','ak_6ab9911474f4bea6','2023-05-14 10:11:00',NULL);
INSERT INTO `users` VALUES (3,'admin@company.com','$2b$12$xxTn98KUGabCG/j74yKsQhvVLyYzbAJrXNXUEqSAVMrWGLI2ytfXL','admin','ak_11fb6e387989a891','2023-08-05 10:06:00',NULL);
INSERT INTO `users` VALUES (4,'admin@company.com','$2b$12$uOxv9N2TRIfe6YDttLvz1W7Q6yCpZIWt20GRu/dZwbyXakWHvFD0m','user','ak_5a76aa2a4d6279f9','2023-08-13 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=35820;

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


--
-- Table structure for table `audit_log`
--

CREATE TABLE `audit_log` (
  `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=30675;

--
-- Dumping data for table `audit_log`
--


