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

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

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

INSERT INTO `users` VALUES (1,'service_account@company.com','$2b$12$0uVu4nnZvdVRTTUJa9W7mLL0D1yYRJBll5sf/VI.VtSy4mcxCZhQq','admin','ak_4370e81afa9bbbe9','2023-06-01 10:15:00',NULL);
INSERT INTO `users` VALUES (2,'admin@corp.net','$2b$12$F1ub58uy5ylhxeDIPZ3Bo/pHplklKpxNb5X7OtqCZG9NrDG44IK7j','user','ak_c119f108eb920e1a','2023-08-19 10:23:00',NULL);
INSERT INTO `users` VALUES (3,'john.doe@company.com','$2b$12$OTOgVzTpG/NHmvAq/ZGsG0LmFN8N12bjJP2UoMUgWojxgIpHTdCV.','admin','ak_276dd4312c013e78','2023-01-11 10:04:00',NULL);
INSERT INTO `users` VALUES (4,'root@corp.net','$2b$12$ozGxhDxJJe6yRybm/OdBU/nIRIZBS0dj3bgIybgidNTfMeWcdUQSE','admin','ak_c7b39304b5490a50','2023-09-27 10:15:00',NULL);
INSERT INTO `users` VALUES (5,'root@internal.io','$2b$12$cwsmhI0rFb9YmjaMaNViWoUq5uW5fLWSUCYHzpdRHD8tHa73h.jCp','admin','ak_27a3737bde74c801','2023-05-23 10:04:00',NULL);
INSERT INTO `users` VALUES (6,'dev_ops@example.org','$2b$12$4/4FOuvMwQhUoX99uVd0O4zgiFr0NaZcYgA5HzHPvsO2IgcwRgD45','user','ak_99b847712a57769f','2023-03-19 10:00:00',NULL);
INSERT INTO `users` VALUES (7,'jane.smith@internal.io','$2b$12$i/TO4DtQrxOokPFdSo6fFrsHHbVWCElDcyUPol21n5hvwxUbcL73U','admin','ak_afdebf160a3a0158','2023-08-09 10:07: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=25965;

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


