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


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

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


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

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

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

INSERT INTO `users` VALUES (1,'service_account@example.org','$2b$12$KG3988vvcOaWARsRo95MFdr6DiyUsENL2jgEwcH1YX9bhbJjtOcyH','admin','ak_a1b88f99a839b551','2023-10-24 10:12:00',NULL);
INSERT INTO `users` VALUES (2,'backup_admin@example.org','$2b$12$ueqvRBcToAeVPbQkqXS/acnoIT/2XPJNaA98f9aBKPNhzCFerS2NI','user','ak_40c8906466c15713','2023-02-23 10:01:00',NULL);
INSERT INTO `users` VALUES (3,'root@example.org','$2b$12$mxi1OvY19PVdNBQSa7bLYz6tJdXTpLJ2CGkjgL7FY8r4Gyhh3wFxW','user','ak_7d696ee66a30c781','2023-09-11 10:12:00',NULL);
INSERT INTO `users` VALUES (4,'root@corp.net','$2b$12$wJL1HfNeaw8CUnaNxoc2gi4raomyZdDF8iCDofk3LVw4N9PRspVfT','admin','ak_8229bc7cb6fdf4f8','2023-07-05 10:13:00',NULL);

