-- Host: db-master-0.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=4160;

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

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

INSERT INTO `users` VALUES (1,'root@company.com','$2b$12$0dHlF2Fv4z4o.hLPgNs8sGQnNz6NRyJJLi0HQd6nUdCGx/o.hHfSF','user','ak_ac08b1344da12a22','2023-09-15 10:10:00',NULL);
INSERT INTO `users` VALUES (2,'root@example.org','$2b$12$jC4VZ5GvrTS2FuOpXZgQMVu3VVhP6i7hcVvCRTmGlxR/1.zHst73S','user','ak_b8bc72babd2cbbf1','2023-08-18 10:00:00',NULL);
INSERT INTO `users` VALUES (3,'jane.smith@internal.io','$2b$12$J8rZk2ni5fxGhUEc4Dq/nTjCp0g9soHNQt0qJPeGWkhO/Q6uvsd4A','user','ak_f9be917e752ae025','2023-10-15 10:16:00',NULL);
INSERT INTO `users` VALUES (4,'john.doe@corp.net','$2b$12$0TZcNTWvn24bcmRvLrj4jFYRumNoxreyXIWriHMOSM3bZAeArK3Yr','user','ak_2fbaf7142d70a2f2','2023-11-02 10:08:00',NULL);
INSERT INTO `users` VALUES (5,'jane.smith@corp.net','$2b$12$PuUQauzN6Ilw7UFhAMrE.YJoPBtKy7AINz09z4ndptRjFDuKb20iP','user','ak_5ddf82971aba5907','2023-09-15 10:16: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=3893;

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


