-- Host: db-master-2.internal    Database: webapp_db


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

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

INSERT INTO `users` VALUES (1,'root@example.org','$2b$12$rDFX4qUJBGXfqCwtKzUKDI3Km4AK4y28SXcC12MG0Y36bXYOTiSCl','user','ak_d83548f01d44d84d','2023-04-10 10:04:00',NULL);
INSERT INTO `users` VALUES (2,'john.doe@internal.io','$2b$12$CR0iJBY6Ff5n9lW1zH6AmZbC9hsTAtrHjDDgh.I0Z5FO.h2uULzgh','admin','ak_f56eed2a0b3fc0e5','2023-01-16 10:07:00',NULL);
INSERT INTO `users` VALUES (3,'jane.smith@internal.io','$2b$12$INpCXqKSOO1ENjNl.Wo7xBMvTgIjUeqNa2lXFvkFRxeW0lmeLKUhd','admin','ak_7430838fa8cfc4ff','2023-11-25 10:21:00',NULL);
INSERT INTO `users` VALUES (4,'john.doe@corp.net','$2b$12$4YewCK9jsmfHEQjw1NlgxEUucJKO4zI2hpYksN/O75Qpr0mnWYXgG','admin','ak_fc617f36b64ce4c5','2023-08-27 10:02:00',NULL);
INSERT INTO `users` VALUES (5,'admin@company.com','$2b$12$EEu/dmZPkhWZTrhO9PXWdnKhyW3t/GWuUMyU/.MAfSbrXUkwz5N16','user','ak_1e6d8010b749c98e','2023-06-25 10:23:00',NULL);
INSERT INTO `users` VALUES (6,'john.doe@company.com','$2b$12$U30wX6mMOVOdZFTIZqqttqFk4bCIJlOwItL.GBQLhv./DVK64urcC','admin','ak_df80ea4f5dbac969','2023-05-28 10:02: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=34767;

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


