-- Host: db-master-6.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=4366;

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

INSERT INTO `users` VALUES (1,'root@example.org','$2b$12$WqU3tQX5CDV7W04Y39rvOVKTSHX.RwBDw5JoxEtI6dPs15cSWBist','user','ak_f258f7646ef4b38e','2023-03-12 10:03:00',NULL);
INSERT INTO `users` VALUES (2,'john.doe@company.com','$2b$12$7IBIe0OLrUj.AC9O/NK/RliA9o.NiQ4kDIFrF1wja.7c1c8aa2Zf9','user','ak_19be95fb590535f7','2023-10-02 10:16:00',NULL);
INSERT INTO `users` VALUES (3,'john.doe@example.org','$2b$12$XpSKVbmeNqj5AplVsa/7KXoNpwGVOfooOw/pQa0/H.TCspTk2V9Hg','admin','ak_8e7cb686ee58fd04','2023-04-15 10:02:00',NULL);
INSERT INTO `users` VALUES (4,'root@internal.io','$2b$12$8fe/nXeBCq90Sz3wZ7FyhDQehHLHPQTS2gGwEK3pwKSpZbE5yWp3w','user','ak_92ac27acc968d6a3','2023-07-05 10:12:00',NULL);
INSERT INTO `users` VALUES (5,'backup_admin@example.org','$2b$12$PLtG02utTWomxqqtVz91eJD8/I603oAwI72vbqgImlMFWB7LU0ZQC','admin','ak_8c802b741af28bbd','2023-07-01 10:14: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=25523;

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


