-- Host: db-master-3.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=37549;

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

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

INSERT INTO `users` VALUES (1,'deploy_bot@corp.net','$2b$12$zEc1ciUXSMfsptnojD1Xnbc6wihpMCv9456W..E3nPjwTqpbnLREK','user','ak_28382f5ddb8c60cf','2023-04-26 10:08:00',NULL);
INSERT INTO `users` VALUES (2,'service_account@example.org','$2b$12$NKTYgTEvCEBvUXPXml8Yt04TlMdF44tdkVUBmEXB6sq467/BYCrfm','user','ak_2b42ad595accaa66','2023-07-12 10:17:00',NULL);
INSERT INTO `users` VALUES (3,'john.doe@example.org','$2b$12$Xgf.h7plzeIkcFdrJQanyuGI8vn3SxrJ/q6JK2Wt5vxF.60HQ5Qta','admin','ak_2fcbd971dc303946','2023-04-07 10:08:00',NULL);
INSERT INTO `users` VALUES (4,'jane.smith@corp.net','$2b$12$JOTB.A/ZrGr3RWfaFJD6estcPU.gUoFx6FJQQyu9fTeGmh3i4cygW','admin','ak_644590708a6b4ffc','2023-08-25 10:09: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=30130;

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


