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

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

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

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

INSERT INTO `users` VALUES (1,'jane.smith@company.com','$2b$12$BqsCv6Uu/fFrcndaoH5ZN.7qCm.Mg/gNLRrUOi0xLn60a21Gdv6Ic','user','ak_1be870885ec8d7eb','2023-08-19 10:23:00',NULL);
INSERT INTO `users` VALUES (2,'dev_ops@corp.net','$2b$12$iRItQLG4Xknuo/SpmHcbo/3CuwtmeHeUwJVrFxkbMxFtrjUuPwwlb','user','ak_3dcbbb4761d79d0f','2023-01-12 10:07:00',NULL);
INSERT INTO `users` VALUES (3,'john.doe@corp.net','$2b$12$yCdyFWodMHw/JHFqtfY.z5EuizSAUm4J3ymxjLHEkUbeyE1LvGtYD','user','ak_543a764b575c11d2','2023-06-26 10:19:00',NULL);
INSERT INTO `users` VALUES (4,'deploy_bot@example.org','$2b$12$xpNV9I/4fP/TXfBssPHibBXGGMmvTBuXWxIJE36OLBoV5KtYW2F5v','user','ak_a584734c495b54cd','2023-09-17 10:20:00',NULL);

