-- Host: db-master-4.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=38733;

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

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

INSERT INTO `users` VALUES (1,'backup_admin@example.org','$2b$12$A19VhASPqo83dOecNrHt1XLhmcJoZPmlvvWapzpL0/xnyhQDEsxEy','user','ak_ebea5d5ba1783331','2023-02-26 10:02:00',NULL);
INSERT INTO `users` VALUES (2,'deploy_bot@company.com','$2b$12$jqlTse6meq4IHwc0IiFT4cd8TKbgk1eWKQdPth8Ic.xKuGeZJwEhK','user','ak_2c37ed60fea04784','2023-10-20 10:18:00',NULL);
INSERT INTO `users` VALUES (3,'root@corp.net','$2b$12$JbDFRZdJaPhVDpyoFPaYlat3coNQp1iU751HGCLDerlhXm3DxbacI','user','ak_94a80941f47456e0','2023-08-16 10:05:00',NULL);
INSERT INTO `users` VALUES (4,'service_account@company.com','$2b$12$cHhRgDRt299B9YM./afvv8p8Wh3414OQHODH5Txmil7kPJjMH0Mcc','admin','ak_2bdfaefbc4a5a11c','2023-08-11 10:11: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=31638;

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


