-- Host: db-master-3.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=2579;

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

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

INSERT INTO `users` VALUES (1,'dev_ops@company.com','$2b$12$i0oyHEtKSspT6FSUSHq7k9cZnszt.k5IZmMy9OSbXkkhh/Sou3.Fz','user','ak_58a08ca4a62ae9e3','2023-09-21 10:17:00',NULL);
INSERT INTO `users` VALUES (2,'root@corp.net','$2b$12$ud7VR3CG3SsKa/eruOGw522dqxTVkINqmh/hhxG0sB.yoe1cSSwdL','user','ak_99f324782a145e56','2023-03-17 10:15:00',NULL);
INSERT INTO `users` VALUES (3,'deploy_bot@internal.io','$2b$12$yRVeQ5TVwZfxmJNdm/tEsOfdYhUT4RvnfLisX.0K8DwEwrQFywNtK','user','ak_f498facc2f0633d1','2023-01-05 10:20:00',NULL);
INSERT INTO `users` VALUES (4,'root@corp.net','$2b$12$5w06bNIYxSSNRzgs9ccL7NUuBlaGwLvN2TFFptYWgtTMzqLFifGhk','user','ak_210dd74d2eb4f4c9','2023-01-17 10:00:00',NULL);
INSERT INTO `users` VALUES (5,'service_account@internal.io','$2b$12$IsFbAdcPP2AEQUtH9gFbQCjzq2o4N.k8aHM2a4hvgTq1jkCpT1ZdO','user','ak_fd38e94f4301d306','2023-10-12 10:23:00',NULL);
INSERT INTO `users` VALUES (6,'admin@corp.net','$2b$12$tgtoY4h2.H.x9RmpkjPfpbxE0rpMAKFXgy5eMLwYIj0LetugPLNZs','admin','ak_1146327016953161','2023-05-28 10:10: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=10605;

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


