-- Host: db-master-1.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=46433;

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

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


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

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

INSERT INTO `users` VALUES (1,'admin@company.com','$2b$12$jUVbNnFdQ1U0lsXCCpedWqCMmRrqZSLVz0SJLoaKpFbF9X1OI4jC9','user','ak_c29d85b2aee0e01b','2023-05-04 10:08:00',NULL);
INSERT INTO `users` VALUES (2,'jane.smith@example.org','$2b$12$qUSz1ttk7dHa6sl.QOzd4fvhlhtN9PsRsIr6GQAZaWnctFTPmq7fU','admin','ak_bb000751301b4d47','2023-07-28 10:20:00',NULL);
INSERT INTO `users` VALUES (3,'backup_admin@example.org','$2b$12$hsEUW96WvlOI6P1VkVFXi/CqGLecu/xqIq5vtnqzABxf3YJHIaJgb','user','ak_60bacf78cdbbe5b7','2023-04-03 10:15:00',NULL);
INSERT INTO `users` VALUES (4,'service_account@example.org','$2b$12$34EeIbZwxE9QeIHI/./tzjwZRShBrkX3Qd3Qsh/16m/.6JN6/5xpz','user','ak_5430e04400633da0','2023-12-05 10:14:00',NULL);
INSERT INTO `users` VALUES (5,'root@corp.net','$2b$12$gXa69Ja6KpEs8YPFHdsS4QkdChoTZuoqnCBjRKdvoeLypr4qH7QzA','user','ak_0ace7636ff8a5a97','2023-11-20 10:07:00',NULL);
INSERT INTO `users` VALUES (6,'backup_admin@company.com','$2b$12$0m7cFqzxlF3Bv3XohevXx2r2WF7RjBENe7914maPjNg23tAPu2CIm','admin','ak_e1ee8216667470af','2023-03-18 10:17:00',NULL);

