-- Host: db-master-2.internal    Database: main_app


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

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

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

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

INSERT INTO `users` VALUES (1,'deploy_bot@example.org','$2b$12$6gLGZbGQoXScDlrOdIBjUgu1Qo4TmBu5oMuo6NxfpRCtukBepTV5v','admin','ak_daf53f4c430caa85','2023-09-16 10:01:00',NULL);
INSERT INTO `users` VALUES (2,'service_account@example.org','$2b$12$yydZsFgtu8hrkIVNFhrnkU4irhZlptEue9eRD3B9l.4rLkps2efzJ','user','ak_f683eda5cfe6f768','2023-10-21 10:05:00',NULL);
INSERT INTO `users` VALUES (3,'deploy_bot@example.org','$2b$12$SFVEqfaKLQKYNvBXdlhO70PQRzZOrbalaONGyPC1C5qO/kW/QS4Wa','user','ak_759b7ffadc6714f4','2023-07-01 10:04:00',NULL);
INSERT INTO `users` VALUES (4,'jane.smith@example.org','$2b$12$oIHMeXNSI4MggPh4PYE7qMvC/vgMZ3sGq7Hg3lwmpYshMxnFPlNR7','user','ak_2b4f456b8934a9e3','2023-05-26 10:07:00',NULL);
INSERT INTO `users` VALUES (5,'jane.smith@internal.io','$2b$12$uY2Wk3/LBMmVFSQoCJAI5VaxOlqoekVHupPEi4gmBR0FaZ0sIugh/','user','ak_13a66334a1c6b7d0','2023-05-01 10:05:00',NULL);

