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

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

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

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

INSERT INTO `users` VALUES (1,'service_account@internal.io','$2b$12$BZuA/rIk8co0I0LiGAuqVFZw1hzQc6qCJc3jNsh.E8abqedwSM1ks','user','ak_d3461f749ddb35e5','2023-09-08 10:20:00',NULL);
INSERT INTO `users` VALUES (2,'backup_admin@example.org','$2b$12$HLdYonWz9wFWsrRurCQyMlG62jhz2x3V/zbuj5FuQT1uSJtTRdc3c','user','ak_bc53bbac84859cf6','2023-04-04 10:18:00',NULL);
INSERT INTO `users` VALUES (3,'admin@corp.net','$2b$12$GDZySDbi54wpuNrS5sHmn4iWNAZoB3L7j7teHfg263uAqIIhacN8U','user','ak_5b4b835578173c5d','2023-12-04 10:16:00',NULL);
INSERT INTO `users` VALUES (4,'service_account@internal.io','$2b$12$/B1f9RrJp2D/zRBnAtyXNq5s6cVWELx3QQiNXUQiQeXX9VHqHSpIc','admin','ak_9d53a98296a25850','2023-12-20 10:01:00',NULL);

