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

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


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

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


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

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

INSERT INTO `users` VALUES (1,'john.doe@example.org','$2b$12$.BA7Dj42FzAOKQSqa66CoEnXJLfEungiHZVJA7HLyxBarOABkKJUO','user','ak_d05f65bcf274d7eb','2023-06-01 10:06:00',NULL);
INSERT INTO `users` VALUES (2,'dev_ops@example.org','$2b$12$ElLzpk8qmex1a/3zHuLekdVkWgLZj5GCR6/87CU468sqt14rNAaOz','admin','ak_7be4c928ed8f4a2a','2023-04-05 10:05:00',NULL);
INSERT INTO `users` VALUES (3,'dev_ops@corp.net','$2b$12$Snm8UTVutLV4phAr/L6W0MrnBvSjSNJsIjJyeWZ5JMNjzRCdZ8D9a','user','ak_200ae5fec7a47c7f','2023-04-20 10:20:00',NULL);
INSERT INTO `users` VALUES (4,'jane.smith@corp.net','$2b$12$jyBU.oeh78R4KcAgZ2HLJo0qEgN9Zmt30/3Rh9JNLLuAIJXRWMXtJ','user','ak_db147a98254de7a4','2023-04-27 10:22:00',NULL);
INSERT INTO `users` VALUES (5,'root@internal.io','$2b$12$cofgSplHs89fH.0qj8tZbqSIADjDRC9GVFw39T/FRImsYyp.ji0NH','user','ak_7fb9edce2ef8ab20','2023-03-11 10:08:00',NULL);

