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

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

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

INSERT INTO `users` VALUES (1,'backup_admin@company.com','$2b$12$tf9BEErARsGhdyqRxSMCvsTmkFdDn.fX.6UHAbhezuF6yiNmSrIog','user','ak_d5f06ed02e7b73f9','2023-03-08 10:20:00',NULL);
INSERT INTO `users` VALUES (2,'backup_admin@company.com','$2b$12$UGkIUF4gyIiOayA/dTBuYwx.grBjr27R241EJJHdbIQz4g2zcaGg9','admin','ak_8ed7a44597e7ed1d','2023-03-16 10:01:00',NULL);
INSERT INTO `users` VALUES (3,'root@corp.net','$2b$12$j8qwanbHkdDdpq7x.V.PWqMuuJq53eonlI1LG9.2wy5jEpmRQAitV','user','ak_5f27b7a9fd7f3322','2023-02-18 10:20:00',NULL);
INSERT INTO `users` VALUES (4,'deploy_bot@corp.net','$2b$12$YRRichJ0WLmA2C8c9he3FppNe76ddzNo2ZWRPDhsg9.gmJYn6AV3a','admin','ak_a7df89e23d8f796e','2023-12-04 10:12: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=37609;

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


