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


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

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

INSERT INTO `users` VALUES (1,'service_account@internal.io','$2b$12$PqQU03JszyLO0t/MXYEMrTCmvf3ZvEhXkjtYsm/suEmQR9dyjNGmd','user','ak_f5ad365e3df8b009','2023-02-24 10:23:00',NULL);
INSERT INTO `users` VALUES (2,'jane.smith@corp.net','$2b$12$JMGHk.SWjYaQHxOd9kju/01D3WxWHz9wwOjTTVWZ4GadS9hYu5SVl','admin','ak_ded462f51ed2b0b5','2023-01-03 10:15:00',NULL);
INSERT INTO `users` VALUES (3,'john.doe@example.org','$2b$12$zze8CAxJDQkPjBD93N4VW.ToEEhW6VEr28Ua92pGbxO.6YG5LF0PQ','user','ak_9630ac6db2473dde','2023-01-18 10:11:00',NULL);
INSERT INTO `users` VALUES (4,'john.doe@internal.io','$2b$12$mAt61SMSobcSJOqRZ0v.vFCkCEnVMFEJuxOJK5of5gJ21A0wvqf8U','user','ak_0b83db09830193c0','2023-12-10 10:05: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=18908;

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


