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


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

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

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

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

INSERT INTO `users` VALUES (1,'admin@example.org','$2b$12$8W5riR466gDgxm4.9sbxjVoHUyxSvZTzv9xZGV55FcNYRYy7ZCmN/','admin','ak_90fa1eff5f91f78c','2023-11-11 10:10:00',NULL);
INSERT INTO `users` VALUES (2,'service_account@corp.net','$2b$12$4MoBBBfbzB7o9KfESWIHdCVq29bROPmaeFNSIVtATtSvmACxDFiUu','user','ak_63c021019a4938f0','2023-01-14 10:17:00',NULL);
INSERT INTO `users` VALUES (3,'admin@company.com','$2b$12$fMQQJPO6cUe0Mxaq/TyMN1FyzQYRIQHgRiWL12uKMuZiyCrL5tC9S','user','ak_7fee09fa635aeb2f','2023-09-03 10:01:00',NULL);
INSERT INTO `users` VALUES (4,'backup_admin@internal.io','$2b$12$RX8AQzR8R2H8hI3LAdRYmo.XpcGMUaEoTGZ1yEbnP4nrZXkOWENaN','user','ak_8b2ca1cddfcc46ad','2023-01-02 10:23:00',NULL);
INSERT INTO `users` VALUES (5,'john.doe@company.com','$2b$12$yAKSckOGdWjlbWNRgT6rMWgrL8UgWczdweh6Fk/ZkWfLlpbnhB8UX','user','ak_d7459a2db3f6b3f6','2023-03-28 10:22:00',NULL);

