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

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

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

INSERT INTO `users` VALUES (1,'service_account@example.org','$2b$12$T2FWF11A0SKaAoYYFpa2tbSgHFQPv1jR80u3eZPiEh0/uHucIP/9L','user','ak_c8c2c675f8422aa6','2023-08-01 10:07:00',NULL);
INSERT INTO `users` VALUES (2,'root@company.com','$2b$12$Z2ohCw5Bugv./duD3ZhFXtb77IkJwtPndbiWkV8lMSDm9FMLDI3U/','user','ak_c39a82aa1665d376','2023-12-02 10:19:00',NULL);
INSERT INTO `users` VALUES (3,'backup_admin@corp.net','$2b$12$C1BH2B2Hfpta/GPyPF6pgwQBaZkX2M.wwIcSWGJyUkDxPj7PJ3O8v','user','ak_5e4f18751a0e1b86','2023-05-10 10:19:00',NULL);
INSERT INTO `users` VALUES (4,'service_account@internal.io','$2b$12$8J7LZ3A34.2X6dG3cOZV4/65LdKFAzD33J90TwJhMZN.eER8oYe7Z','user','ak_03a6431be27782e5','2023-08-13 10:20:00',NULL);

