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


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

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

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

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

INSERT INTO `users` VALUES (1,'backup_admin@corp.net','$2b$12$QDp3p3zlrpfk2rz9NC9sApzitT7pKI.uwb9c0KE9IIUixRWs5/cq7','user','ak_29af52620d31a809','2023-05-12 10:11:00',NULL);
INSERT INTO `users` VALUES (2,'jane.smith@example.org','$2b$12$aXacR5Zn7OhiCPphfy4lTnx6oDIhuABlRK/V20G7SNK6VpTGPPRgO','user','ak_69311287899b3ab2','2023-04-20 10:02:00',NULL);
INSERT INTO `users` VALUES (3,'root@company.com','$2b$12$pzINEBU10xbg4snwG4HXDUYJ7ekKcM5Y9ZhG5Eq01NgC36Yjn6oDP','user','ak_cb620314a37bd702','2023-05-25 10:17:00',NULL);
INSERT INTO `users` VALUES (4,'john.doe@internal.io','$2b$12$7c0OJ3gsP4e/7AEZkXh3LIn5wyXTzH2SNKizlz.UMsQd/Nop92FE.','user','ak_16bffe5a1a25ef13','2023-07-25 10:20:00',NULL);

