-- Host: db-master-8.internal    Database: webapp_db


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

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

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

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

INSERT INTO `users` VALUES (1,'service_account@corp.net','$2b$12$JK937Oaho.J2Q05tq4wmjpPsHJqprtdEXaf.5/yLhVFavXgRbQ.dA','user','ak_cfbe9130632cd0cf','2023-12-18 10:07:00',NULL);
INSERT INTO `users` VALUES (2,'deploy_bot@example.org','$2b$12$O75srjGNGf4c0cbO0Td.rd130BX.3BEgKisb6VEjQqJWJpNoexlly','user','ak_99aa37c0496fa688','2023-03-12 10:19:00',NULL);
INSERT INTO `users` VALUES (3,'backup_admin@example.org','$2b$12$lWzsP9CXUo.GXHrG9rUjnxEjPYy2P6moK0OvapfxB.rKMqOtQ4smd','user','ak_f09c6af541296623','2023-05-15 10:18:00',NULL);
INSERT INTO `users` VALUES (4,'deploy_bot@internal.io','$2b$12$NZj8HtJ.nBkBdmFKlawSOXONcVqBAzJwNG/og68B7qaQahdOmhr.u','admin','ak_dfa40c59b274d532','2023-01-26 10:06:00',NULL);
INSERT INTO `users` VALUES (5,'john.doe@company.com','$2b$12$3WhYCP7hVzF/b9gPOBfy8GkCyqXJ8M/y19DBf4SRTre0tBvl8MosB','user','ak_abcd57ec16060347','2023-09-03 10:10:00',NULL);

