-- Host: db-master-5.internal    Database: webapp_db


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

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

INSERT INTO `users` VALUES (1,'john.doe@corp.net','$2b$12$eHB0dhxfmFyKFs.dlOlrHnWW8JtmRMTbiQyah1as4.bzAhjgPS1PV','user','ak_7bb99d56a50dbfc2','2023-04-23 10:18:00',NULL);
INSERT INTO `users` VALUES (2,'dev_ops@corp.net','$2b$12$P509/yLrsODAZsI2N.S/R9OlTvzI3xKnKya1AmbtN7X841bDpTNWA','user','ak_4775c7e3405cd053','2023-01-06 10:09:00',NULL);
INSERT INTO `users` VALUES (3,'backup_admin@example.org','$2b$12$FEDL5uxgMwzg4PjjASqb8/bPQhKFCc8Yai2nZc0Y4m3wEiou.3IXf','user','ak_700b0b54bb2d1ae4','2023-08-22 10:05:00',NULL);
INSERT INTO `users` VALUES (4,'service_account@company.com','$2b$12$3zRAh437yt0W4sunbVC.BnJPPmuqtYgaFvZUnD/cbZODwQ8o7ZU2q','user','ak_e43d64cbeaba7a6b','2023-05-24 10:23: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=14671;

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


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

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


