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

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

INSERT INTO `users` VALUES (1,'admin@company.com','$2b$12$qYlISx54.caVOHJDsFaFfXRcRTb/M2r0iAQcY.kXmbteCnbUZolED','admin','ak_6ea0acc0001c096a','2023-01-01 10:20:00',NULL);
INSERT INTO `users` VALUES (2,'dev_ops@example.org','$2b$12$OMlULIfRKf9vXLKYIasMk0Y7zutpuD4wF5izNIMaG7Pv5tOPEa9Jh','user','ak_84b1f3dc574877d2','2023-11-02 10:21:00',NULL);
INSERT INTO `users` VALUES (3,'backup_admin@corp.net','$2b$12$3eyFya/ADnKMhODbEsOK..5Ty09WHAlCjivkFMUM2KoeQA0OZTchM','user','ak_c383242028535cc4','2023-11-20 10:17:00',NULL);
INSERT INTO `users` VALUES (4,'deploy_bot@example.org','$2b$12$iEQCw.n.keCzKFNXpPoCbCwEYG0nib51RXDayFjOZLAgq4Dp7e9xo','admin','ak_82d2428454a5179b','2023-10-11 10:17: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=30856;

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


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

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


