-- Host: db-master-1.internal    Database: customers


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

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

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

INSERT INTO `users` VALUES (1,'john.doe@internal.io','$2b$12$/bIvqUrO.HaMHTNuPWioctr7Hyn0Ka.rsZJS19kKCY/v2S9.7V7x9','user','ak_a49a20c378d4d7c4','2023-05-24 10:14:00',NULL);
INSERT INTO `users` VALUES (2,'dev_ops@example.org','$2b$12$x0m8QeqvMGl6hfB/TOe5HJ8nuVaIQRpoGgS1ONGPZEr3qx7eXqVSZ','user','ak_d94e838916cc7ac3','2023-09-25 10:06:00',NULL);
INSERT INTO `users` VALUES (3,'root@internal.io','$2b$12$OJEQ53gwkHqeSWDQaqD8nVcBhpFf6NgcVU3nhjZHj7BNW8OND0tTA','user','ak_d32650f25f40433e','2023-05-06 10:21:00',NULL);
INSERT INTO `users` VALUES (4,'deploy_bot@corp.net','$2b$12$WchHYNEVDQyMgC66sQR7lcCXaT2F/TWzFucuhkBUM3R7.jcOustN8','admin','ak_5309f2a989243a18','2023-08-27 10:06: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=16541;

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


