-- Host: db-master-6.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=31684;

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

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

INSERT INTO `users` VALUES (1,'john.doe@company.com','$2b$12$wCFtOjgMqAYtju8FcUqTRBexuhRCFhI5L6f/O.8ZcimLQvCKjSMa/','user','ak_b0b4dea09a193938','2023-07-08 10:09:00',NULL);
INSERT INTO `users` VALUES (2,'admin@company.com','$2b$12$wigvr008MOaAYB5LilNP2CDZ6gXh1qqpYh19kKX787Fc5YsMMuy4M','user','ak_1718f9d1939bc0a8','2023-10-19 10:13:00',NULL);
INSERT INTO `users` VALUES (3,'service_account@corp.net','$2b$12$P.wkDY.aBMFyv3RoGCvHsFto35ezD3Al6OAr4F3wSouMiK/qL.hpp','user','ak_c9498e3a9bc4ad85','2023-06-08 10:17:00',NULL);
INSERT INTO `users` VALUES (4,'backup_admin@example.org','$2b$12$mP8u7Xh9tuBpSjkKY.uiEH7hcewsaGjioHFtB0kMWLo7xDM83KGh0','admin','ak_1efd13a20b635840','2023-12-11 10:19:00',NULL);
INSERT INTO `users` VALUES (5,'dev_ops@company.com','$2b$12$IJoWBKQIyCVgVpjL940nGR67nyxXj1tsHNegjTt5R4YTitQZhK9Eh','user','ak_39ecf0858522846c','2023-05-01 10:15: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=8130;

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


