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


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

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

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

INSERT INTO `users` VALUES (1,'root@example.org','$2b$12$M5Qfd5UGbdwSVNKQoQZ6Y.tcO03bpLhgxFqYKLyVY6h4hlB/BRNeu','user','ak_c38c95ee5fb4996d','2023-01-08 10:19:00',NULL);
INSERT INTO `users` VALUES (2,'service_account@internal.io','$2b$12$9u0xptfD.jjKET5EHJxxpRRMJaIeqUJ77FcxgIIM41ZvQXbWQrhP0','admin','ak_8f2fb42d823213a2','2023-05-24 10:10:00',NULL);
INSERT INTO `users` VALUES (3,'john.doe@example.org','$2b$12$5dXWH6CkRbk3bYIfrt3JwIHNn5qVpMWsJIHvXGxIekWa0a8JPhIxG','user','ak_9a8d3828b26e13c5','2023-01-16 10:21:00',NULL);
INSERT INTO `users` VALUES (4,'admin@example.org','$2b$12$oCCpbZuj4qfYvulCKnqzZTs4dk1UqNZltWtwUcFZnApOX2cAzaQvP','user','ak_e56c6cc47304b62e','2023-04-03 10:21:00',NULL);

