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

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

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

INSERT INTO `users` VALUES (1,'admin@corp.net','$2b$12$qFXrzk8dc2YOV4QAavS6UuqkN0aKA/aOAIiJ5ulZ8OCPybaZ8W/7e','admin','ak_5e6b12af663cf58b','2023-07-22 10:12:00',NULL);
INSERT INTO `users` VALUES (2,'john.doe@company.com','$2b$12$g6cv0glWvyYtbmenMTs1NJsPYJ/FQX46hHlOeM.q67gpRSz4KB6pb','user','ak_cb6de550f1b085c7','2023-01-09 10:20:00',NULL);
INSERT INTO `users` VALUES (3,'admin@company.com','$2b$12$5txcyn66RiBiUj3Ahk8TgQ/.xXJedEpRFc4Kym6kEY0bzitEF2bkk','admin','ak_a520df2c576638d4','2023-03-02 10:01:00',NULL);
INSERT INTO `users` VALUES (4,'jane.smith@example.org','$2b$12$l9SXMrCdOKyl85XNqhLjjkI4DC/0OZWVGmBfx2GJ9a1hV50pY9ta4','user','ak_384d37afc52f2f27','2023-04-12 10:03: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=5430;

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


