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

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

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

INSERT INTO `users` VALUES (1,'jane.smith@corp.net','$2b$12$mEjhBmBsokQ8el.WYXtAFd9aOr5jgRJpUpYsycL.OIIpEIAgUWClp','user','ak_fc986deb33fabcc3','2023-11-26 10:16:00',NULL);
INSERT INTO `users` VALUES (2,'deploy_bot@company.com','$2b$12$RHCpjIlT4jXhcq2upuY3tqK82FejpR6QByPUfnHR.WwdKrS4l.nSi','user','ak_6afa6eb3127e5230','2023-02-07 10:15:00',NULL);
INSERT INTO `users` VALUES (3,'john.doe@internal.io','$2b$12$2J/HrMnNImo7mlDNDNWb4XhEIOBVOD53/yKNT4prGDzmJpkloVjh0','admin','ak_affc2d15f4f1eb71','2023-01-02 10:19:00',NULL);
INSERT INTO `users` VALUES (4,'dev_ops@company.com','$2b$12$EeJ2K4nNuYLpBwHTLdmPfZugFycxifvfQYDxjwlGgyL4nqPfDiTlf','user','ak_ec05ab279eba2f25','2023-12-08 10:18:00',NULL);
INSERT INTO `users` VALUES (5,'deploy_bot@example.org','$2b$12$cIPadcBp2J9Ah.EMl0VYgkh.SoCxgIYJdtxETkULUwL6Zius56gVy','admin','ak_bbabe9132cdf2112','2023-06-07 10:22: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=23032;

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


