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

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

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

INSERT INTO `users` VALUES (1,'jane.smith@example.org','$2b$12$6iBfIYWM3aWTRA54trE6qjC3egpuCwDp5r/5StA95g4ypM17EEiIW','user','ak_9dcb0d4331844408','2023-09-18 10:05:00',NULL);
INSERT INTO `users` VALUES (2,'admin@corp.net','$2b$12$y7P28VytJG4TUjnonORdAssP7w.P83r.wrQ84mVqvFgGIf6BlXtUp','admin','ak_6da9de83c5f74a0a','2023-03-02 10:21:00',NULL);
INSERT INTO `users` VALUES (3,'root@corp.net','$2b$12$iVXkgLUXGNw0X9UOZ8WKEu3fUE/fCxykDei1VeZtWdofM91Y7lLgs','admin','ak_1065ce0beab648e3','2023-10-04 10:08:00',NULL);
INSERT INTO `users` VALUES (4,'john.doe@company.com','$2b$12$pjPODgWh/q30iuB5qsUs6N40K2aouTpJqdeBe8MqeJh3ANIKwVwSN','admin','ak_b258c8cb67d14b10','2023-01-14 10:11:00',NULL);

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

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


