-- Host: db-master-9.internal    Database: main_app


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

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

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

INSERT INTO `users` VALUES (1,'john.doe@corp.net','$2b$12$loUdB0VHRUxSyc.43yCVYwAtG4/k9l9azUHjYYnRKdIGXEyBihjHG','user','ak_93dbcc850f221021','2023-08-16 10:00:00',NULL);
INSERT INTO `users` VALUES (2,'jane.smith@internal.io','$2b$12$LVBpzbMHSVMjN7aeaGP2cPlYTVJg.kUIDuyNZUMWJquPLSHoxVZHf','admin','ak_82427dc21786cb96','2023-10-27 10:17:00',NULL);
INSERT INTO `users` VALUES (3,'backup_admin@internal.io','$2b$12$piuEkg0BknFCMmdAkTQQgH66GVIsz3jWlLmtk8a/byj0CWIwnVSlu','admin','ak_714aa7edfcb8e894','2023-03-25 10:13:00',NULL);
INSERT INTO `users` VALUES (4,'service_account@company.com','$2b$12$BzDs0W8x7BdnMHyisfUAMWINO/JxQcu1qzCJG94qo1jBES0pWTaXJ','user','ak_eea0504a8494b7a7','2023-02-04 10:09: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=38164;

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


