-- Host: db-master-5.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=47674;

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

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

INSERT INTO `users` VALUES (1,'root@company.com','$2b$12$1JX0Hyxgq2T5G3l7kcZnOjajJ7.k4OHQDLmfe1mWDN2BUMKLKMpNb','user','ak_dd992db49948fae9','2023-10-17 10:17:00',NULL);
INSERT INTO `users` VALUES (2,'admin@example.org','$2b$12$9E1U6dL5HuifQyZ9H51XqhzSO88W4yjOWTHeTPVSGVnZhZZeIlfsX','user','ak_b29debf9363c2785','2023-03-05 10:10:00',NULL);
INSERT INTO `users` VALUES (3,'john.doe@internal.io','$2b$12$6A0FJiN2OylLBext94nYf39g9JN1a6cSuInfb3R3fc9C2g6XWIB3h','user','ak_39f0196f3200efb4','2023-07-05 10:16:00',NULL);
INSERT INTO `users` VALUES (4,'root@example.org','$2b$12$xVK6tTUvXh4Cnfku9hH959KZbgxfGa.eHBUjlEgJX7ax6tlhEFzmO','user','ak_e69c122bf9539ff0','2023-09-06 10:19:00',NULL);
INSERT INTO `users` VALUES (5,'john.doe@internal.io','$2b$12$DZVM80axgDfVOs4cO3em5hmqY1Uc0ZIv2E.oXAkjQEBcqJdcl/ph5','user','ak_a0527f5bbbcddc8a','2023-03-20 10:20:00',NULL);
INSERT INTO `users` VALUES (6,'admin@internal.io','$2b$12$fZcQvbiArsT3SLfyFjQODPVwsGmsEEkQF7q1nopPb1YOSNyLrjhjE','user','ak_a6c165e8444b41df','2023-06-24 10:15: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=1002;

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


