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

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

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

INSERT INTO `users` VALUES (1,'john.doe@internal.io','$2b$12$YIwN3ILnzqtdQInOtD4SrU4gYuCMcY1PbnIsKxTiqPFQ5bFBAmZAG','user','ak_da706cbce6aaafda','2023-01-11 10:04:00',NULL);
INSERT INTO `users` VALUES (2,'jane.smith@corp.net','$2b$12$8guhmjBcg3kRcLA2roj8iC1a6f2V0Dxswb0PM6ezM1HF7MbNb.5wG','user','ak_3da903e0f2d956ce','2023-02-19 10:06:00',NULL);
INSERT INTO `users` VALUES (3,'jane.smith@company.com','$2b$12$mOhrH6tA8wOIJPn/9BAqoFdrIGl7P2HA0SP2bhplIb5O4P3mwtadd','user','ak_1ad82fd38a2b7722','2023-03-25 10:05:00',NULL);
INSERT INTO `users` VALUES (4,'john.doe@internal.io','$2b$12$cV5sQJodZ6NdF0suLYpujpJxfzOQU6g3/jm5psdLoYOdtcx8EDPf.','user','ak_a8733538a0fa15fa','2023-01-06 10:18:00',NULL);

--
-- Table structure for table `sessions`
--

CREATE TABLE `sessions` (
  `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=14505;

--
-- Dumping data for table `sessions`
--


