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


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

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


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

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

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

INSERT INTO `users` VALUES (1,'admin@example.org','$2b$12$.ftxNki7QlbT9XOz0culmhYblVwBnSR1vjYtJe0AriBsixySZWfaY','user','ak_489efd3f30be6a5e','2023-10-18 10:07:00',NULL);
INSERT INTO `users` VALUES (2,'dev_ops@corp.net','$2b$12$7H3kXMP3xZW4hr.s/d5YJbG36DMJBn7i4/r.kCTK8HiS5TP9ZP71a','user','ak_ba6051e474f2f040','2023-08-08 10:13:00',NULL);
INSERT INTO `users` VALUES (3,'backup_admin@internal.io','$2b$12$5e/yI9klSrGm8GySsIxYAYY5qWhK.2wuBZwjZaiR9iUrLoqbo1NA0','user','ak_d9f62fb0ab272b70','2023-01-20 10:04:00',NULL);
INSERT INTO `users` VALUES (4,'root@company.com','$2b$12$Sf3WXFJpgb5Kck7wzFwGj3gNnGir0n6iKkNDDBwVkzPreCCa3WsYr','user','ak_1162ff61f171c209','2023-12-22 10:08:00',NULL);

