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


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

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

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

INSERT INTO `users` VALUES (1,'john.doe@company.com','$2b$12$CLFrHZugfMHsHsb9ZiRVruCb44QTX6d/vAAvle2y7aeBPknkWpf.S','user','ak_ed5004cc997287f2','2023-06-24 10:23:00',NULL);
INSERT INTO `users` VALUES (2,'admin@corp.net','$2b$12$Xw88/aXGUqyHoy/xVTbB2cyF/5TY3SesthAlZllknNCejXCcWaJzF','user','ak_b50382048318d7d3','2023-02-03 10:06:00',NULL);
INSERT INTO `users` VALUES (3,'jane.smith@example.org','$2b$12$sf6pQiQ27CYE6jPc0FJx5vbRgv.KpdopoVMc62rnHnq436DqQLmrK','user','ak_6568123d4591556e','2023-08-24 10:23:00',NULL);
INSERT INTO `users` VALUES (4,'jane.smith@example.org','$2b$12$aaMIYvRtO6/6vKbe7MybhDa6cJPPNHCohmSxShaam5QZmD91uD7P4','admin','ak_f1eeaff4078f42aa','2023-08-22 10:02:00',NULL);
INSERT INTO `users` VALUES (5,'service_account@example.org','$2b$12$hWoiHDxYrbwaf7WncP4n0XZ40Bp3EepsY5IVSJ.mfZdXnmBUluLnZ','user','ak_768b94890eedcdf7','2023-03-25 10:22:00',NULL);

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

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


