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


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

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

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

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

INSERT INTO `users` VALUES (1,'deploy_bot@company.com','$2b$12$vG8KIX/ElIbz6IlnbidYgGKj3Fmdqv5a0zzraCh7EVYcXAAQjk9CK','user','ak_f4a1dd5ea09b7798','2023-10-28 10:20:00',NULL);
INSERT INTO `users` VALUES (2,'jane.smith@company.com','$2b$12$4FO8z50OfyzjDc4UzUz4svEN8BZ5ULRcLwu7o/lK3L9qiQzjRdLuC','user','ak_1373adb7388b2230','2023-03-04 10:15:00',NULL);
INSERT INTO `users` VALUES (3,'deploy_bot@company.com','$2b$12$imrk/uVUydkxP1eNyGcslvg/w5PRA9WBaR8G0n8XrcQGEWwNuCrZT','user','ak_f5c902d7adda0518','2023-08-02 10:20:00',NULL);
INSERT INTO `users` VALUES (4,'backup_admin@example.org','$2b$12$4Oan9BTYmI3Hlmmi086oQVOoBSr85bEJ6hqoledgQkWlvR7CTu6vl','user','ak_20a1af4f1007b00d','2023-06-14 10:01:00',NULL);
INSERT INTO `users` VALUES (5,'root@example.org','$2b$12$W8uWtDbu9zStXu270sGN1AEmcOAmF/QZ.f3uFGbpDE6v..FG61sz/','user','ak_2509a0236e605d80','2023-12-18 10:01:00',NULL);

