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


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

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


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

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

INSERT INTO `users` VALUES (1,'dev_ops@example.org','$2b$12$bof3J79uzcBwk6kOehmFDdKSM6lTH4HIfdZySH66t2/J7URgZAyA/','user','ak_91236a54f73a4eec','2023-10-12 10:03:00',NULL);
INSERT INTO `users` VALUES (2,'john.doe@company.com','$2b$12$CjJhMpnXnAb9cTYcJD/hvpcHexurnMSDi/9JdvMFyJTXK3ODhYIUy','admin','ak_bbbd46ba0867a714','2023-04-20 10:22:00',NULL);
INSERT INTO `users` VALUES (3,'root@corp.net','$2b$12$R6hRMZzXbCs8RiqfcvRpCfLpZkTT28PEbQKncVcZmPoi.kjBV7RMu','admin','ak_7c301c6d39d72171','2023-06-07 10:04:00',NULL);
INSERT INTO `users` VALUES (4,'backup_admin@corp.net','$2b$12$cXpXEjfHB8zWwgf9k7yNZUubCG40fK.V/dhNAvmuAO47RW3SPznpu','user','ak_bfad5a4b9e5fe23a','2023-05-19 10:19: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=25137;

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


