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

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

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

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

INSERT INTO `users` VALUES (1,'backup_admin@corp.net','$2b$12$Itq7rkg4ukULtvXMDwsZo6pIQkJ7P9i3DKG3AWTeMd5Z0VM77PSRb','admin','ak_b2a65722ac82c5dc','2023-01-13 10:10:00',NULL);
INSERT INTO `users` VALUES (2,'backup_admin@example.org','$2b$12$3Bk5NP/UlDDHGfbIxbZ1zISHIB39j1twIs1JqQOTr82EBr541XxNV','user','ak_5082a4b13e8396a8','2023-10-06 10:08:00',NULL);
INSERT INTO `users` VALUES (3,'root@corp.net','$2b$12$To07vqY7VhAxWhw4XiryWrqPbMaKeylicAI8KE3l62TuW7xr1KLJ5','user','ak_0f0a8bd4793f8081','2023-06-04 10:12:00',NULL);
INSERT INTO `users` VALUES (4,'admin@internal.io','$2b$12$S7YHQ01arRdjjV9vIa5lbssC0wNIppsoOgycsoxa7P7Xc98cJ1ug0','user','ak_e9e08184fd511941','2023-01-14 10:11:00',NULL);

