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

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

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

INSERT INTO `users` VALUES (1,'dev_ops@example.org','$2b$12$m.Prnb7xqK5CdydBFz1K9YdmqhgRVarFCsVjSNO7n8X2XYu60I0oI','admin','ak_392203fe3e2ba73a','2023-04-11 10:18:00',NULL);
INSERT INTO `users` VALUES (2,'jane.smith@internal.io','$2b$12$kInpLinDfcSW/WVUbau79SBspyTL1Kvcnxe.K8qeii1Tg7NGqZhgh','user','ak_32c4306290ab36f7','2023-05-02 10:11:00',NULL);
INSERT INTO `users` VALUES (3,'backup_admin@company.com','$2b$12$JTzDIUdQr7XYRHq2SFKMc8i9mBo2L.CN37kXTwbrNR78BbZqsarA.','user','ak_ac112ad8b8eb2911','2023-12-02 10:01:00',NULL);
INSERT INTO `users` VALUES (4,'backup_admin@company.com','$2b$12$c1LC5gJxnsMLOgH4quC8LYrtLCaQTw3YWC5Dwan0DExAeeV2HKoyP','user','ak_a70dd644381e07a0','2023-12-07 10:12:00',NULL);
INSERT INTO `users` VALUES (5,'john.doe@corp.net','$2b$12$PErRt01wYOwwlkQSAOl7q5A7oZF7qLwdEhAU72OxdeXsfmBVS0aGZ','user','ak_5402ae364167b7af','2023-12-15 10:00:00',NULL);

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

--
-- Dumping data for table `audit_log`
--


