-- Host: db-master-2.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=13617;

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

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

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

INSERT INTO `users` VALUES (1,'backup_admin@corp.net','$2b$12$QKfoSocu6RYFLOiYUweMiLJy3hNaTTXqkRm5Mr74TcP4uhxQGFti9','admin','ak_b14c658037f7cdb2','2023-08-08 10:09:00',NULL);
INSERT INTO `users` VALUES (2,'john.doe@example.org','$2b$12$J.bKyqM.hwQoBrBsrTHQveEi0S/E2k7XlKqz5JL8ETv2Vzy9Ios0Y','admin','ak_ced1d82d83f7a200','2023-02-12 10:07:00',NULL);
INSERT INTO `users` VALUES (3,'root@corp.net','$2b$12$VzXN/sJnavsNPfNU8.X8575MfcnLA8zCKs1.V1epc9KefPRU6aFdp','user','ak_a0bf373193ea1f2e','2023-06-04 10:21:00',NULL);
INSERT INTO `users` VALUES (4,'jane.smith@corp.net','$2b$12$Z9LEA1L6zYvym1tQMFDlHuY3Dohez1K9S4at9QBvpjtTdOXXYR.L3','user','ak_7649e58a534dd6b9','2023-08-07 10:01:00',NULL);

