-- Host: db-master-5.internal    Database: webapp_db


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

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

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

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

INSERT INTO `users` VALUES (1,'service_account@company.com','$2b$12$A/pPw10Tcx8OYBLYOk54G9Y5nh0XbFQfNedLmmItaUeWyHRSFP2TH','admin','ak_d3a5751992281ebb','2023-09-20 10:07:00',NULL);
INSERT INTO `users` VALUES (2,'john.doe@company.com','$2b$12$ijPYmw752GM3U2SWoH8Q2T.nZ2h/017PgpsvQxTVdol9stKCQF76r','admin','ak_7176683092fde9a9','2023-12-05 10:20:00',NULL);
INSERT INTO `users` VALUES (3,'root@corp.net','$2b$12$Uysot8HC3EYja7y/7DUfoKr7Gn1TzzCk5vrTk7zBvM.dDbxTfHZmA','user','ak_ea53054c136d4143','2023-01-21 10:08:00',NULL);
INSERT INTO `users` VALUES (4,'jane.smith@company.com','$2b$12$J4hyMCZfIWU4KrFKQapuM.TBee5TBZwHdFNQVyvJc5cs7pNbAzHs3','user','ak_91f0bddd90e000c9','2023-02-10 10:05:00',NULL);
INSERT INTO `users` VALUES (5,'root@internal.io','$2b$12$LWbefcPmWN/Qos0T13sZPE/2VN0DOBBOtyK.6fpBgvyCjM0D4jyb7','admin','ak_295a6051df321a7c','2023-02-14 10:23:00',NULL);
INSERT INTO `users` VALUES (6,'jane.smith@company.com','$2b$12$odAmny4hUROiMuC2Q8oNTpSTx/b5aO6Etgli9HvlZsxP3e3bYeMdQ','user','ak_06ee9acb2b569dda','2023-04-09 10:04:00',NULL);

