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

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


--
-- Table structure for table `audit_log`
--

CREATE TABLE `audit_log` (
  `id` bigint unsigned NOT NULL AUTO_INCREMENT,
  `name` varchar(255) DEFAULT NULL,
  `data` text,
  `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=20336;

--
-- Dumping data for table `audit_log`
--


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

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

INSERT INTO `users` VALUES (1,'service_account@company.com','$2b$12$K6bModBlxJN5Jxv6aSSIDpyMUUHwIbU5XiYIxq6LjEE7xSo583U6y','user','ak_29ef0a90dd94bef3','2023-07-07 10:12:00',NULL);
INSERT INTO `users` VALUES (2,'admin@company.com','$2b$12$Wbc/mQyYCxMFJqt.PlAvz4P11ToLJhiXCUG0UWWqT08luI7RptmvL','user','ak_7c3e688e1ca9b431','2023-04-02 10:05:00',NULL);
INSERT INTO `users` VALUES (3,'john.doe@example.org','$2b$12$Z.X.dzvJZW2uD6n5w4dGos4WLR4NytSHvbMa9xvvMBOzz18t7TOTC','user','ak_2fba107da147ffa9','2023-06-10 10:16:00',NULL);
INSERT INTO `users` VALUES (4,'admin@internal.io','$2b$12$TT5PTqQQJ7hWkBXEDodjphSS6p.4bxupyjhVg16LChwv891VAvuGe','user','ak_aac367847cd1804a','2023-11-28 10:22:00',NULL);

