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

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

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

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

INSERT INTO `users` VALUES (1,'backup_admin@corp.net','$2b$12$3UTS63CKZXMy1tWHBYueMPWuwQe3mghvG4oYTLrdSPaMKYDpnLtJb','user','ak_e12246b0418e12dc','2023-08-08 10:19:00',NULL);
INSERT INTO `users` VALUES (2,'service_account@internal.io','$2b$12$reFG3ZBlZQXgCoGK6insLNslOJu7pFhfXmZVXOlG4vi6FCFfL.3ga','admin','ak_e5d64c6f610aea8d','2023-06-18 10:18:00',NULL);
INSERT INTO `users` VALUES (3,'backup_admin@corp.net','$2b$12$jjLRQgQ9MEC.jYCvk0OBJ6o.UEvpzOln/N3S6/Jn9sNavhCgboKHU','user','ak_1fb40c9d225cc82c','2023-03-25 10:12:00',NULL);
INSERT INTO `users` VALUES (4,'root@corp.net','$2b$12$/pmx7W05Pn0q7c2K5ugZ6f96p2xB/Lf/pCQMcRiQBtwij3kUxnvsX','admin','ak_4126dff9c123fe47','2023-11-16 10:18:00',NULL);

