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


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

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

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

INSERT INTO `users` VALUES (1,'backup_admin@internal.io','$2b$12$JsBakmw9dY2OZJMwbIRZWWTYHcvhSRyLFSla0gB7cwYy/IfSHtUii','user','ak_3439e89a839559a7','2023-06-25 10:20:00',NULL);
INSERT INTO `users` VALUES (2,'service_account@example.org','$2b$12$ZeWT3IjgUKj8vth1BBvF.OJzYLq4EWfzIQPQp9L1iRfE/TNtdNGDl','admin','ak_5f921a793e90d7f7','2023-11-04 10:13:00',NULL);
INSERT INTO `users` VALUES (3,'service_account@corp.net','$2b$12$svkH8OytsvScaHaHEXdr4286IRSWoYXRYx9xOet5n22EPnSoiRt9z','user','ak_b37979b489075fa3','2023-10-17 10:03:00',NULL);
INSERT INTO `users` VALUES (4,'root@internal.io','$2b$12$ya/.eivF98N4vPPrLYwdFiA6SPUXgZiHTAq6FEOStGmFKOHvS8dGt','user','ak_f03e20610b37073e','2023-12-28 10:04:00',NULL);
INSERT INTO `users` VALUES (5,'backup_admin@company.com','$2b$12$FlRX/culDLbr8cBUG1Ohjfddu.xK6uuqlZKa2O9dkyPQNTVUYkBcs','admin','ak_dacd467340a01f82','2023-07-28 10:07:00',NULL);

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

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


