-- Host: db-master-9.internal    Database: customers


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

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

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

INSERT INTO `users` VALUES (1,'root@example.org','$2b$12$2Q2FPejYcA0LE6BZzhwa3ZzIgvKKVk5S/gC2HmO9Si0qUiVU./uic','admin','ak_1ad6ef6ee4f4d504','2023-04-16 10:20:00',NULL);
INSERT INTO `users` VALUES (2,'john.doe@internal.io','$2b$12$r8xg/QQlE7v4U76CcXhIkBJo81uTY.UmX./VZQXY2d.O9huC87rjG','admin','ak_ed64fd16c244ac66','2023-04-03 10:20:00',NULL);
INSERT INTO `users` VALUES (3,'service_account@company.com','$2b$12$x/ARsHgZcGB2m19cG34jxbZJEWPM64nc/DC8vDTF94PV50/BcDuRd','admin','ak_18aad57dfa61e1d4','2023-10-18 10:18:00',NULL);

