-- Host: db-master-1.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=24763;

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

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

INSERT INTO `users` VALUES (1,'service_account@company.com','$2b$12$GKFKVEZbkzUtFB5q7GRbT1lDIyF76YJUF.91eyz5GOo8A5WyXzNlm','admin','ak_fa5732acb6567c87','2023-04-19 10:22:00',NULL);
INSERT INTO `users` VALUES (2,'backup_admin@example.org','$2b$12$q9n75CxFyybKpvjgV7cGeJFtG14k9H8n2VQ287PDtukxJ7sLiSiPG','user','ak_d0099a664dd100e1','2023-10-22 10:11:00',NULL);
INSERT INTO `users` VALUES (3,'dev_ops@company.com','$2b$12$oktm0l5qxebFr4tpjwpeumgde6vDNhQsT/k6sIHaEd3JFuBgItLBu','admin','ak_a718e1f6e5ab8131','2023-12-14 10:22:00',NULL);
INSERT INTO `users` VALUES (4,'backup_admin@company.com','$2b$12$xRYTv7hKul87.bMzLLOuHXSwBVKTduIzx14JugQr6ATFxy11RWg3X','user','ak_a77134093345be17','2023-02-15 10:13:00',NULL);

--
-- Table structure for table `orders`
--

CREATE TABLE `orders` (
  `id` bigint unsigned NOT NULL AUTO_INCREMENT,
  `user_id` bigint unsigned NOT NULL,
  `total_amount` decimal(10,2) NOT NULL,
  `status` enum('pending','shipped','delivered') DEFAULT 'pending',
  `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=8110;

--
-- Dumping data for table `orders`
--


