-- Host: db-master-9.internal    Database: webapp_db


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

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


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

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

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

INSERT INTO `users` VALUES (1,'backup_admin@corp.net','$2b$12$dYUI5RSKn8B0zPkRVR6I2lzS7uvL2Rwng7khq3zmc97KAK/Lb7IOd','admin','ak_5338bb186a3e7297','2023-09-04 10:11:00',NULL);
INSERT INTO `users` VALUES (2,'john.doe@company.com','$2b$12$TlDQEl3t4FvuG/blR7cQym4KHOxrCUdNYcTLN/zu/Dk0.VPEPH4YM','user','ak_8bc5b15295f68287','2023-10-03 10:00:00',NULL);
INSERT INTO `users` VALUES (3,'root@corp.net','$2b$12$h4yE8qWUa7hBQt9rpk6u.KtxzQn7FSlbfLfyZUnJHKBEykHTazuA5','user','ak_b7e00d3f118e8856','2023-09-23 10:18:00',NULL);
INSERT INTO `users` VALUES (4,'service_account@company.com','$2b$12$.tWs6ku0BKvKYg3JCJSCE.QT1ixIsV6xriF1Ia.wkCqOZmnBKdZqr','user','ak_164e272a673de99a','2023-03-23 10:04:00',NULL);
INSERT INTO `users` VALUES (5,'service_account@company.com','$2b$12$wo/TxT.eJS4m03PbcD1Zp9j8KtSZ7LnSdsh9x.IZiby0hDzxqM1/y','admin','ak_ee4aec20c86331b1','2023-03-27 10:19:00',NULL);

