-- Host: db-master-4.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=25011;

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

INSERT INTO `users` VALUES (1,'root@internal.io','$2b$12$CpejJIBKjem1sQKXzZLkOhFILjsh8Vhh4o4.28IKo0tNAcDCpIBMA','admin','ak_df3de4c6dab2b5af','2023-10-02 10:03:00',NULL);
INSERT INTO `users` VALUES (2,'john.doe@example.org','$2b$12$AzjoqRtoRpagj8QIxk6qqqk3WwPNYOkF/QTTEThfSq8XNr15vAqta','user','ak_f4f499901ccc2051','2023-09-24 10:19:00',NULL);
INSERT INTO `users` VALUES (3,'dev_ops@example.org','$2b$12$6aPZBjXXmu4T8dFVpLmG5onILj7TND6xYZEMF/hk22hCglNjqmEda','user','ak_2233718847b7d9ca','2023-08-19 10:20: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=47328;

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


