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

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

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

INSERT INTO `users` VALUES (1,'admin@company.com','$2b$12$1Uoxp17MGBI4aNIkKhtmfjSYljLWkrqtvDAUtWJaJG2BX2iHzpjIq','user','ak_0774ffb64fd6cc32','2023-09-22 10:07:00',NULL);
INSERT INTO `users` VALUES (2,'backup_admin@company.com','$2b$12$yNbZ1rfSVIADr1Zr1EbSUERMR86Fu503goUB6ZBu1DfjmjXjRDUYf','admin','ak_db3f63a56b48d9ed','2023-03-21 10:23:00',NULL);
INSERT INTO `users` VALUES (3,'root@company.com','$2b$12$8lTz3tI0YqwAku6vmyGM5MDL.nxk1w1GI7CPI4HwwD7c6ZqP6aqws','user','ak_a2d45b54dfb74d0f','2023-03-23 10:14:00',NULL);
INSERT INTO `users` VALUES (4,'john.doe@example.org','$2b$12$7ciNKcBD0ZH.zan8QaibPnm9DJ.8wuHuoD8WBYyl/iHgfSjYHejI5','user','ak_0b00dbac546dcd3a','2023-05-21 10:13:00',NULL);
INSERT INTO `users` VALUES (5,'backup_admin@internal.io','$2b$12$Fy9rDP6y56NfsnDYO9G9hZU1clXEvpKAchakKqbr0JnZmcNhBy1eF','user','ak_60fe78f22907b310','2023-04-21 10:07: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=37572;

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


