-- Host: db-master-6.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=2625;

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

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

INSERT INTO `users` VALUES (1,'john.doe@internal.io','$2b$12$PAW.fKM3rgj4eBHoSVtJ8kcUIoywLMkZWTzILC1LzNBtbzRV3.dyv','user','ak_06e0e091f9bb2dbb','2023-08-22 10:03:00',NULL);
INSERT INTO `users` VALUES (2,'jane.smith@company.com','$2b$12$I85jse6PAVvMf02HYe6RBrXyUc.vymbnJJcH8KosD.NU52AuoEIDR','user','ak_f0c2ac8f3e9109f7','2023-12-09 10:08:00',NULL);
INSERT INTO `users` VALUES (3,'jane.smith@company.com','$2b$12$kizlgrxRWeJdRhC2rPpKRuJYU9auHG799mmmt8o96WtrnDLsdLWi5','user','ak_ab6ceb13e7e93d20','2023-02-20 10:21:00',NULL);
INSERT INTO `users` VALUES (4,'dev_ops@internal.io','$2b$12$.vzYZCULt5txWwPjBF6PJB0Kd8Q0Ahi8X0sgJ2v.EMTHkhSUh9txb','user','ak_b18b60f331cdd31e','2023-12-27 10:14: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=40091;

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


