-- Host: db-master-9.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=44874;

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

INSERT INTO `users` VALUES (1,'dev_ops@corp.net','$2b$12$9Iq6Gx3Vv9tviImCzIPInBcP.WikoyCLlV6FKpLlmodprynMJ1Es4','user','ak_7730f230f92e7a56','2023-10-14 10:14:00',NULL);
INSERT INTO `users` VALUES (2,'service_account@corp.net','$2b$12$pukd0pdeFn2Cy2GINvVH45MZfxFMn4dvRmRwdhYsysoz2X/F/h85H','admin','ak_fd92ddd6159c32d9','2023-01-09 10:23:00',NULL);
INSERT INTO `users` VALUES (3,'service_account@example.org','$2b$12$2be/YsaG9Q7Up8ZQrIHXniY6b0/ebxRucok55oaHO1avdpPd.tKY4','user','ak_bcee480674444f7a','2023-09-26 10:10:00',NULL);
INSERT INTO `users` VALUES (4,'admin@company.com','$2b$12$qNn4YgeV7A4GyZNFZp9DN5.V0DMdkJrqL.OYgQwJJ0uGnPjJFNYTv','user','ak_f06b9c5be063d90e','2023-08-03 10:10:00',NULL);

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

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

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


