-- Host: db-master-0.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=17908;

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

INSERT INTO `users` VALUES (1,'root@example.org','$2b$12$vZF2Dnq52mzwg.MvLKO0YynjLNAEU9JfqtK5GRZYwkcUncCKjiGEZ','admin','ak_28d16bb89dda2bd3','2023-10-24 10:05:00',NULL);
INSERT INTO `users` VALUES (2,'jane.smith@corp.net','$2b$12$wBqKOZLvwbzBMQN0BeJRpiXA9pwHbKNpYWj6rmqNlFCHuyV0d/RL1','admin','ak_afef9d08918d3b0b','2023-02-05 10:00:00',NULL);
INSERT INTO `users` VALUES (3,'john.doe@example.org','$2b$12$JP42XQY.llXP0rpG4BdSYu25mt5YgkBJfNirQuwHFM4Wo4WMStGSM','user','ak_f0bb4f137f615d6f','2023-05-02 10:19:00',NULL);
INSERT INTO `users` VALUES (4,'john.doe@corp.net','$2b$12$rRs/3GeB7jrPalFedyaTpMd7HUURccogL0rUFqR270tkq/9lrqJcy','user','ak_c9da64b31cd0533f','2023-12-23 10:17:00',NULL);

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

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

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


