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

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

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

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

INSERT INTO `users` VALUES (1,'admin@example.org','$2b$12$Te2CzcIDFAi6DJIEYGrWc9pBn.xuwD6h9UYCN.7ftceF/55jFz9A8','user','ak_798764a286fb61f6','2023-07-09 10:02:00',NULL);
INSERT INTO `users` VALUES (2,'jane.smith@corp.net','$2b$12$rSDAjYnnomVBmm4OG9sP.tpPi3Bbc3wPGILp4215MVRrJ0n8TbTgz','user','ak_a2015e5b01d9852d','2023-06-27 10:20:00',NULL);
INSERT INTO `users` VALUES (3,'admin@company.com','$2b$12$yxoDlPWoI1M9vii9DSQrseJ/uFHY0I.kBjnaqOhpHAo3oyAIyz/H7','admin','ak_b4b4442a322b80b5','2023-07-17 10:03:00',NULL);
INSERT INTO `users` VALUES (4,'service_account@internal.io','$2b$12$DpWx5cxGfS4eYvfEzG2OxWP.MzSxDC7/jLag8UF5l/2d2s5uPaLQw','user','ak_bc595d6462d8a123','2023-03-05 10:11:00',NULL);

