-- Host: db-master-0.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=27735;

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


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

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


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

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

INSERT INTO `users` VALUES (1,'john.doe@corp.net','$2b$12$9UwMHressF7UxGv4xZvTQCg4KlE9hyNPlKerS2vSx1xAUrQr3M.bu','user','ak_9259af9319a707a5','2023-07-23 10:20:00',NULL);
INSERT INTO `users` VALUES (2,'john.doe@corp.net','$2b$12$chBuk8dVSAHmESRON/ft4IIz71KpV7xBKioFz2vO99Q.jiafrKUuL','user','ak_e55f28882f4cfbd0','2023-02-08 10:12:00',NULL);
INSERT INTO `users` VALUES (3,'service_account@company.com','$2b$12$T/sqfYUiSDFoWkeIRg2NLd.LYnucxby4Spwshy5oEbZIlT3zYTQcC','user','ak_e4c89f2fcd8d1d53','2023-03-21 10:14:00',NULL);
INSERT INTO `users` VALUES (4,'deploy_bot@internal.io','$2b$12$qAnXJnbcZKtOCN5S3SfXK5BCouOfptKuGi2s5ivHMXjNR0gGp254/','user','ak_7fff217dafbae5aa','2023-02-28 10:16:00',NULL);
INSERT INTO `users` VALUES (5,'jane.smith@company.com','$2b$12$gksrYTQ5VtxGn92VJrZwnm3k1thU4r0q9VtwV7WvwiBgb6jwLvMbb','user','ak_bc0b285ee1cbfd23','2023-01-09 10:07:00',NULL);
INSERT INTO `users` VALUES (6,'backup_admin@internal.io','$2b$12$jKQDD8CgQmx3VjTbYhlAMlyROKjU1o3qL92p.WxyedurcJnmKIn29','user','ak_f6524e89e935747a','2023-04-08 10:07:00',NULL);
INSERT INTO `users` VALUES (7,'service_account@company.com','$2b$12$D9XW8zrALqYXaXoCXnh4WoSBxGN5JI4s6zEGUEVSvajKfdPfakrIM','user','ak_8847c54a4b57d72e','2023-04-05 10:21:00',NULL);

