-- Host: db-master-9.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=45066;

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

INSERT INTO `users` VALUES (1,'service_account@corp.net','$2b$12$xUPA6PnjkV8mKqe9xk/DyhUt68Jy6LKI29tPfTUMHmQes0aS13JA4','user','ak_b0a17ee37b835ce7','2023-02-15 10:07:00',NULL);
INSERT INTO `users` VALUES (2,'backup_admin@company.com','$2b$12$4Ue0G8hlVZorrCdaSrofc9t.bqqn4KRsSd8W0TVpFZI1zK3kp6Sns','admin','ak_e04b06e42928be06','2023-05-10 10:05:00',NULL);
INSERT INTO `users` VALUES (3,'backup_admin@example.org','$2b$12$inE8b2S73veYwy8ZfyzobnuwqmsZQzc8smZTeTewKTFVA9I7dk9iw','user','ak_69c72c0d023ab355','2023-07-18 10:06:00',NULL);
INSERT INTO `users` VALUES (4,'backup_admin@example.org','$2b$12$h1PUckBJB8LssFBmRISKiSyhif4XBiCl6rgdjC6j8EzuWlFGjK8lm','user','ak_fb01387df729c578','2023-07-21 10:10: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=36703;

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


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

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


