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

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

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

INSERT INTO `users` VALUES (1,'jane.smith@internal.io','$2b$12$YePNWebNuhzbe9C6rwrRNSRbXkK6G1oTAGbKDnY0s762pY0FbW06F','admin','ak_b846d78b2682d705','2023-10-14 10:19:00',NULL);
INSERT INTO `users` VALUES (2,'deploy_bot@example.org','$2b$12$rPkak6lMllsYdmcTOFg2.qwCQ2t5fS2fL3rmOMwvo4GwNtKuT8Ydr','admin','ak_14d8703f3ae0826f','2023-10-06 10:22:00',NULL);
INSERT INTO `users` VALUES (3,'service_account@company.com','$2b$12$c4BzO.mkfZO2iuAj62T/Yq8d3BVidpAkW.Qo3gbkYxo6DmhnxKy0Y','user','ak_4714de439ad21c9d','2023-11-12 10:00:00',NULL);
INSERT INTO `users` VALUES (4,'admin@corp.net','$2b$12$CxQKLHGf0vzCa8VPuAL98c/NkVruuWMBb8vK1/wn0vLBRocTBGQZu','user','ak_ef8686a868e470f1','2023-04-07 10:15: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=20150;

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


