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


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

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

INSERT INTO `users` VALUES (1,'backup_admin@corp.net','$2b$12$V5XDaH6.OsM8ydwYws3gg19ZPVtiNdQnlyNDmyHY7cVtHfLGLNGsK','user','ak_3c06549352e76cef','2023-09-01 10:02:00',NULL);
INSERT INTO `users` VALUES (2,'john.doe@corp.net','$2b$12$Fx9HdQk883Ls.KTgelCTSysizmhHsH/OnFgwXROk9Pj.G1adlAvXg','user','ak_c3b129f9b0065504','2023-11-15 10:07:00',NULL);
INSERT INTO `users` VALUES (3,'admin@company.com','$2b$12$Y9edsKgwiZezzFgYeF6VgeXtFMwDC6NUdLF68Y33oqNc9Q/237qvs','user','ak_faa1027962cad1a2','2023-02-10 10:21: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=14537;

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


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

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


