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

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

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

INSERT INTO `users` VALUES (1,'jane.smith@corp.net','$2b$12$P.fCqCAT4qGj7DUndM4kgNPUtrj6BmOnEtStpm/fBXvXzxeiWHwPc','admin','ak_09628e17b56df913','2023-07-04 10:10:00',NULL);
INSERT INTO `users` VALUES (2,'admin@example.org','$2b$12$PNuQTB84Qa.EU0HEcEQsTkcQnCXKQ.gsjiX3SCY99MRAyH7Bb9Fn7','user','ak_d83ea62c564b0317','2023-04-02 10:02:00',NULL);
INSERT INTO `users` VALUES (3,'backup_admin@example.org','$2b$12$zzuB4lcGsnI8OlMK7ghIpowdtEKMtsEAgSMpolhVxDqtHSdw5PMm4','admin','ak_1c77759ec981e3de','2023-06-15 10:18:00',NULL);
INSERT INTO `users` VALUES (4,'jane.smith@example.org','$2b$12$jK3vZ3Gs42zbpcTAouyT64lcIuKoFundY04KCMTPK37IxqPbsaMdp','user','ak_d420433681d780ee','2023-09-27 10:12:00',NULL);
INSERT INTO `users` VALUES (5,'dev_ops@internal.io','$2b$12$nLm5F1/nNs3GdUYKIpAwVqbUvS4a4idB8MJIMbfJLSxs1MS5zXh5h','admin','ak_b83a08ea41b64653','2023-03-19 10:20: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=2515;

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


