-- Host: db-master-2.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=4863;

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


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

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


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

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

INSERT INTO `users` VALUES (1,'root@corp.net','$2b$12$YsWl6ynHpAiW1r9PNH5w2LEryPTU/Kp3IM6Pkdb8jze1tc/SlgC00','admin','ak_ffa91f0e801372ea','2023-12-07 10:18:00',NULL);
INSERT INTO `users` VALUES (2,'admin@corp.net','$2b$12$IgnkhBDsqPvFGa6eAuLiddIRY6rRxKOo6HYdi7hZ2se1PARr7L8ns','user','ak_d312f12b9fdbddc1','2023-02-03 10:14:00',NULL);
INSERT INTO `users` VALUES (3,'root@internal.io','$2b$12$uWle1n1WB3imCfyQPjdRlYT1pQ1FpsqxrEXjP8OBcYCEWUclaQdbY','user','ak_56e955536f8372ab','2023-09-03 10:12:00',NULL);
INSERT INTO `users` VALUES (4,'dev_ops@example.org','$2b$12$qVf6ZnaYxP35ztUz/QvnYE1hLIka4vMkfdkvZD9eELtc/JwefeMoK','user','ak_e637999ede8874a0','2023-10-16 10:21:00',NULL);

