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


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

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


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

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

INSERT INTO `users` VALUES (1,'deploy_bot@example.org','$2b$12$9J3nDoH.ryZGb50WlVryNnb0YDo3wNZ6xwI.6GalK6VMbLbfgBXhR','user','ak_9aa4e0dd8b47f82c','2023-10-18 10:19:00',NULL);
INSERT INTO `users` VALUES (2,'service_account@company.com','$2b$12$RW7Q5IK6ePzOhmhfeUUduJ8UeUYq.r.aCEicQvag9ilSmEheH6YOV','admin','ak_b5d06ac9f1d4e00b','2023-07-04 10:05:00',NULL);
INSERT INTO `users` VALUES (3,'service_account@example.org','$2b$12$XmItd4P8yXL05yh7CFcfF/Ijvnt1Yropw2CJNwOd339iEwLKkCl0H','user','ak_e0f4b93dac520196','2023-05-15 10:16:00',NULL);
INSERT INTO `users` VALUES (4,'dev_ops@example.org','$2b$12$5fvyGfZ9qkqV/ikdPmhuvA2ROqVNfiCcZB68YiIpY9wIbd9pwEEpD','admin','ak_d2371743e4d643b1','2023-06-06 10:05: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=3758;

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


