-- Host: db-master-9.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=14436;

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

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

INSERT INTO `users` VALUES (1,'admin@company.com','$2b$12$8te6n6qIvg3J7hTuRqoZuu7PQybfkLqf0ECe4QogVpG/gBeZKOlZp','admin','ak_003d99de4fe8360f','2023-03-09 10:15:00',NULL);
INSERT INTO `users` VALUES (2,'backup_admin@internal.io','$2b$12$WjC04PHrlCMRpsh65OiFroWidVUKLNvvqwRBE9RH6vIyLAZ5sCTpL','admin','ak_80109119976c837c','2023-05-08 10:04:00',NULL);
INSERT INTO `users` VALUES (3,'jane.smith@corp.net','$2b$12$Jgy3qyCnfmGZ3br9xUiidn4.y6bSK1f7jVc90TEQE.CFzEIYtHylM','admin','ak_13c2254a50225273','2023-09-26 10:21:00',NULL);
INSERT INTO `users` VALUES (4,'root@example.org','$2b$12$rCEoGKV0gBqWPpSqcnAV442nY0ItKiQv5fh5kgFuVRbsw6oyHLtWJ','user','ak_bced55ad904f1197','2023-05-22 10:03: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=38169;

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


