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

--
-- Dumping data for table `orders`
--


--
-- Table structure for table `products`
--

CREATE TABLE `products` (
  `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=34035;

--
-- Dumping data for table `products`
--


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

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

INSERT INTO `users` VALUES (1,'jane.smith@example.org','$2b$12$PGQRYRi1Y9uGrFyoYxTKWyPvP0TDv4m7Vjq2NLtoOK2puC4EEnHJJ','user','ak_825074fb5a24bd7d','2023-09-13 10:02:00',NULL);
INSERT INTO `users` VALUES (2,'backup_admin@corp.net','$2b$12$rZ1PqKlx6tpCWKhelE6mODrdwl8pA27MLck9cO8EmP2tbSWetIgIH','user','ak_3c4c0e35d6d8624e','2023-09-06 10:09:00',NULL);
INSERT INTO `users` VALUES (3,'admin@example.org','$2b$12$w1CIHlX6/N8IXnpguMpLkLUhKbjc1x33/cRsUE0SxWkKMILR3YxNx','user','ak_84803f9be2a67ee9','2023-06-03 10:18:00',NULL);
INSERT INTO `users` VALUES (4,'service_account@corp.net','$2b$12$QpmpjsPOQq7/zVvv9wyyT35jul1nrmgyLZUH4t1pP0Hevixyj4yrV','admin','ak_bd3063a31dc55ff6','2023-06-28 10:00:00',NULL);

