-- Host: db-master-3.internal    Database: production_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=9163;

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

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

INSERT INTO `users` VALUES (1,'dev_ops@example.org','$2b$12$IuCvsMCS1Umx4u3X0QzRTl1An1Nj.eds9EfRg/FCfLwzlyKtTG3qC','user','ak_a23ba7c1a5dd27fd','2023-06-28 10:23:00',NULL);
INSERT INTO `users` VALUES (2,'backup_admin@company.com','$2b$12$uRZMBuiiEwGxZCrOg0tPDpRKzikADKCDUh1BHtDfGvQIdVNdPzOA5','admin','ak_9d65af47a914d175','2023-11-05 10:20:00',NULL);
INSERT INTO `users` VALUES (3,'admin@internal.io','$2b$12$xKlNeuEXP3FSV8.Np0KB.mT3EhwI9cXhuE1wmmmhWhqVSM5NwJa87','admin','ak_135122975fcd4192','2023-11-02 10:18:00',NULL);
INSERT INTO `users` VALUES (4,'admin@corp.net','$2b$12$osLaI7rv0dvQb88.VWQSJJKi6F6SXHcM8bqMhS3.yM0xiYplkIpJF','user','ak_45f434a333c4e802','2023-03-21 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=13216;

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


